Files
sbbb/base/lasuite/oidc-clients.yaml
Sienna Meridian Satterwhite 50a4abf94f fix(ory): harden Kratos and Hydra production security configuration
Kratos: xchacha20-poly1305 cipher for at-rest encryption, 12-char min
password with HaveIBeenPwned + similarity check, recovery/verification
switched to code (not link), anti-enumeration on unknown recipients,
15m privileged session, 24h session extend throttle, JSON structured
logging, WebAuthn passwordless enabled, additionalProperties: false on
all identity schemas, memory limits bumped to 256Mi.

Hydra: expose_internal_errors disabled, PKCE enforced for public
clients, janitor CronJob every 6h, cookie domain set explicitly,
SSRF prevention via disallow_private_ip_ranges, JSON structured
logging, Maester enabledNamespaces includes monitoring.

Also: fixed selfservice URL patch divergence (settings path, missing
allowed_return_urls), removed invalid responseTypes on Hive client.
2026-03-24 19:40:58 +00:00

177 lines
5.9 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.
# ── 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/api/v1.0/callback/
postLogoutRedirectUris:
- https://drive.DOMAIN_SUFFIX/api/v1.0/logout-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/api/v1.0/callback/
postLogoutRedirectUris:
- https://meet.DOMAIN_SUFFIX/api/v1.0/logout-callback/
tokenEndpointAuthMethod: client_secret_post
secretName: oidc-meet
skipConsent: true
---
# ── Conversations (chat) — replaced by Tuwunel in matrix namespace ───────────
# OAuth2Client for tuwunel is in base/matrix/hydra-oauth2client.yaml
---
# ── 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 offline_access
redirectUris:
- https://mail.DOMAIN_SUFFIX/api/v1.0/callback/
postLogoutRedirectUris:
- https://mail.DOMAIN_SUFFIX/api/v1.0/logout-callback/
tokenEndpointAuthMethod: client_secret_post
secretName: oidc-messages
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/Sunbeam/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
scope: openid
tokenEndpointAuthMethod: client_secret_basic
secretName: oidc-hive
---
# ── Calendars ────────────────────────────────────────────────────────────────
apiVersion: hydra.ory.sh/v1alpha1
kind: OAuth2Client
metadata:
name: calendars
namespace: lasuite
spec:
clientName: Calendars
grantTypes:
- authorization_code
- refresh_token
responseTypes:
- code
scope: openid email profile
redirectUris:
- https://cal.DOMAIN_SUFFIX/api/v1.0/callback/
postLogoutRedirectUris:
- https://cal.DOMAIN_SUFFIX/api/v1.0/logout-callback/
tokenEndpointAuthMethod: client_secret_post
secretName: oidc-calendars
skipConsent: true
---
# ── Projects (Kanban) ──────────────────────────────────────────────────────
apiVersion: hydra.ory.sh/v1alpha1
kind: OAuth2Client
metadata:
name: projects
namespace: lasuite
spec:
clientName: Projects
grantTypes:
- authorization_code
- refresh_token
responseTypes:
- code
scope: openid email profile
redirectUris:
- https://projects.DOMAIN_SUFFIX/oidc-callback
tokenEndpointAuthMethod: client_secret_basic
secretName: oidc-projects
skipConsent: true