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

Integrate with the dex-auth-info interface to set OIDC_PROVIDER value #156

Closed
DnPlas opened this issue Jul 5, 2024 · 2 comments
Closed
Labels
enhancement New feature or request

Comments

@DnPlas
Copy link
Contributor

DnPlas commented Jul 5, 2024

Context

This charm can be considered as an OIDC client that connects to Dex for handling Charmed Kubeflow authorization. It should be integrated with dex-auth to get the OIDC provider's information.

dex-auth will be introducing a new interface to broadcast Dex's info in canonical/dex-auth-operator#203, to enable OIDC clients like this charm to integrate to it.

oidc-gatekeeper should be able to integrate with this interface and use Dex's issuer info for setting the value of OIDC_PROVIDER.

What needs to get done

  1. Add the relation and interface
# oidc-gatekeeper metadata.yaml
requires:
  oidc-provider-info:
    interface: oidc-provider-info
  1. Use the relation data to set the value of OIDC_PROVIDER

Definition of Done

The OIDC_PROVIDER value is set using the relation data instead of it coming from the public-url configuration option.

@DnPlas DnPlas added the enhancement New feature or request label Jul 5, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-5968.

This message was autogenerated

DnPlas added a commit that referenced this issue Jul 26, 2024
#163)

This commit integrates the `oidc-gatekeeper` charm with `dex-auth` via the `dex-oidc-config` interface.

`dex-auth` (see canonical/dex-auth-operator#203) recently introduced the aforementioned interface, which will help us remove the `public-url` configuration option as the main way of configuring oidc-gatekeeper's OIDC_AUTH_PROVIDER env variable. The new relation provides all the information that is required for setting that env variable, so this charm and its users should not change it.

The changes in this PR include:

* Removing the `public-url` configuration option entirely (a backwards compatible solution is not required in this case because dex-auth already has it) -> this tackles #157
* Removing all traces of the public-url from the charm code and test code
* Integrating with the new interface and use the relation data to render were needed -> this tackles #156 
* Adding the `dex_oidc_config` library to this charm so the interface is handled by it
* Adding some extra requirements for the library to work


Fixes #156 
Fixes #157
@DnPlas
Copy link
Contributor Author

DnPlas commented Jul 26, 2024

Fixed by #163 and #168

@DnPlas DnPlas closed this as completed Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant