Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Provide ability to add users to keycloak and assign groups/roles prior to the user logging on #118

Closed
gil0109 opened this issue Nov 28, 2020 · 4 comments
Labels
FAQ Frequently asked questions, keeping for record until docs created. sso Tag for all issues and work items associated with the SSO Team

Comments

@gil0109
Copy link

gil0109 commented Nov 28, 2020

Goal: Add New Hire and required groups/roles prior to their first login

Sample Scenario:

  • User is newly hired and needs access to application X on openshift using IDIR/Keycloak
  • Application X requires user to be setup with groups/roles first.
  • As part of hiring process, we order IDIR via OCIO, receive IDIR ID and add to Keycloak and assign groups prior to new hire logging on.
  • Send user the IDIR and tempory IDIR password and have them login into application successfully.

Solution:

Duplicated a copy of first broker login

copyfbl

Added Create User If Unique (BCGOV) and disabled existing "Create User If Unique", by adding execution

addexecution
copyfbl

Chose "Create User if Unique (BCGOV)

createexecution

Move up to appropriate place and disable (or delete) the existing "Create User If Unique"

Update IDIR IDP: First Login Flow with new first broker login.

updateidp_1

** ensure the following is in the mappers, otherwise add:

updateidp_2

Name: idir_guid
Mapper Type: Attribute Importer
Claim: idir_userid
User Attribute Name: idir_user_guid

When creating a new user in keycloak:

  1. User name should be in format: "@idir"
  2. Add user attribute: idir_user_guid with the value of the IDIR GUID.

adduser

To find the guid in powershell:

Get-ADUser -Identity <idirid>

To find the guid in linux, install ldap-utils and type:

ldapsearch -LLL -x -h idir.BCGOV -D "<your idir>" -W -b "OU=BCGOV,DC=idir,DC=BCGOV" '(&(objectCategory=person)(objectClass=user)(sAMAccountName=<idirid>))' bcgovGUID

@idir
Copy link

idir commented Nov 28, 2020

Hey, you highlighted me. How can I help ?

@gil0109
Copy link
Author

gil0109 commented Nov 28, 2020

@idir It must have been a mistake. I apologize.

"User name should be in format: "@idir""

@cvarjao cvarjao added the FAQ Frequently asked questions, keeping for record until docs created. label Jan 29, 2021
@brycereid73 brycereid73 added the sso Tag for all issues and work items associated with the SSO Team label Mar 30, 2021
@zsamji
Copy link

zsamji commented Jan 5, 2022

closed and captured bcgov/sso-keycloak#68

@zsamji zsamji closed this as completed Jan 5, 2022
@bruce-wh-li
Copy link

ldapsearch -LLL -x -h idir.BCGOV -D "joedoe@idir" -W -b "OU=BCGOV,DC=idir,DC=BCGOV" '(&(objectCategory=person)(objectClass=user)(sAMAccountName=janedoe))' bcgovGUID

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FAQ Frequently asked questions, keeping for record until docs created. sso Tag for all issues and work items associated with the SSO Team
Projects
None yet
Development

No branches or pull requests

6 participants