Hi Vrinda,
Thanks for getting back to me. Yes, I followed those instructions exactly as specified.
I imported import $DCM4CHEE_ARC/ldap/default-ui-config.ldif using ApacheDirectoryStudio during the LDAP configuration, then when I'm in the User Federation section I import default-users.ldif (see relevant command and output at end of this message).
I then restart the keycloak server and follow the instructions to add the LDAP provider in Keycloak, and can connect and authenticate successfully. I then sync the users before creating the role-ldap-mapper and then sync ldap roles to keycloak (see pictures in 2nd post above). In total three users and five roles are created. At no point can I see where "default-roles-dcm4che" was created, though it appears that this is necessary for me to access the archive.
E.g. I just started dcm4che:
$KEYCLOAK_HOME/bin/standalone.sh
$WILDFLY_HOME/bin/standalone.sh -c dcm4che-arc.xml
Make a connection to https://<archive host>:8443/dcm4chee-arc/ui2 and I can browse the DICOM data that I uploaded using storescu.
If I now close the browser, take down the wildfly server and then go into keycloak and remove the role (default-roles-dcm4che) from user (user), and restart wildfly server I get the following when I try to access the archive:
(Note there was probably no need to take the wildfly server down to accomplish this test)
For completeness, here are the the roles as installed in keycloak - I would imagine that default-roles-dcm4che is created automatically at the time the realm is created?
You can see the five that were imported from LDAP, plus the three that were generated automatically.
If I put default-roles-dcm4che back in to the Role Mappings for user (user), I'm back online again:
This behaviour is completely reproducible.
Any suggestions as to what's going on? Happy to send logfiles if that helps?
Best wishes,
Jon
Command used to add user information into LDAP:
ldapadd -x -W -D "cn=admin,dc=dcm4che,dc=org" -H ldapi:/// -f $DCM4CHEE_ARC/ldap/default-users.ldif
Enter LDAP Password:
adding new entry "ou=users,dc=dcm4che,dc=org"
adding new entry "uid=root,ou=users,dc=dcm4che,dc=org"
adding new entry "uid=admin,ou=users,dc=dcm4che,dc=org"
adding new entry "uid=user,ou=users,dc=dcm4che,dc=org"
adding new entry "cn=root,ou=users,dc=dcm4che,dc=org"
adding new entry "cn=admin,ou=users,dc=dcm4che,dc=org"
adding new entry "cn=user,ou=users,dc=dcm4che,dc=org"
adding new entry "cn=auditlog,ou=users,dc=dcm4che,dc=org"
adding new entry "cn=ADMINISTRATOR,ou=users,dc=dcm4che,dc=org"
adding new entry "ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=create-client,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=impersonation,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=manage-authorization,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=manage-clients,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=manage-events,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=manage-identity-providers,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=manage-realm,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=manage-users,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=realm-admin,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=view-authorization,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=view-clients,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=view-events,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=view-identity-providers,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=view-realm,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=view-users,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=query-users,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=query-groups,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=query-realms,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=query-clients,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "ou=account,dc=dcm4che,dc=org"
adding new entry "cn=view-profile,ou=account,dc=dcm4che,dc=org"
adding new entry "cn=delete-account,ou=account,dc=dcm4che,dc=org"
adding new entry "cn=manage-account,ou=account,dc=dcm4che,dc=org"
adding new entry "cn=manage-consent,ou=account,dc=dcm4che,dc=org"
adding new entry "cn=view-applications,ou=account,dc=dcm4che,dc=org"