Skip to content

Console and Google authentication improvements - #2536

Open
sesposito wants to merge 5 commits into
masterfrom
spe/console-acl-improvements
Open

Console and Google authentication improvements#2536
sesposito wants to merge 5 commits into
masterfrom
spe/console-acl-improvements

Conversation

@sesposito

@sesposito sesposito commented Aug 3, 2026

Copy link
Copy Markdown
Member

Resolves #2530 #2529

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.

Comment thread social/social.go
Comment thread server/console_user.go
@sesposito
sesposito requested a review from mofirouz August 3, 2026 10:43
@sesposito
sesposito force-pushed the spe/console-acl-improvements branch from 9073f6e to 8dbdb12 Compare August 4, 2026 14:58
The shared password is optional with StoreKit v2 receipts, so it
is only needed to validate legacy receipts.

Resolves #2529
@sesposito
sesposito force-pushed the spe/console-acl-improvements branch from a55cc8c to 348a829 Compare August 4, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue: Google voided-subscription RTDN causes nil-pointer panic in googleNotificationHandler; Pub/Sub retries turn one refund into sustained panic spam

2 participants