Skip to content

[BUG] Groups-only OAuth access still denied under ACLS_POLICY=deny #1016

Description

@zhorvath83

Describe the Bug

After upgrading to v5.1, apps configured with only OAUTH_GROUPS (no OAUTH_WHITELIST) deny all OAuth users.

On v5.1.1-rc.1 the problem is only partially fixed: it works with the default allow policy, but with TINYAUTH_AUTH_ACLS_POLICY=deny the exact original symptom is still present. An app that has only OAUTH_GROUPS set (no per-app OAUTH_WHITELIST) denies every OAuth user — including users who are members of the allowed group. The /.*/ whitelist workaround from #1009 is still required per app.

Possibly related: with a deny policy and no global OAUTH_WHITELIST, login itself is also refused ("Email not whitelisted") until a global OAUTH_WHITELIST=/.*/ is set. This one may well be intended deny-by-default for login, but it looks like the same "empty whitelist" handling, so I'm noting it in case the two are meant to behave consistently.

How to Reproduce

  1. TINYAUTH_AUTH_ACLS_POLICY=deny
  2. Configure an app with a group ACL and no whitelist:
    TINYAUTH_APPS_MYAPP_CONFIG_DOMAIN=myapp.example.org
    TINYAUTH_APPS_MYAPP_OAUTH_GROUPS=myapp_users
    
  3. Log in as an OAuth user who is a member of myapp_users.
  4. Result: access denied — "User is not allowed to access resource".
  5. Add TINYAUTH_APPS_MYAPP_OAUTH_WHITELIST=/.*/ → access works again (the [BUG] OAuth groups access control broken in v5.1.0 - empty app OAuth whitelist denies access #1009 workaround).
  6. For contrast, set TINYAUTH_AUTH_ACLS_POLICY=allow with the step-2 config → access works.

Expected Behavior

Setting only OAUTH_GROUPS should be enough — an OAuth user in the allowed group should be permitted regardless of ACLS_POLICY, without also having to set OAUTH_WHITELIST (or /.*/).
The empty-whitelist = "not configured" behavior from #1010 should apply under a deny policy too, at both the login gate and the per-app check.

Additional Context

  • Reproduced on v5.1.1-rc.1 (distroless), Kubernetes + Pocket-ID as the OIDC provider.
  • With ACLS_POLICY=deny, working config currently requires both a global OAUTH_WHITELIST=/.*/ and a per-app OAUTH_WHITELIST=/.*/ on every app, on top of the intended OAUTH_GROUPS.

Logs

Per-app check:

{"level":"warn","stream":"app","user":"<user>","resource":"<host>","message":"User is not allowed to access resource"}

Login gate:

{"level":"warn","stream":"app","email":"<email>","message":"Email not whitelisted, denying access"}
{"level":"warn","stream":"audit","event":"login","result":"failure","reason":"email not whitelisted"}

Operating System

macOS

Browser

Arc

Tinyauth Version

v5.1.1-rc.1

Docker Version (if applicable)

K8s

Human Written Confirmation

  • I confirm this issue was written by me and not generated by an LLM or AI assistant.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions