Repository navigation
Split AUTH_SECRET into its own ExternalSecret for group-wishlist - #356
Merged
Merged
Conversation
The Password generator backing AUTH_SECRET re-ran on every refreshInterval tick of the combined app-secrets ExternalSecret, rotating the value hourly under already-running pods and invalidating every active session. Giving it a dedicated ExternalSecret with refreshInterval: 0 generates it once, while app-secrets keeps syncing the 1Password-sourced Google OAuth creds normally. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Argo CD Diff PreviewSummary: Modified (1):
± sandbox-oci-group-wishlist (+21|-6)sandbox-oci-group-wishlist (applications/appset-ops-tools.yaml)ExternalSecret: app-secrets name: app-secrets
spec:
dataFrom:
- - sourceRef:
- generatorRef:
- apiVersion: generators.external-secrets.io/v1alpha1
- kind: Password
- name: auth-secret
- extract:
key: group-wishlist-config
secretStoreRef:
@@ skipped 5 lines (14 -> 18) @@
data:
AUTH_GOOGLE_ID: '{{ .AUTH_GOOGLE_ID }}'
AUTH_GOOGLE_SECRET: '{{ .AUTH_GOOGLE_SECRET }}'
- AUTH_SECRET: '{{ .authSecretRaw | b64enc }}'
type: OpaqueExternalSecret: auth-secret+apiVersion: external-secrets.io/v1
+kind: ExternalSecret
+metadata:
+ name: auth-secret
+spec:
+ dataFrom:
+ - sourceRef:
+ generatorRef:
+ apiVersion: generators.external-secrets.io/v1alpha1
+ kind: Password
+ name: auth-secret
+ refreshInterval: 0
+ secretStoreRef:
+ kind: ClusterSecretStore
+ name: 1password
+ target:
+ name: auth-secret
+ template:
+ data:
+ AUTH_SECRET: '{{ .authSecretRaw | b64enc }}'
+ type: OpaqueStats: |
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AUTH_SECRETwas templated into the sameapp-secretsExternalSecret as the 1Password-sourced Google OAuth creds, sourced from a statelessPasswordgenerator. Since generators re-run on every reconcile, everyrefreshIntervaltick (1h) minted a brand-newAUTH_SECRET, silently rotating the Secret under already-running pods and invalidating every active Auth.js JWT session roughly once an hour.AUTH_SECRETinto its ownauth-secretExternalSecret withrefreshInterval: 0, so it's generated once and left alone.app-secretsnow only carriesAUTH_GOOGLE_ID/AUTH_GOOGLE_SECRETfrom 1Password and keeps syncing normally, so those can still rotate live.Test plan
helm template charts/group-wishlistrenders both ExternalSecrets correctlyauth-secretSecret in thegroup-wishlistnamespaceauth-secretSecret forAUTH_SECRET🤖 Generated with Claude Code