feat(dashboard): add token-based authentication support#4668
feat(dashboard): add token-based authentication support#4668matanbaruch wants to merge 2 commits intoargoproj:masterfrom
Conversation
da2a399 to
c4c3970
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #4668 +/- ##
==========================================
+ Coverage 84.94% 85.73% +0.79%
==========================================
Files 164 166 +2
Lines 18954 19290 +336
==========================================
+ Hits 16100 16539 +439
+ Misses 2000 1880 -120
- Partials 854 871 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Published E2E Test Results 4 files 4 suites 4h 3m 3s ⏱️ For more details on these failures, see this check. Results for commit 74a8879. ♻️ This comment has been updated with latest results. |
Published Unit Test Results2 571 tests 2 571 ✅ 3m 19s ⏱️ Results for commit 74a8879. ♻️ This comment has been updated with latest results. |
988c8fe to
3844066
Compare
Signed-off-by: matanbaruch <[email protected]>
3844066 to
7c421f0
Compare
|
Hey @zachaller @kostis-codefresh, would love your eyes on this when you get a chance! This addresses #1323 (Dashboard Authentication), which has been one of the most requested features since mid-2021. The lack of auth on the dashboard has been a real blocker for teams wanting to expose it beyond localhost. The implementation adds optional token-based auth with per-user Kubernetes RBAC enforcement, plus OIDC SSO support all fully backward compatible (default behavior is unchanged). All CI checks are green and test coverage is solid. Really appreciate all the work you both do keeping this project moving, happy to address any feedback! |
|
Hello Regarding the feature itselfFrom issue 1323 please take a look at the comments that talk about scope, complexity and maintenance Basically, we want to keep the controller simple and minimal. Security (Authentication and authorization) features are not something to be taken lightly. We have already seen the burden of handling these features in Argo CD, and we know firsthand how quickly the scope can change according to different user needs. Specifically for authentication there are already many other projects such as external proxies, service meshes and api gateways that can handle this feature with a shared and battle hardened implementation. There is a separate effort to move Argo Rollouts to a plugin based architecture exactly to allow people to extend Argo Rollouts on their own while keeping the core code as lean as possible. Adding RBAC and authentication to the controller itself would be against this paradigm. Regarding the codeThis PR seems to be 100% AI generated and doesn't even show our minimum requirements as outlined in the PR template. We are also very hesitant on accepting any security related feature that is entirely generated by AI. See also the general stance of the project on this matter. The way forwardIf you want to continue your contribution please open a brand new PR that contains only the token passing feature. But please follow the guidelines from the PR template as outlined above. And just to be clear this will only meet the minimum requirements for getting a review. It does not mean we will automatically merge it. |
|



Summary
Adds optional authentication to the Argo Rollouts dashboard with Bearer token auth, OIDC SSO (Okta, Google, Azure AD, Keycloak, etc.), and per-user Kubernetes RBAC enforcement. Closes #1323.
Features
--auth-mode token— requires a valid Kubernetes bearer token for API access--oidc-issuer-url,--oidc-client-id, etc.TokenReviewAPI with caching--auth-mode server) is unchanged — fully backward compatibleUsage
How RBAC works
When
--auth-mode=tokenis set, the server creates per-request Kubernetes clients using the user's bearer token. This means:getpermissions on rollouts can view but not modify themupdatepermissions can promote/abort/restartFiles changed
server/auth.goserver/oidc.goserver/server.goAuthMode,RESTConfiginServerOptions, per-request client creation viagetClients(), all handlers updateddashboard.go--auth-mode,--oidc-*flags, REST config passthroughkubectl-argo-rollouts_dashboard.mdgo run ./hack/gen-docs/main.goauth.tsx,api.tsxlogin.tsx,login.scss,App.tsx,header.tsxwatch.tsauth_test.go,oidc_test.goTest plan
go test ./server/...— 85 tests)go build ./...)yarn build)go run ./hack/gen-docs/main.go)--auth-mode tokenshows login page, valid token grants access