|
| 1 | +[id="gitops-logging-into-keycloak_{context}"] |
| 2 | += Logging in to Keycloak |
| 3 | + |
| 4 | +Log in to the Keycloak console to manage identities or roles and define the permissions assigned to the various roles. |
| 5 | + |
| 6 | +.Prerequisites |
| 7 | + |
| 8 | +* The default configuration of Dex is removed. |
| 9 | +* Your Argo CD CR must be configured to use the Keycloak SSO provider. |
| 10 | + |
| 11 | +.Procedure |
| 12 | + |
| 13 | +. Get the Keycloak route URL for login: |
| 14 | ++ |
| 15 | +[source,terminal] |
| 16 | +---- |
| 17 | +$ oc -n argocd get route keycloak |
| 18 | +
|
| 19 | +NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD |
| 20 | +keycloak keycloak-default.apps.ci-ln-******.origin-ci-int-aws.dev.**.com keycloak <all> reencrypt None |
| 21 | +---- |
| 22 | +. Get the Keycloak pod name that stores the user name and password as environment variables: |
| 23 | ++ |
| 24 | +[source,terminal] |
| 25 | +---- |
| 26 | +$ oc -n argocd get pods |
| 27 | +
|
| 28 | +NAME READY STATUS RESTARTS AGE |
| 29 | +keycloak-1-2sjcl 1/1 Running 0 45m |
| 30 | +---- |
| 31 | +.. Get the Keycloak user name: |
| 32 | ++ |
| 33 | +[source,terminal] |
| 34 | +---- |
| 35 | +$ oc -n argocd exec keycloak-1-2sjcl -- "env" | grep SSO_ADMIN_USERNAME |
| 36 | +
|
| 37 | +SSO_ADMIN_USERNAME=Cqid54Ih |
| 38 | +---- |
| 39 | +.. Get the Keycloak password: |
| 40 | ++ |
| 41 | +[source,terminal] |
| 42 | +---- |
| 43 | +$ oc -n argocd exec keycloak-1-2sjcl -- "env" | grep SSO_ADMIN_PASSWORD |
| 44 | +
|
| 45 | +SSO_ADMIN_PASSWORD=GVXxHifH |
| 46 | +---- |
| 47 | +. On the login page, click *LOG IN VIA KEYCLOAK*. |
| 48 | ++ |
| 49 | +[NOTE] |
| 50 | +==== |
| 51 | +You only see the option *LOGIN VIA KEYCLOAK* after the Keycloak instance is ready. |
| 52 | +==== |
| 53 | +. Click *Login with OpenShift*. |
| 54 | ++ |
| 55 | +[NOTE] |
| 56 | +==== |
| 57 | +Login using `kubeadmin` is not supported. |
| 58 | +==== |
| 59 | ++ |
| 60 | +. Enter the OpenShift credentials to log in. |
| 61 | +. Optional: By default, any user logged in to Argo CD has read-only access. You can manage the user level access by updating the `argocd-rbac-cm` config map: |
| 62 | ++ |
| 63 | +[source,yaml] |
| 64 | +---- |
| 65 | +policy.csv: |
| 66 | +<name>, <email>, role:admin |
| 67 | +---- |
| 68 | + |
| 69 | + |
| 70 | + |
0 commit comments