Skip to content

Antalya 26.3: OAuth improvements#1799

Draft
zvonand wants to merge 2 commits into
antalya-26.3from
improvement/antalya-26.3/oauth-polish
Draft

Antalya 26.3: OAuth improvements#1799
zvonand wants to merge 2 commits into
antalya-26.3from
improvement/antalya-26.3/oauth-polish

Conversation

@zvonand
Copy link
Copy Markdown
Collaborator

@zvonand zvonand commented May 15, 2026

Follow-up for #1784

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Various token-based auth improvements

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Performance tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All with Aarch64
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

zvonand and others added 2 commits May 15, 2026 13:00
Add a "Mapping groups to ClickHouse roles" subsection under Entra that
covers the three practical paths: App Roles (preferred), formatting the
`groups` claim via `optionalClaims` (`sam_account_name`,
`cloud_displayname`, etc.), and `roles_mapping` as a GUID-only fallback.
Note the `roles_filter` retuning needed when switching from GUIDs to names.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When `token_introspection_endpoint` is configured together with
`introspection_client_id` / `introspection_client_secret`, the openid
processor sends an RFC 7662 introspection probe before falling through
to `/userinfo`. The response is authoritative for liveness (`active`),
expiry (`exp` bounds the cache TTL), and operator-pinned `iss`/`aud`
bindings. The probe runs whenever it's configured, including alongside
the JWT fast-path -- JWT validates signature and `exp`, introspection
adds the revocation check the JWT path cannot do.

Also adds `Accept: application/json` to the userinfo GET, surfaces
introspection HTTP failures at WARNING (was TRACE), and warns when the
IdP returns a malformed `exp` instead of silently dropping it.

Parser: new keys `introspection_client_id` / `introspection_client_secret`
(both must be set together); `expected_issuer` / `expected_audience` are
now accepted in manual mode when introspection is wired (they're
enforced against the introspection response). The manual-mode branch
also rejects keys that would silently no-op (`jwks_uri`,
`allow_no_expiration`, `verifier_leeway`, `jwks_cache_lifetime`).

Tests: three new Keycloak integration tests, each on a dedicated
single-processor node so successful auth is provably the introspection
path:
- manual-mode happy-path + revocation
- discovery-mode happy-path + revocation, using a tiny nginx-served
  mock OIDC doc that points back at real Keycloak but omits `jwks_uri`
  (Keycloak always advertises one, so the JWKS-less discovery branch
  is otherwise unreachable end-to-end)
- bad-secret rejection (strict default: no silent fallback to userinfo)

Test helpers pin `Host: keycloak:8080` on the backchannel calls so
Keycloak issues tokens whose `iss` matches the URL ClickHouse uses to
introspect them; existing tests keep the host-mapped URL so the
device-flow HTML traversal still works.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zvonand zvonand added port-antalya PRs to be ported to all new Antalya releases antalya-26.3 labels May 15, 2026
@github-actions
Copy link
Copy Markdown

Workflow [PR], commit [dc80518]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

antalya-26.3 port-antalya PRs to be ported to all new Antalya releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant