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

refactor: add dex-issuer-url and remove public-url config options #209

Merged

Conversation

DnPlas
Copy link
Contributor

@DnPlas DnPlas commented Jul 11, 2024

This commit removes the public-url configuration option in favour of the dex-issuer-url one. The way to configure the issuer value for dex-auth is now by getting it from the aforementioned configuration option or by constructing it from dex-auths Kubernetes Service DNS name: "http://..svc:5556/dex"

Closes #204

Merge after #208 - CI is expected to fail until that PR is merged.

Testing instructions

  1. Deploy the charm from this PR
  2. Ensure that juju config public-url does not allow to set the config option

This commit removes the public-url configuration option in favour of the dex-issuer-url one.
The way to configure the issuer value for dex-auth is now by getting it from the aforementioned
configuration option or by constructing it from dex-auths Kubernetes Service DNS name:
"http://<dex-app-name>.<namespace>.svc:5556/dex"

Closes #204
@DnPlas DnPlas requested a review from a team as a code owner July 11, 2024 17:19
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
Comment on lines +244 to +246
# FIXME: the correct behaviour should be to change the config
# at any point in time to trigger config events and check the
# value gets passed correctly when it changes.
Copy link
Contributor

Choose a reason for hiding this comment

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

I remember this discussion but do we have an issue for this? I mean if at some point there is a fix, we could link this.

Copy link
Contributor Author

@DnPlas DnPlas Jul 22, 2024

Choose a reason for hiding this comment

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

We do not have an issue, but also I'm not sure if there is a fix as this would be harness' behaviour. I can create one in our tracker just so we remember what it is and what are the things we have to do as workarounds.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's if there is an issue in Harness. Otherwise, it's fine as is.

tests/unit/test_charm.py Outdated Show resolved Hide resolved
@DnPlas DnPlas merged commit 84153bf into KF-5536-issuer-url-dev-branch Jul 23, 2024
7 checks passed
@DnPlas DnPlas deleted the KF-5967-remove-public-url-config branch July 23, 2024 10:06
DnPlas added a commit that referenced this pull request Jul 24, 2024
* refactor: add dex-issuer-url and remove public-url config options

This commit removes the public-url configuration option in favour of the dex-issuer-url one.
The way to configure the issuer value for dex-auth is now by getting it from the aforementioned
configuration option or by constructing it from dex-auths Kubernetes Service DNS name:
"http://<dex-app-name>.<namespace>.svc:5556/dex"

Closes #204
DnPlas added a commit that referenced this pull request Jul 25, 2024
This branch introduces changes to support the dex-oidc-config interface and the deprecation of public-url in favour of issuer-url. For more information, please refer to the following:

* refactor: add dex-issuer-url and remove public-url config options (#209)
* feat: add dex_oidc_config library (#208)
* chore: keep public-url config option for compatibility #213
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants