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

Document how to use OIDC authentication #967

Merged
merged 5 commits into from
Feb 22, 2019

Conversation

andresmgot
Copy link
Contributor

Closes #947
Closes #948

@andresmgot andresmgot requested a review from prydonius February 20, 2019 17:20
docs/user/login-alternatives.md Outdated Show resolved Hide resolved
docs/user/login-alternatives.md Outdated Show resolved Hide resolved
docs/user/login-alternatives.md Outdated Show resolved Hide resolved
docs/user/login-alternatives.md Outdated Show resolved Hide resolved
docs/user/login-alternatives.md Outdated Show resolved Hide resolved
docs/user/using-an-OIDC-provider.md Outdated Show resolved Hide resolved
The above is a sample deployment, depending on the configuration of the Identity Provider those flags may vary. For this example we use:

- `--client-id`, `--client-secret` and `--discovery-url`: Client ID, Secret and IdP URL as stated in the section above.
- `--skip-openid-provider-tls-verify`, `--secure-cookie=false`: If the `discovery-url` is served through HTTPS with a self-signed certificate (i.e. Keycloak or Dex), those flags are necessary to avoid errors while validating the TLS certificate.
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 think this is important enough for us to mention, we can point to the Keycloak gatekeeper docs for more configuration options.

Copy link
Contributor Author

@andresmgot andresmgot Feb 21, 2019

Choose a reason for hiding this comment

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

Do you mean that you wouldn't show the explanation of these 2 flags or all the flags? I think it's important to mention this since in all the guides I have found for keycloak/dex people use a self-signed certificate (which may be good enough for internal clusters).

Since if you don't use those flags is difficult to debug the problem (I experienced that from first hand) I think is helpful for us to specify it.

It's true that we should not include it by default though so I will move the explanation of these flags to a note.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you mean that you wouldn't show the explanation of these 2 flags or all the flags?

These two flags.

It's true that we should not include it by default though so I will move the explanation of these flags to a note.

That sounds okay, but honestly the less we document the better, it's less work to maintain. We could just as easily point to the keycloak-gateway docs and hopefully someone finds it there.

docs/user/using-an-OIDC-provider.md Outdated Show resolved Hide resolved
docs/user/using-an-OIDC-provider.md Outdated Show resolved Hide resolved
docs/user/using-an-OIDC-provider.md Outdated Show resolved Hide resolved
@prydonius
Copy link
Contributor

Thanks a lot for this, and +1 for adding the documentation about a hardcoded token! I mostly have some rephrasing suggestions.

prydonius and others added 2 commits February 21, 2019 12:31
Co-Authored-By: andresmgot <andres.mgotor@gmail.com>
@andresmgot
Copy link
Contributor Author

I think I have addressed your comments @prydonius, let me know if I missed something

Copy link
Contributor

@prydonius prydonius left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

- `--resources=uri=/api/kube/*|white-listed=true`: This setting enables WebSockets to work correctly, which Kubeapps relies on to show up-to-date information. Kubeapps handles the injection of the OIDC token into every Kubernetes API request, so it is not necessary for Keycloak Gatekeeper to do it.
- `listen=0.0.0.0:3000`: Listen in all the interfaces.

**NOTE**: If the identity provider is deployed with a self-signed certificate (which may be the case for Keycloak or Dex) you will need to disable the TLS and cookie verification. For doing so you can add the flags `--skip-openid-provider-tls-verify` and `--secure-cookie=false` to the deployment above. You can find more options for the `keycloak-gatekeeper` proxy [here](https://www.keycloak.org/docs/latest/securing_apps/index.html#_keycloak_generic_adapter).
Copy link
Contributor

Choose a reason for hiding this comment

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

great, thanks 👍

docs/user/using-an-OIDC-provider.md Outdated Show resolved Hide resolved
prydonius and others added 2 commits February 22, 2019 10:00
@andresmgot andresmgot merged commit 641b040 into vmware-tanzu:master Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants