Console and Google authentication improvements - #2536
Open
sesposito wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens authentication/authorization behavior in two areas: (1) Google ID token validation now restricts accepted aud/azp claims to configured OAuth client IDs, while preserving the auth-code exchange flow; (2) console user management now enforces ACL constraints for user creation and password resets, including race-safe authorization by locking the target row.
Changes:
- Add configurable Google OAuth client ID allowlist and enforce it during Google ID token verification (
aud/azp). - Prevent exchanging JWT-shaped strings at the Google auth-code exchange endpoint; improve debug logging on validation failures.
- Enforce console ACL constraints when creating users and when resetting passwords (with transaction-row locking), with new test coverage.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| social/social.go | Adds accepted Google client ID set, enforces aud/azp, and avoids exchanging JWT-shaped values. |
| social/google_token_audience_test.go | Adds coverage for Google aud/azp validation and auth-code flow behavior. |
| server/console_user.go | Adds ACL grant validation on user creation; adds target ACL authorization + row lock in password reset. |
| server/console_user_reset_password_acl_test.go | Adds tests ensuring password reset authorizes against target ACL before updating. |
| server/console_user_add_acl_test.go | Adds tests ensuring AddUser rejects invalid ACL grants before side effects. |
| server/config.go | Adds google_auth.client_ids config + deep clone support. |
| server/config_test.go | Adds tests for parsing and cloning google_auth.client_ids. |
| main.go | Wires configured Google client IDs into the social client. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sesposito
force-pushed
the
spe/console-acl-improvements
branch
from
August 4, 2026 14:58
9073f6e to
8dbdb12
Compare
The shared password is optional with StoreKit v2 receipts, so it is only needed to validate legacy receipts. Resolves #2529
sesposito
force-pushed
the
spe/console-acl-improvements
branch
from
August 4, 2026 15:06
a55cc8c to
348a829
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #2530 #2529