Skip to content

radar-hub: turn on OIDC refresh tokens by default (1.10.0-rc.1) - #57

Merged
nadaverell merged 1 commit into
mainfrom
radar-hub-refresh-token-default
Oct 7, 2026
Merged

nadaverell merged 1 commit into
mainfrom
radar-hub-refresh-token-default

Conversation

@nadaverell

@nadaverell nadaverell commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Why

Hub 1.10.0 includes skyhook-dev/radar-hub#272 (4a8169f). It ends a self-hosted OIDC session at ID-token expiry when the session carries IdP groups and has no refresh token. Before, the hub kept the session and quietly stopped forwarding the groups. The chart today defaults groupsClaim: "groups" with useRefreshToken: false. Upgrading the hub without this change would therefore send every user who is in an IdP group to the sign-in page each time their ID token expires: every 5 minutes on a default Keycloak, every hour on Okta or Entra.

These are the refresh-token parts of #51, split out so they can ship with Hub 1.10.0. auth.oidc.clusterAccess stays in #51 until skyhook-dev/radar-hub-web#326 is ready. Without #326 the value has no effect, and #51's NOTES text would tell admins that new clusters follow the IdP.

What

  • values.yaml: auth.oidc.useRefreshToken defaults to true. The comment explains what happens without a refresh token, by Hub version.
  • NOTES.txt: after every install or upgrade, says whether refresh tokens are on and what the IdP client needs (Okta and Entra: offline_access in scopes).
  • tests/deployment_hub_sessions_test.yaml: the flag is emitted by default and omitted when set to false.
  • Chart.yaml: 1.10.0-rc.1 (a default changes behaviour on upgrade, so a minor). appVersion stays 1.9.1. The Hub v1.10.0 tag promotes the chart to 1.10.0 and sets appVersion: 1.10.0. scripts/next-chart-version.sh returns 1.10.0 against the current tags.

What upgrades see:

  • An IdP that returns no refresh token behaves exactly as with false.
  • Keycloak returns a refresh token by default.
  • Okta and Entra return one only when the admin adds offline_access.
  • helm upgrade --reuse-values keeps the old chart defaults, so such installs stay on false. NOTES prints "Refresh tokens: off" for them. --reset-then-reuse-values picks up the new default.

Test plan

  • helm unittest charts/radar-hub: 20/20
  • charts/radar-hub/tests/render-matrix.sh: all checks passed
  • helm lint and ct lint --target-branch main
  • .github/ci/agent-test.sh: 58 assertions passed
  • NOTES rendered with useRefreshToken true and false

Follow-up for #51: rebase onto this and drop its useRefreshToken and NOTES refresh-token hunks.


Note

Medium Risk
Changing the default alters OIDC session and re-auth behavior on upgrade paths that adopt new values, though IdPs without refresh tokens behave as before and the flag can be set to false.

Overview
Aligns the Helm chart with Hub 1.10.0 OIDC session behavior by defaulting auth.oidc.useRefreshToken to true, so OIDC installs keep IdP groups for the full session.maxLifetime instead of forcing re-login when the ID token expires (a breaking change on Hub 1.10+ when groups are forwarded and refresh is off).

The chart version is bumped to 1.10.0-rc.1 (appVersion unchanged at 1.9.1). values.yaml comments now document token-expiry behavior by Hub version and IdP quirks (e.g. offline_access for Okta/Entra). NOTES.txt prints whether refresh tokens are on and what to configure on the IdP client. Helm unit tests expect RADAR_HUB_OIDC_USE_REFRESH_TOKEN=true by default and omission when explicitly set to false.

Upgrades with --reuse-values keep the previous false default; fresh installs or --reset-then-reuse-values pick up true.

Reviewed by Cursor Bugbot for commit 87a38b5. Bugbot is set up for automated code reviews on this repo. Configure here.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Enable OIDC refresh tokens by default in the radar-hub chart

✨ Enhancement ⚙️ Configuration changes 🧪 Tests 📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Enable refresh tokens by default to preserve group-bearing OIDC sessions beyond ID-token expiry
 when the IdP issues them.
• Explain refresh-token status and IdP requirements in install and upgrade notes.
• Stage chart 1.10.0-rc.1 and test default and explicit opt-out rendering.
Diagram

graph TD
  V["OIDC chart values"] --> G{"OIDC enabled?"} --> E["Refresh env flag"] --> H["Hub sessions"] --> I["OIDC provider"]
  V --> N["Install notes"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Keep refresh tokens opt-in
  • ➕ Avoids changing the chart default for existing OIDC installations.
  • ➖ Leaves group-bearing sessions subject to sign-out at ID-token expiry on Hub 1.10.0 unless each administrator opts in.

Recommendation: Keep the proposed default with the explicit opt-out and IdP guidance. Opt-in would avoid a default change but would leave the Hub 1.10.0 session-expiry problem unresolved for installations that do not configure refresh tokens; Okta and Entra administrators still need to add offline_access.

Files changed (4) +36 / -17

Tests (1) +17 / -11
deployment_hub_sessions_test.yamlCover default refresh flag and explicit opt-out +17/-11

Cover default refresh flag and explicit opt-out

• Asserts that an OIDC deployment emits RADAR_HUB_OIDC_USE_REFRESH_TOKEN by default and omits it when set to false. Retains session-limit and OIDC-gating coverage.

charts/radar-hub/tests/deployment_hub_sessions_test.yaml

Documentation (1) +8 / -0
NOTES.txtReport OIDC refresh-token status after deployment +8/-0

Report OIDC refresh-token status after deployment

• Adds OIDC-specific notes for the enabled and disabled settings. The enabled message identifies the Refresh Token grant and Okta/Entra offline_access requirement.

charts/radar-hub/templates/NOTES.txt

Other (2) +11 / -6
Chart.yamlStage chart version 1.10.0-rc.1 +1/-1

Stage chart version 1.10.0-rc.1

• Bumps the chart version for the changed default. Leaves appVersion at 1.9.1.

charts/radar-hub/Chart.yaml

values.yamlDefault OIDC refresh tokens to enabled +10/-5

Default OIDC refresh tokens to enabled

• Changes auth.oidc.useRefreshToken from false to true. Expands guidance on ID-token expiry, provider requirements, and behavior when no refresh token is issued.

charts/radar-hub/values.yaml

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (1) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Upgrade notes wrongly warn of sign-outs ✓ Resolved
Description
NOTES.txt says sessions carrying IdP groups end at ID-token expiry whenever refresh tokens are
off, but Hub 1.9.1 instead keeps the session and stops forwarding the groups. This chart still
installs Hub 1.9.1 by default, so installs that explicitly disable refresh tokens—and upgrades that
retain the old false value—receive incorrect guidance about their session behavior.
Code

charts/radar-hub/templates/NOTES.txt[R70-71]

+  - Refresh tokens: off. A session carrying IdP groups ends when its ID token
+    expires.
Evidence
The newly added refresh-off note asserts session expiry; the chart's default app version is 1.9.1,
and the values documentation explicitly distinguishes the older Hub behavior.

charts/radar-hub/templates/NOTES.txt[69-72]
charts/radar-hub/Chart.yaml[6-10]
charts/radar-hub/values.yaml[511-516]
charts/radar-hub/templates/deployment-hub.yaml[286-289]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The refresh-off upgrade note describes Hub 1.10.0 behavior while this prerelease chart defaults to Hub 1.9.1, which retains the session and drops forwarded groups instead.
## Fix Focus Areas
- charts/radar-hub/templates/NOTES.txt[69-72]
- charts/radar-hub/Chart.yaml[6-10]
## Recommended Fix
Qualify the refresh-off note by Hub version, accounting for an overridden Hub image tag, or describe both pre-1.10.0 and 1.10.0-and-later behavior without asserting that every session ends at token expiry.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Okta and Entra users reauthenticate 🔗 Cross-repo conflict ≡ Correctness
Description
Setting auth.oidc.useRefreshToken to true does not request offline_access, and radar-hub-web’s
SSO-generated upgrade command and radar-docs’ Okta and Entra recipes omit that scope. On Hub 1.10.0,
users whose sessions carry IdP groups through those configurations receive no refresh token and must
sign in again when their ID token expires.
Code

charts/radar-hub/values.yaml[528]

+    useRefreshToken: true
Evidence
The chart turns on refresh without adding scopes; the web-generated command and provider recipes
omit offline_access, while the Hub requests only explicitly configured extra scopes and caps group
sessions without a refresh token.

helm-charts -> radar-hub-web
helm-charts -> radar-docs
helm-charts -> radar-hub
charts/radar-hub/values.yaml[509-528]
charts/radar-hub/templates/NOTES.txt[65-71]
External repo: skyhook-dev/radar-hub-web, src/pages/settings/OrganizationSSO.tsx [160-170]
External repo: skyhook-dev/radar-docs, cloud/self-hosted/auth.mdx [103-116]
External repo: skyhook-dev/radar-docs, cloud/self-hosted/auth.mdx [137-160]
External repo: skyhook-dev/radar-hub, internal/auth/oidc.go [745-753]
External repo: skyhook-dev/radar-hub, internal/auth/session_store.go [257-280]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new default cannot keep Okta and Entra group sessions alive when the published setup paths omit `offline_access`.
## Fix Focus Areas
- charts/radar-hub/values.yaml[519-528]
- /cross_repos/radar-hub-web/src/pages/settings/OrganizationSSO.tsx[160-170]
- /cross_repos/radar-docs/cloud/self-hosted/auth.mdx[103-116]
- /cross_repos/radar-docs/cloud/self-hosted/auth.mdx[137-160]
## Recommended Fix
Coordinate a radar-hub-web SSO setup option or provider-specific instruction for requesting `offline_access`, and add it to the applicable Okta and Entra documentation recipes. Keep the chart’s warning that the IdP client must permit refresh tokens.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can route each severity your way: inline, summary, both, or drop

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread charts/radar-hub/templates/NOTES.txt Outdated
Comment thread charts/radar-hub/values.yaml
Hub 1.10.0 ends a self-hosted OIDC session that carries IdP groups and has
no refresh token when its ID token expires, instead of keeping it and
silently dropping the groups. With the default groupsClaim and refresh off,
that signs users out every ID token lifetime: 5 minutes on a default
Keycloak, an hour on Okta or Entra. useRefreshToken now defaults to true, so
sessions last session.maxLifetime when the IdP issues a refresh token
(Keycloak does by default; Okta and Entra need offline_access). An IdP that
returns none behaves as before. NOTES says after every install or upgrade
whether refresh tokens are on and what the IdP client needs.

Split out of #51 so it can ship with Hub 1.10.0 ahead of clusterAccess.
Staged as 1.10.0-rc.1 with appVersion unchanged; the Hub v1.10.0 tag
promotes it to 1.10.0.
@nadaverell
nadaverell force-pushed the radar-hub-refresh-token-default branch from 9aecfba to 87a38b5 Compare October 7, 2026 14:05
@nadaverell
nadaverell merged commit 9e69c55 into main Oct 7, 2026
3 checks passed
@nadaverell
nadaverell deleted the radar-hub-refresh-token-default branch October 7, 2026 14:13
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