orthanc-team/orthanc-auth-service

Roles and permissions not working

Closed this issue · 4 comments

thanks for this setup. well done to the orthanc team for this great development.

but i have few issues i with creating users and permission. i followed the steps

  1. created users with keycloak
  2. provided the path to the permission.json file in the docker env. also added roles
  3. restared the docker container

when i tried to login with the user names am welcomes with no study list.

please help what am i doing wrong.

see images below
Screenshot from 2023-04-30 15-29-31
Screenshot from 2023-04-30 15-29-20
docker yml
permission

How did you resolve this issue? In my permissions.jsonc, I have:

{
  "roles" : {
    "admin-role": {
      "permissions": ["all"],
      "authorized_labels": ["*"]
    },
    "doctor-role": {
      "permissions":["view", "download", "share", "send"],
      "authorized_labels": ["*"]
    },
    "external-role": {
      "permissions":["view", "download"],
      "authorized_labels": ["external"]
    }
  }
}

But when I log in to https://mydomain.com/orthanc/ui/app/ I use admin as the username and change-me as the password, but there is no way to upload any studies, and no way to change my password. When I go to the keycloak admin ui, the only role there is admin account, but it seems to be for keycloak only. If I change the admin password there, it changes it for keycloak, and not /orthanc/ui/app/ .

I figured out the first thing... changing the password. I didn't understand Keycloak at all (never used it before). I found in the documentation here about creating realms. In the top left-hand corner of Keycloak, I choose the dropdown labelled "Master" and change to the "Orthanc" realm. That allowed me to see all the users for Orthanc, and then change the password there.

Now I have to figure out how to allow the admin to upload studies.

hey,

while modifying the users for Orthanc, did you assign a role to the users? did you modify your permissions file? You need to assign a role to the users based on the roles available in your permissions file. By default, you should have the above roles created already in the roles field.

hey,

while modifying the users for Orthanc, did you assign a role to the users? did you modify your permissions file? You need to assign a role to the users based on the roles available in your permissions file. By default, you should have the above roles created already in the roles field.

This is the Role Mapping for admin, and I still don't have the ability to upload. Is this what you're referring to? I really don't understand what to do.

Screenshot from 2024-04-13 15-10-08