Files
sbbb/base/devtools/vault-secrets.yaml
Sienna Meridian Satterwhite 7ffddcafcd fix(ory,lasuite): harden session security and fix logout + WebSocket routing
- Fix Hydra postLogoutRedirectUris for docs and people to match the
  actual URI sent by mozilla_django_oidc v5 (/api/v1.0/logout-callback/)
  instead of the root URL, resolving 599 logout errors.

- Fix docs y-provider WebSocket backend port: use Service port 443
  (not pod port 4444 which has no DNAT rule) in Pingora config.

- Tighten VSO VaultDynamicSecret rotation sync: add allowStaticCreds:true
  and reduce refreshAfter from 1h to 5m across all static-creds paths
  (kratos, hydra, gitea, hive, people, docs) so credential rotation is
  reflected within 5 minutes instead of up to 1 hour.

- Set Hydra token TTLs: access_token and id_token to 5m; refresh_token
  to 720h (30 days). Kratos session carries silent re-auth so the short
  access token TTL does not require users to log in manually.

- Set SESSION_COOKIE_AGE=3600 (1h) in docs and people backends. After
  1h, apps silently re-auth via the active Kratos session. Disabled
  identities (sunbeam user disable) cannot re-auth on next expiry.
2026-03-03 18:07:08 +00:00

84 lines
1.8 KiB
YAML

---
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultAuth
metadata:
name: vso-auth
namespace: devtools
spec:
method: kubernetes
mount: kubernetes
kubernetes:
role: vso
serviceAccount: default
---
# Gitea DB credentials from OpenBao database secrets engine (static role, 24h rotation).
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultDynamicSecret
metadata:
name: gitea-db-credentials
namespace: devtools
spec:
vaultAuthRef: vso-auth
mount: database
path: static-creds/gitea
allowStaticCreds: true
refreshAfter: 5m
rolloutRestartTargets:
- kind: StatefulSet
name: gitea
destination:
name: gitea-db-credentials
create: true
overwrite: true
transformation:
excludeRaw: true
templates:
password:
text: "{{ index .Secrets \"password\" }}"
---
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultStaticSecret
metadata:
name: gitea-s3-credentials
namespace: devtools
spec:
vaultAuthRef: vso-auth
mount: secret
type: kv-v2
path: seaweedfs
refreshAfter: 30s
destination:
name: gitea-s3-credentials
create: true
overwrite: true
transformation:
excludeRaw: true
templates:
"access-key":
text: "{{ index .Secrets \"access-key\" }}"
"secret-key":
text: "{{ index .Secrets \"secret-key\" }}"
---
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultStaticSecret
metadata:
name: gitea-admin-credentials
namespace: devtools
spec:
vaultAuthRef: vso-auth
mount: secret
type: kv-v2
path: gitea
refreshAfter: 30s
destination:
name: gitea-admin-credentials
create: true
overwrite: true
transformation:
excludeRaw: true
templates:
username:
text: "{{ index .Secrets \"admin-username\" }}"
password:
text: "{{ index .Secrets \"admin-password\" }}"