Commit fc40cb0
committed
Add GCP OAuth authentication support for GKE clusters
This implementation adds GCP OAuth 2.0 authentication to Headlamp for
Google Kubernetes Engine (GKE) deployments, replacing the deprecated
Identity Service for GKE.
Features:
- OAuth 2.0 authentication flow with Google
- PKCE (Proof Key for Code Exchange) support for enhanced security
- Automatic token refresh mechanism
- GKE cluster detection and automatic OAuth enablement
- "Sign in with Google" button in authentication chooser
- Comprehensive GKE deployment documentation with RBAC examples
Backend Changes:
- New GCP authenticator package (backend/pkg/gcp/auth.go)
- OAuth route handlers (/gcp-auth/login, /gcp-auth/callback, /gcp-auth/refresh)
- Configuration support via environment variables
- Token caching and refresh logic
Frontend Changes:
- GCPLoginButton component for Google sign-in
- Modified auth chooser to show OAuth option
- GKE cluster detection utilities
Documentation:
- Complete GKE setup guide with step-by-step instructions
- Architecture overview and authentication flow documentation
- RBAC configuration examples
- Troubleshooting guide1 parent 56a1508 commit fc40cb0
File tree
15 files changed
+2113
-27
lines changed- backend
- cmd
- pkg
- auth
- config
- gcp
- docs
- frontend/src
- components
- authchooser
- cluster
- lib/k8s
15 files changed
+2113
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
| |||
457 | 463 | | |
458 | 464 | | |
459 | 465 | | |
460 | | - | |
461 | | - | |
462 | | - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
463 | 477 | | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
468 | 482 | | |
469 | | - | |
470 | | - | |
471 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
472 | 487 | | |
473 | 488 | | |
474 | 489 | | |
| |||
884 | 899 | | |
885 | 900 | | |
886 | 901 | | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
887 | 930 | | |
888 | 931 | | |
889 | 932 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
128 | 133 | | |
129 | 134 | | |
130 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
151 | | - | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
661 | 663 | | |
662 | 664 | | |
663 | 665 | | |
664 | | - | |
665 | | - | |
| 666 | + | |
| 667 | + | |
666 | 668 | | |
667 | 669 | | |
668 | 670 | | |
| |||
0 commit comments