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

Docs: adds keycloak OIDC guide #973

Merged
merged 11 commits into from
Sep 8, 2023
Merged

Docs: adds keycloak OIDC guide #973

merged 11 commits into from
Sep 8, 2023

Conversation

ZPain8464
Copy link
Contributor

Resolves https://github.com/pomerium/internal/issues/1489. Also resolves #866

This PR adds OIDC to the sidebar under identity provider. It adds an OIDC implementation using Keycloak as the OIDC server.

This guide is only compatible with Core at the moment.

@ZPain8464 ZPain8464 added docs backport 0-23-0 Backports this PR to branch 0-23-0 labels Sep 6, 2023
@ZPain8464 ZPain8464 requested a review from kenjenkins September 6, 2023 19:16
@ZPain8464 ZPain8464 requested a review from a team as a code owner September 6, 2023 19:16
@ZPain8464 ZPain8464 requested review from cmo-pomerium and removed request for a team September 6, 2023 19:16
@netlify
Copy link

netlify bot commented Sep 6, 2023

Deploy Preview for pomerium-docs ready!

Name Link
🔨 Latest commit 395e329
🔍 Latest deploy log https://app.netlify.com/sites/pomerium-docs/deploys/64fb2c7cad1a8a0008bfdb43
😎 Deploy Preview https://deploy-preview-973--pomerium-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ZPain8464 ZPain8464 requested a review from desimone September 6, 2023 19:17
Comment on lines 59 to 60
expose:
- 8000
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the expose setting isn't necessary here.

docker compose up
```

When Keycloak is ready, navigate to `http://0.0.0.0:8080` to access the **Administration Console:**
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure that all browsers will translate 0.0.0.0 to localhost. I'd recommend we specify localhost explicitly here instead.

I think we can also make this into a link?

Suggested change
When Keycloak is ready, navigate to `http://0.0.0.0:8080` to access the **Administration Console:**
When Keycloak is ready, navigate to [http://localhost:8080](http://localhost:8080) to access the **Administration Console:**

(and similarly for other occurrences of 0.0.0.0 in this page)

authenticate_service_url: https://authenticate.localhost.pomerium.io

idp_provider: oidc
idp_client_id: 'account'
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this use the client created in the previous step?

idp_client_id: 'account'
idp_provider_url: 'http://keycloak.localhost.pomerium.io:8080/realms/MyRealm'

signing_key: <generate_key>
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this will confuse some users. Would it be simpler to provide a valid key here instead, along with a warning not to use it in production?


idp_provider: oidc
idp_client_id: 'account'
idp_provider_url: 'http://keycloak.localhost.pomerium.io:8080/realms/MyRealm'
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd recommend we pick one realm name and use it consistently throughout this guide. It looks like the screen recording above uses the realm name 'Pomerium'.

We could update line 93 to read:

In the Realm name field, enter the name "Pomerium"

and this line to read:

idp_provider_url: 'http://keycloak.localhost.pomerium.io:8080/realms/Pomerium'

@ZPain8464 ZPain8464 changed the title Docs: Zpain/keycloak OIDC Docs: adds keycloak OIDC guide Sep 7, 2023
@ZPain8464 ZPain8464 requested a review from kenjenkins September 7, 2023 15:03
Copy link
Contributor

@kenjenkins kenjenkins left a comment

Choose a reason for hiding this comment

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

Overall looks good to me.


Update the client you created:

1. Under **General Settings** in the **Name** field, enter your Client ID in template literals (for example, `${mynewclient}`) ![Enter client ID](./img/oidc/keycloak-client-general-settings.png)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand the ${mynewclient} part here. What does this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It specifies the display name of the client. I tested it without this value and it works fine, but I was getting an invalid client credentials error today after testing again. I had to add the client secret to get it work. I added these steps as well.

@ZPain8464 ZPain8464 merged commit f3f015d into main Sep 8, 2023
@ZPain8464 ZPain8464 deleted the zpain/keycloak-oidc branch September 8, 2023 14:18
backport-actions-token bot pushed a commit that referenced this pull request Sep 8, 2023
* adds first half of guide

* adds keycloak and pomerium config steps

* adds oidc and keycloak guide

* resolves precommit failures

* adds more workds to cspell ignore

* fixes typo

* updates keycloak client steps

* updates text

* updates cspell

* updates client steps

* runs prettier
ZPain8464 added a commit that referenced this pull request Sep 8, 2023
Docs: adds keycloak OIDC guide (#973)

* adds first half of guide

* adds keycloak and pomerium config steps

* adds oidc and keycloak guide

* resolves precommit failures

* adds more workds to cspell ignore

* fixes typo

* updates keycloak client steps

* updates text

* updates cspell

* updates client steps

* runs prettier

Co-authored-by: zachary painter <60552605+ZPain8464@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 0-23-0 Backports this PR to branch 0-23-0 docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "OIDC" under "Identity Providers" sidebar section?
2 participants