-
Notifications
You must be signed in to change notification settings - Fork 26
feat: add basic and OAuth authentication #611
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
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #611 +/- ##
==========================================
- Coverage 38.21% 36.41% -1.81%
==========================================
Files 84 89 +5
Lines 6303 6615 +312
==========================================
Hits 2409 2409
- Misses 3720 4032 +312
Partials 174 174 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b9b4300 to
0329425
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.
Pull Request Overview
This PR introduces Basic and OAuth authentication across the UI and API, adds session management on the server, and updates documentation and Helm charts for new auth settings.
- Adds profile picture display with initials fallback and settings toggle in UI
- Implements Basic and OIDC auth handlers, session middleware, and auth routes on the server
- Updates docs, mkdocs navigation, and Helm values/templates to configure OIDC and sessions
Reviewed Changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/src/components/misc/ProfilePicture.tsx | Fetches user info, shows picture or initials, toggles settings menu |
| ui/src/components/core/Button.tsx | Added type prop to buttons |
| ui/src/components/buttons/SSOButton.tsx | New SSO login button wrapping core Button |
| ui/src/clients/auth/client.ts | Client methods for login, auth type, and user info |
| ui/src/App.tsx | Configured React Query defaults to handle 401 redirects |
| mkdocs.yml | Added user-authentication.md to documentation nav |
| internal/server/utils/sessions.go | Session cookie removal and invalidation helpers |
| internal/server/utils/logger.go | Request logger config logging user email |
| internal/server/server.go | Session store setup, static asset skipper, auth routes & middleware |
| internal/server/auth/oauth/oauth.go | OIDC provider setup, login and callback handlers |
| internal/server/auth/basic/basic.go | Basic auth secret generation and login handler |
| internal/server/auth/auth.go | Logout and user info endpoint |
| internal/burrito/config/config.go | Added OIDC and session config types |
| go.mod | Updated dependency versions |
| docs/operator-manual/user-authentication.md | New guide for Basic and OIDC authentication |
| docs/guides/ui.md | Added authentication section to UI guide |
| deploy/charts/burrito/values.yaml | Default OIDC and session values |
| deploy/charts/burrito/templates/rbac-server.yaml | Granted controller access to secrets |
| deploy/charts/burrito/templates/controllers.yaml | Removed hardcoded main-namespace env var |
| deploy/charts/burrito/templates/config.yaml | Injected mainNamespace into controller config |
Comments suppressed due to low confidence (2)
internal/server/server.go:18
- [nitpick] The import alias
ais ambiguous. Rename it toauthfor clarity and consistency.
a "github.com/padok-team/burrito/internal/server/auth"
internal/server/server.go:218
- [nitpick] Consider adding unit or integration tests to cover
authMiddleware, verifying behavior for authenticated and unauthenticated requests.
func (s *Server) authMiddleware() echo.MiddlewareFunc {
0329425 to
330244e
Compare
Co-authored-by: Copilot <[email protected]>
82fef8d to
47b2374
Compare
This PR adds authentication methods to secure both the UI and API.
Available methods are Basic Auth (with a randomly generated password set in a k8s secret on first server startup) and OAuth.
SAML auth should be added in an other PR.
This PR does not implement any authorization mechanism. Any user that is able to login with the configured OIDC provider has full access to the UI and API.
The helm interface for configuring oidc is as follows:
The OAuth authentication flow was tested with Google Auth Platform. Other non-standard OIDC providers might not work with the exposed interface. In such cases the interface should be updated.
Login page:

Main page as logged in user:
