-
Notifications
You must be signed in to change notification settings - Fork 16
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
Optionally supplement Dex configuration with information required for embedded ui auth #504
Conversation
a80e212
to
255486e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one nit (missing end-of-line at end of file).
one big question (about a possible mis-committed file)
the rest looks to be ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks ok to me.
I would like to have approval from @enrichman also, as the main dev for the dex/oidc parts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it looks good to me.
The Dex config update is probably something that we need to test.
I'm not sure about the behavior across Epinio upgrades.
/cc @mmartin24 @thehejik
I had a think, from memory helm managed resources aren't something that the user should be manually changing. We show a warning in the rancher ui for resources managed by helm saying something similar. So I'm guessing any changes made by the user will get overwritten on upgrade. |
chart/epinio/questions.yml
Outdated
@@ -173,3 +173,9 @@ questions: | |||
required: false | |||
type: string | |||
group: "Debugging" | |||
- variable: rancher.url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be possible to replace the existing one server.accessControlAllowOrigin
by this new?
server:
# Domain which serves the Rancher UI (to access the API)
accessControlAllowOrigin: ""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. server.accessControlAllowOrigin
has been replaced with server.url
.
@enrichman Can we add something that might stand out in release notes, to ensure people who upgrade can switch over?
Helm upgrade after appending --- dex-config.yaml 2023-10-23 17:01:21.850655068 +0200
+++ dex-config-rancher.yaml 2023-10-23 17:01:36.402797082 +0200
@@ -1,4 +1,6 @@
issuer: "https://auth.1.2.3.4.nip.io"
+web:
+ allowedOrigins: ['https://rancher.somewhere.io']
storage:
type: kubernetes
config:
@@ -24,6 +26,7 @@
trustedPeers:
- epinio-cli
- epinio-ui
+ - rancher-dashboard
- id: epinio-cli
name: 'Epinio cli'
public: true
@@ -33,3 +36,8 @@
# Shouldn't be public, https://dexidp.io/docs/custom-scopes-claims-clients/#public-clients
redirectURIs:
- "https://epinio.1.2.3.4.nip.io/auth/verify/"
+ - id: rancher-dashboard
+ name: 'Rancher Dashboard'
+ public: true
+ redirectURIs:
+ - "https://rancher.somewhere.io/epinio/auth/verify/" The dex-config can be obtained by: $ kubectl get secrets/dex-config -n epinio -o=go-template='{{index .data "config.yaml" | base64decode }}' |
35ff6d0
It works as expected and the @richard-cox But today I found out that when the chart is installed over rancher:v2.8.0-rc3, there is already value |
… embedded ui auth - Allows the rancher domain to contact Dex - Adds a new client specifically for requests from rancher's ui (where the embedded ui lives) - Optionally applied via new chart value `rancher.url` (also added to questions.yaml)
- get_helm sneaked in, that should not be included in PR - added new line at end of file
- This is the same content, so only require one. Keep rancher.url as more generic - Also added rancher.url to values.schema - We should add this change to the release notes, specificaly to warn when upgrading
…isting `rancher.url` - as questions.yaml is only applicable in rancher contexts, also remove rancher.url from there
f5c0612
to
f62c3f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test report:
-
OK - deployed out of rancher without
rancher.url
set - the secret data NOT modified -
OK - deployed out if rancher with
rancher.url
set - the secret data modified -
OK - deployed in rancher - the CORS field not present anymore - the secret data modified
-
OK - prev. released E version deployed in rancher -> upgrade from CLI by using the values.yaml from rancher installation extended by
rancher.url
- the secret data modified -
OK - prev. released E version deployed in rancher -> upgrade from CLI by using the values.yaml from rancher installation without
rancher.url
- the secret data modified -
OK - prev. released E version deployed in rancher -> upgrade from CLI by using the values.yaml from rancher installation without
rancher.url
andglobal.cattle.url
- the secret data NOT modified -
OK - upgraded over CLI to the chart under test with removed
global.cattle.url
- the secret data doesn't contain therancher-dashboard
client anymore
All good including questions.yml, the CORS field is gone but the URL is rendered correctly when installed over rancher.
|
@richard-cox yes, it is: |
@andreas-kupries , @enrichman unless there are objections i'll merge this tomorrow AM |
I will be very happy so see this merged! Thanks @richard-cox |
rancher.url