Repository navigation
Commit 5cbd30c
committed
fix(dashboard): re-auth via /oauth2/sign_in so token-proxy mode works
The default 401 handler navigated to /oauth2/start, which only
oauth2-proxy serves. The dashboard gatekeeper runs one of two
mutually-exclusive proxies chosen by the cluster's oidc-enabled flag
(templates/gatekeeper.yaml), and the token-proxy branch registers only
sign_in, sign_out and userinfo under the /oauth2 prefix. There,
/oauth2/start fell through to the catch-all reverse-proxy handler, which
does not re-verify the token: with a present-but-expired cookie it
proxied the request to the console upstream instead of re-authenticating,
so the SPA reloaded, 401'd again and looped.
/oauth2/sign_in is the one entry point both modes implement.
oauth2-proxy's sign_in hands straight off to OAuthStart because the
gatekeeper passes --skip-provider-button, and it resolves rd through the
same app-director, so the OIDC path behaves exactly as before.
token-proxy serves its token form there. rd is not yet honoured by
token-proxy, which lands the user on / after sign-in rather than looping.
Assisted-By: Claude <[email protected]>
Signed-off-by: Myasnikov Daniil <[email protected]>1 parent 7e91698 commit 5cbd30c
2 files changed
Lines changed: 9 additions & 4 deletions
File tree
- packages/system/dashboard/images/console
- apps/console/src/__tests__/k8s-client
- packages/k8s-client/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
132 | 134 | | |
133 | 135 | | |
134 | | - | |
| 136 | + | |
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | | - | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
0 commit comments