feat(argocd): enable OIDC token refresh via refreshTokenThreshold#2026
Conversation
Co-authored-by: rouke-broersma <3595932+rouke-broersma@users.noreply.github.com>
Kubechecks Report
argocd ✅ |
There was a problem hiding this comment.
Pull request overview
This PR configures ArgoCD’s OIDC settings to enable background access-token refresh (available in ArgoCD v3.3.x / argo-helm chart 9.4.4), reducing the chance of user session timeouts while actively using the UI.
Changes:
- Add
refreshTokenThreshold: 5mto ArgoCD’soidc.configvia the chart’sauthentication.oidcvalues.
| clientID: $authentik-credentials:client_id | ||
| clientSecret: $authentik-credentials:client_secret | ||
| requestedScopes: ['openid', 'profile', 'email', 'groups', 'offline_access'] | ||
| refreshTokenThreshold: 5m |
There was a problem hiding this comment.
refreshTokenThreshold needs to be strictly lower than the IdP’s access token lifetime; if Authentik is still on the common/default 5m access-token TTL, setting this to 5m will likely trigger an immediate refresh on most requests (extra load / potential rate-limits) rather than only near expiry. Consider lowering the threshold (e.g. 2m) or explicitly ensuring the Authentik access token lifetime is configured to be >5m, and documenting the constraint inline to avoid future misconfigurations.
| refreshTokenThreshold: 5m | |
| refreshTokenThreshold: 2m # must be strictly lower than Authentik access token TTL (5m by default) |
ArgoCD v3.3 added background OIDC token refresh (argoproj/argo-cd#23727), preventing session timeouts when users are active but their access token expires. The helm chart
9.4.4(appVersion: v3.3.2) already includes this feature — it just needs to be configured.Changes
apps/cluster/argocd/values.yaml: AddedrefreshTokenThreshold: 5mtoauthentication.oidcThe
offline_accessscope was already requested, so ArgoCD has a refresh token available. This setting activates its use.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
argo-cd.readthedocs.io/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)argoproj.github.io/usr/local/bin/helm helm dependency build(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.