- 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.
192 lines
6.2 KiB
YAML
192 lines
6.2 KiB
YAML
# HydraOAuth2Client CRDs for La Suite Numérique apps.
|
|
# Hydra Maester watches these and creates K8s Secrets (named by .spec.secretName)
|
|
# in the lasuite namespace with CLIENT_ID and CLIENT_SECRET keys.
|
|
# App pods reference those secrets for OIDC_RP_CLIENT_ID/SECRET env vars.
|
|
# redirectUris contain DOMAIN_SUFFIX which is replaced by sed at deploy time.
|
|
|
|
# ── Docs ─────────────────────────────────────────────────────────────────────
|
|
apiVersion: hydra.ory.sh/v1alpha1
|
|
kind: OAuth2Client
|
|
metadata:
|
|
name: docs
|
|
namespace: lasuite
|
|
spec:
|
|
clientName: Docs
|
|
grantTypes:
|
|
- authorization_code
|
|
- refresh_token
|
|
responseTypes:
|
|
- code
|
|
scope: openid email profile
|
|
redirectUris:
|
|
- https://docs.DOMAIN_SUFFIX/api/v1.0/callback/
|
|
postLogoutRedirectUris:
|
|
- https://docs.DOMAIN_SUFFIX/api/v1.0/logout-callback/
|
|
tokenEndpointAuthMethod: client_secret_post
|
|
secretName: oidc-docs
|
|
skipConsent: true
|
|
---
|
|
# ── Drive ─────────────────────────────────────────────────────────────────────
|
|
apiVersion: hydra.ory.sh/v1alpha1
|
|
kind: OAuth2Client
|
|
metadata:
|
|
name: drive
|
|
namespace: lasuite
|
|
spec:
|
|
clientName: Drive
|
|
grantTypes:
|
|
- authorization_code
|
|
- refresh_token
|
|
responseTypes:
|
|
- code
|
|
scope: openid email profile
|
|
redirectUris:
|
|
- https://drive.DOMAIN_SUFFIX/oidc/callback/
|
|
tokenEndpointAuthMethod: client_secret_post
|
|
secretName: oidc-drive
|
|
skipConsent: true
|
|
---
|
|
# ── Meet ─────────────────────────────────────────────────────────────────────
|
|
apiVersion: hydra.ory.sh/v1alpha1
|
|
kind: OAuth2Client
|
|
metadata:
|
|
name: meet
|
|
namespace: lasuite
|
|
spec:
|
|
clientName: Meet
|
|
grantTypes:
|
|
- authorization_code
|
|
- refresh_token
|
|
responseTypes:
|
|
- code
|
|
scope: openid email profile
|
|
redirectUris:
|
|
- https://meet.DOMAIN_SUFFIX/oidc/callback/
|
|
tokenEndpointAuthMethod: client_secret_post
|
|
secretName: oidc-meet
|
|
skipConsent: true
|
|
---
|
|
# ── Conversations (chat) ──────────────────────────────────────────────────────
|
|
apiVersion: hydra.ory.sh/v1alpha1
|
|
kind: OAuth2Client
|
|
metadata:
|
|
name: conversations
|
|
namespace: lasuite
|
|
spec:
|
|
clientName: Chat
|
|
grantTypes:
|
|
- authorization_code
|
|
- refresh_token
|
|
responseTypes:
|
|
- code
|
|
scope: openid email profile
|
|
redirectUris:
|
|
- https://chat.DOMAIN_SUFFIX/oidc/callback/
|
|
tokenEndpointAuthMethod: client_secret_post
|
|
secretName: oidc-conversations
|
|
skipConsent: true
|
|
---
|
|
# ── Messages (mail) ───────────────────────────────────────────────────────────
|
|
apiVersion: hydra.ory.sh/v1alpha1
|
|
kind: OAuth2Client
|
|
metadata:
|
|
name: messages
|
|
namespace: lasuite
|
|
spec:
|
|
clientName: Mail
|
|
grantTypes:
|
|
- authorization_code
|
|
- refresh_token
|
|
responseTypes:
|
|
- code
|
|
scope: openid email profile
|
|
redirectUris:
|
|
- https://mail.DOMAIN_SUFFIX/oidc/callback/
|
|
tokenEndpointAuthMethod: client_secret_post
|
|
secretName: oidc-messages
|
|
skipConsent: true
|
|
---
|
|
# ── People ────────────────────────────────────────────────────────────────────
|
|
apiVersion: hydra.ory.sh/v1alpha1
|
|
kind: OAuth2Client
|
|
metadata:
|
|
name: people
|
|
namespace: lasuite
|
|
spec:
|
|
clientName: People
|
|
grantTypes:
|
|
- authorization_code
|
|
- refresh_token
|
|
responseTypes:
|
|
- code
|
|
scope: openid email profile
|
|
redirectUris:
|
|
- https://people.DOMAIN_SUFFIX/api/v1.0/callback/
|
|
postLogoutRedirectUris:
|
|
- https://people.DOMAIN_SUFFIX/api/v1.0/logout-callback/
|
|
tokenEndpointAuthMethod: client_secret_post
|
|
secretName: oidc-people
|
|
skipConsent: true
|
|
---
|
|
# ── Find ──────────────────────────────────────────────────────────────────────
|
|
apiVersion: hydra.ory.sh/v1alpha1
|
|
kind: OAuth2Client
|
|
metadata:
|
|
name: find
|
|
namespace: lasuite
|
|
spec:
|
|
clientName: Find
|
|
grantTypes:
|
|
- authorization_code
|
|
- refresh_token
|
|
responseTypes:
|
|
- code
|
|
scope: openid email profile
|
|
redirectUris:
|
|
- https://find.DOMAIN_SUFFIX/oidc/callback/
|
|
tokenEndpointAuthMethod: client_secret_post
|
|
secretName: oidc-find
|
|
skipConsent: true
|
|
---
|
|
# ── Gitea (src) ───────────────────────────────────────────────────────────────
|
|
# Gitea reads OIDC credentials from its config, not K8s env vars.
|
|
# The secret (oidc-gitea) is created here for reference; manually configure
|
|
# Gitea admin with CLIENT_ID/CLIENT_SECRET from this secret.
|
|
# Provider name "hydra" must match the name configured in Gitea's OAuth2 settings.
|
|
apiVersion: hydra.ory.sh/v1alpha1
|
|
kind: OAuth2Client
|
|
metadata:
|
|
name: gitea
|
|
namespace: lasuite
|
|
spec:
|
|
clientName: Gitea
|
|
grantTypes:
|
|
- authorization_code
|
|
- refresh_token
|
|
responseTypes:
|
|
- code
|
|
scope: openid email profile
|
|
redirectUris:
|
|
- https://src.DOMAIN_SUFFIX/user/oauth2/hydra/callback
|
|
tokenEndpointAuthMethod: client_secret_basic
|
|
secretName: oidc-gitea
|
|
skipConsent: true
|
|
---
|
|
# ── Hive (service account) ────────────────────────────────────────────────────
|
|
# Hive uses client_credentials to call Drive API on behalf of the sync service.
|
|
# No user consent or redirect required.
|
|
apiVersion: hydra.ory.sh/v1alpha1
|
|
kind: OAuth2Client
|
|
metadata:
|
|
name: hive
|
|
namespace: lasuite
|
|
spec:
|
|
clientName: Hive
|
|
grantTypes:
|
|
- client_credentials
|
|
responseTypes:
|
|
- token
|
|
scope: openid
|
|
tokenEndpointAuthMethod: client_secret_basic
|
|
secretName: oidc-hive
|