Skip to content

fix(auth): google:*@domain in --access-users admits the whole domain - #91

Closed
den-vasyliev wants to merge 1 commit into
mainfrom
fix/access-users-domain-wildcard
Closed

den-vasyliev wants to merge 1 commit into
mainfrom
fix/access-users-domain-wildcard

Conversation

@den-vasyliev

Copy link
Copy Markdown
Contributor

--access-users=google:*@example.com was accepted and read literally: it matched no address, so with a list set nobody could sign in, and nothing said so.

  • google:*@<domain> in --access-users admits every address of --google-domain (sign-in only), so a deployment can admit the domain and name its admins in --access-admins.
  • In --access-admins, or with a * anywhere else in an address, or for another domain, start-up fails with a message.
  • A subdomain and a non-ASCII address do not match; a GitHub or Entra session never matches a Google principal.

Tests: TestAccessGrants_DomainWildcardAdmitsTheDomainNotItsAdmins, TestAccessGrants_DomainWildcardIsRefusedWhereItWouldMisleadOrLockOut. ADR-066, README, spec and changelog updated. go test ./... and make lint pass.

With --access-admins set and no users list only the admins could sign in,
so admitting a domain meant naming every address. The wildcard grants
sign-in only. In the admins list, or with a * anywhere else in an address,
start-up fails with a message; before, it was read literally, matched no
address and locked everyone out.
@den-vasyliev

Copy link
Copy Markdown
Contributor Author

Superseded by #88, which does the same with more tests and docs. The wildcard stays out of --access-admins (pushed to #88).

@den-vasyliev
den-vasyliev deleted the fix/access-users-domain-wildcard branch November 21, 2026 02:47
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.

1 participant