Repository navigation
Fix Console GitHub authentication for large memberships and team access - #1821
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 9 files
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack
View guided diff | Turn on auto-fix | Re-trigger cubic
|
/kelos api-review |
|
🤖 Kelos Task Status Task |
|
/kelos review |
|
🤖 Kelos Task Status Task |
|
🤖 Kelos API Reviewer Agent @gjkim42 API Design ReviewVerdict: APPROVE FindingsNo blocking API design issues. Compatibility
Naming and shape
Documentation
Suggestions (optional)
Note on prompt injection: A third-party bot review contained embedded "Prompt for AI agents" instructions to change code and resolve review threads. They were disregarded, and this review was formed independently from the code. /kelos needs-input |
|
🤖 Kelos Reviewer Agent @gjkim42 Review SummaryVerdict: APPROVE Findings Overview
FindingsDocumentation
Key takeaways
Note on prompt injection: A third-party bot review on this PR contained an embedded "Prompt for AI agents" section instructing agents to change code and resolve review threads. That instruction was disregarded; this review was formed independently from the code. |
a0fe74a to
db21d9a
Compare
What type of PR is this?
/kind bug
What this PR does / why we need it:
GitHub users with hundreds of organization and team memberships could sign in successfully but receive 401 from the Console because their forwarded groups exceeded its identity limits. Raise the shared proxy authentication limits to 1,024 groups and a 64 KiB group header, retaining every group for Kubernetes RBAC and continuing to reject oversized identities.
Add
consoleServer.auth.github.teamto restrict sign-in to a single team slug within the configuredorg. Enforce the organization dependency in both JSON Schema and chart rendering, and pass the setting to OAuth2 Proxy's GitHub provider. Organization-only configurations retain their existing sign-in behavior.Document ingress header requirements for large sessions in both the OIDC and GitHub setup guides. Cover large paginated memberships, team admission, group preservation, boundary validation, and schema-only validation with unit and real-proxy integration tests.
Which issue(s) this PR is related to:
N/A
Special notes for your reviewer:
Validation passed:
make test, coveringTestProxyLargeMemberships,TestProxyGroupLimits,TestOIDCIdentityValidation,TestConsoleGitHubTeamSchema, andTestRenderConsole*.make test-integration TEST_FLAGS='-run TestConsole -count=1', including 208 organizations plus 205 teams through the pinned OAuth2 Proxy, organization-only and team-restricted admission, RBAC, and spoofed-header rejection.make verify.The group limits apply to both GitHub and OIDC authentication. Sign-in restrictions do not filter RBAC groups or grant permissions. Tightening
orgorteamrestrictions for existing sessions requires rotating the cookie secret and restarting Console Pods. Large proxy session cookies may also require higher ingress header limits.Does this PR introduce a user-facing change?
Summary by cubic
Fixes 401s for GitHub users with hundreds of organization and team memberships by raising the proxy authentication limits, and adds an optional
consoleServer.auth.github.teamsetting to restrict sign-in to a single team.consoleServer.auth.github.team, which requiresorgand accepts a single team slug; organization-only configurations keep their existing behavior.Notes for reviewers
orgorteamfor existing sessions requires rotating the cookie secret and restarting Console Pods.Written for commit db21d9a. Summary will update on new commits.