-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from stakater/keycloak_how_to
Keycloak how to guide on adding a new user
- Loading branch information
Showing
6 changed files
with
83 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Setting Up User Access in Keycloak for MTO Console | ||
|
||
This guide walks you through the process of adding new users in Keycloak and granting them access to Multi Tenant Operator (MTO) Console. | ||
|
||
## Accessing Keycloak Console | ||
|
||
* Log in to the OpenShift Console. | ||
* Go to the 'Routes' section within the 'multi-tenant-operator' namespace. | ||
|
||
![routes](../images/routes.png) | ||
|
||
* Click on the Keycloak console link provided in the Routes. | ||
* Login using the admin credentials (default: admin/admin). | ||
|
||
## Adding new Users in Keycloak | ||
|
||
* In the Keycloak console, switch to the `mto` realm. | ||
|
||
![realm](../images/realm.png) | ||
|
||
* Go to the `Users` section in the `mto` realm. | ||
* Follow the prompts to add a new user. | ||
|
||
![keycloak-new-user](../images/keycloak-new-user.png) | ||
|
||
* Once you add a new user, here is how the Users section would look like | ||
|
||
![keycloak-users](../images/keycloak-users.png) | ||
|
||
## Accessing MTO Console | ||
|
||
* Go back to the OpenShift Console, navigate to the Routes section, and get the URL for the MTO Console. | ||
* Open the MTO Console URL and log in with the newly added user credentials. | ||
|
||
Now, at this point, a user will be authenticated to the MTO Console. But in order to get access to view any Tenant resources, the user will need to be part of a Tenant. | ||
|
||
## Granting Access to Tenant Resources | ||
|
||
* Open Tenant CR: In the OpenShift cluster, locate and open the Tenant Custom Resource (CR) that you wish to give access to. You will see a YAML file similar to the following example: | ||
|
||
```yaml | ||
apiVersion: tenantoperator.stakater.com/v1beta2 | ||
kind: Tenant | ||
metadata: | ||
name: arsenal | ||
spec: | ||
quota: small | ||
owners: | ||
users: | ||
- [email protected] | ||
groups: | ||
- arsenal | ||
editors: | ||
users: | ||
- [email protected] | ||
viewers: | ||
users: | ||
- [email protected] | ||
``` | ||
* Edit Tenant CR: Add the newly created user's email to the appropriate section (owners, editors, viewers) in the Tenant CR. For example, if you have created a user `[email protected]` and wish to add them as an editor, the edited section would look like this: | ||
|
||
```yaml | ||
editors: | ||
users: | ||
- [email protected] | ||
- [email protected] | ||
``` | ||
|
||
* Save Changes: Save and apply the changes to the Tenant CR. | ||
|
||
## Verifying Access | ||
|
||
Once the above steps are completed, you should be able to access the MTO Console now and see alpha Tenant's details along with all the other resources such as namespaces and templates that John has access to. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.