Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Documentation for setting up upstream IAMs with Keycloak #419

Merged
merged 13 commits into from
Jun 4, 2024

Conversation

mamy-CS
Copy link
Collaborator

@mamy-CS mamy-CS commented May 2, 2024

Added documentation for setting up upstream IAMs with Keycloak

  • Microsoft AD
  • Google OAUTH
  • Github OAUTH

To do & enhancements

  • Openshift v3&v4
  • Roles mapping documentation for each IAM

Signed-off-by: MohammedAbdi <mohammma@usc.edu>
@mamy-CS mamy-CS added documentation Improvements or additions to documentation IAM In Progress labels May 2, 2024
@mamy-CS mamy-CS added this to the 1.7.x milestone May 2, 2024
@mamy-CS mamy-CS self-assigned this May 2, 2024
Signed-off-by: MohammedAbdi <mohammma@usc.edu>
@mamy-CS mamy-CS linked an issue May 7, 2024 that may be closed by this pull request
mamy-CS added 6 commits May 8, 2024 10:36
Signed-off-by: MohammedAbdi <mohammma@usc.edu>
Signed-off-by: MohammedAbdi <mohammma@usc.edu>
Signed-off-by: MohammedAbdi <mohammma@usc.edu>
Signed-off-by: MohammedAbdi <mohammma@usc.edu>
Signed-off-by: MohammedAbdi <mohammma@usc.edu>
Signed-off-by: MohammedAbdi <mohammma@usc.edu>
Copy link
Collaborator

@maia-iyer maia-iyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left initial review. I followed the instructions for both Azure and Github and do not get the desired result. For Azure, it properly redirects me, but I cannot login with a user I need.

For Github, it appears to attempt a redirect, but gives some error encoded in the URL about a redirect mismatch:

...error%3Dredirect_uri_mismatch%26error_description%3DThe%2Bredirect_uri%2BMUST%2Bmatch%2Bthe%2Bregistered%2Bcallback%2BURL%2Bfor%2Bthis%2Bapplication.%26error_uri%3Dhttps%253A%252F%252Fdocs.github.com%252Fapps%252Fmanaging-oauth-apps%252Ftroubleshooting-authorization-request-errors%252F%2523redirect-uri-mismatch...

Copy link
Collaborator

@maia-iyer maia-iyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I retested it, and I was able to get it to work - except Microsoft one requires you to select "Multitenant" so this detail needs to be added I think. I would add the details of a filled in form for each of keycloak and the upstream IDPs so that these details can be explained away

Also having gone through this I'm noticing the keycloak steps are pretty much always the same - maybe we can shorten the documentation. My suggestion would be to

  1. put the keycloak documentation at the top
    a. State where the relevant Redirect URI is (with the screen shot)
    b. Tell users to fill in the Client ID and Client Secret after obtaining them from the the desired IDP below
  2. For each IDP create a collapsible section for readers to click into.
    a. Talk about how to get to the relevant form to fill in Redirect URI
    b. Show a filled in picture of the form with the important selections

While Keycloak is technically the last step, I think this might be clear enough.

> [!NOTE] For simplicity we will be creating a free account
- Go to [Microsoft Azure](https://azure.microsoft.com/en-us/) and select `Try Azure for free` signup for an account.
- Go to `App registrations` (you can search for it on top)
- Click on `New Regestration` and configure the name and add a `Redirect URI` by selecting `Web` and paste the value of `Redirect URI` from keycloak and Register the application.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On this step I got it to work, but I also needed to select multitenant option. Add this detail when screenshooting?

mamy-CS added 4 commits May 23, 2024 15:57
Signed-off-by: MohammedAbdi <mohammma@usc.edu>
Signed-off-by: MohammedAbdi <mohammma@usc.edu>
Signed-off-by: MohammedAbdi <mohammma@usc.edu>
Signed-off-by: MohammedAbdi <mohammma@usc.edu>
Copy link
Collaborator

@maia-iyer maia-iyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very clean! So I have a minor nit comment for the lines that go:

> [!TIP]

I think do a sweep through because some of them haven't put the rest of the text on the next line in order to parse properly

I also do not see the TenantID field in Keycloak for Azure. Are you using the example in Tornjak repo or the helm charts? I'm using the example in Tornjak, so maybe it needs to be updated either with the right config. Probably can't remove the example in Tornjak repo to point to helm charts right now because that has the changes for the latest version of Tornjak to work with Keycloak. If you're using the helm charts, maybe make a note at the top about this should be sufficient?

Signed-off-by: MohammedAbdi <mohammma@usc.edu>
@mamy-CS mamy-CS requested a review from maia-iyer June 4, 2024 16:30
Copy link
Collaborator

@maia-iyer maia-iyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Really great documentation!

@mamy-CS mamy-CS merged commit f7973f3 into v1.7 Jun 4, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation IAM In Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add keycloak + upstream IAMs documentation
2 participants