mirror of
https://github.com/rubenhensen/k8scd.git
synced 2026-09-17 02:12:55 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 40c620cd58 |
@@ -106,9 +106,6 @@ spec:
|
|||||||
- name: blueprint-actualbudget
|
- name: blueprint-actualbudget
|
||||||
configMap:
|
configMap:
|
||||||
name: authentik-blueprint-actualbudget
|
name: authentik-blueprint-actualbudget
|
||||||
- name: blueprint-session
|
|
||||||
configMap:
|
|
||||||
name: authentik-blueprint-session
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: blueprint-vault
|
- name: blueprint-vault
|
||||||
mountPath: /blueprints/custom/vault-oidc.yaml
|
mountPath: /blueprints/custom/vault-oidc.yaml
|
||||||
@@ -128,9 +125,6 @@ spec:
|
|||||||
- name: blueprint-actualbudget
|
- name: blueprint-actualbudget
|
||||||
mountPath: /blueprints/custom/actualbudget-proxy.yaml
|
mountPath: /blueprints/custom/actualbudget-proxy.yaml
|
||||||
subPath: actualbudget-proxy.yaml
|
subPath: actualbudget-proxy.yaml
|
||||||
- name: blueprint-session
|
|
||||||
mountPath: /blueprints/custom/session-duration.yaml
|
|
||||||
subPath: session-duration.yaml
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
ingressClassName: nginx
|
ingressClassName: nginx
|
||||||
@@ -162,9 +156,6 @@ spec:
|
|||||||
- name: blueprint-actualbudget
|
- name: blueprint-actualbudget
|
||||||
configMap:
|
configMap:
|
||||||
name: authentik-blueprint-actualbudget
|
name: authentik-blueprint-actualbudget
|
||||||
- name: blueprint-session
|
|
||||||
configMap:
|
|
||||||
name: authentik-blueprint-session
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: blueprint-vault
|
- name: blueprint-vault
|
||||||
mountPath: /blueprints/custom/vault-oidc.yaml
|
mountPath: /blueprints/custom/vault-oidc.yaml
|
||||||
@@ -184,9 +175,6 @@ spec:
|
|||||||
- name: blueprint-actualbudget
|
- name: blueprint-actualbudget
|
||||||
mountPath: /blueprints/custom/actualbudget-proxy.yaml
|
mountPath: /blueprints/custom/actualbudget-proxy.yaml
|
||||||
subPath: actualbudget-proxy.yaml
|
subPath: actualbudget-proxy.yaml
|
||||||
- name: blueprint-session
|
|
||||||
mountPath: /blueprints/custom/session-duration.yaml
|
|
||||||
subPath: session-duration.yaml
|
|
||||||
postgresql:
|
postgresql:
|
||||||
enabled: false
|
enabled: false
|
||||||
redis:
|
redis:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ spec:
|
|||||||
sources:
|
sources:
|
||||||
- chart: external-secrets
|
- chart: external-secrets
|
||||||
repoURL: https://charts.external-secrets.io
|
repoURL: https://charts.external-secrets.io
|
||||||
targetRevision: 2.10.0
|
targetRevision: 0.10.7
|
||||||
destination:
|
destination:
|
||||||
server: https://kubernetes.default.svc
|
server: https://kubernetes.default.svc
|
||||||
namespace: external-secrets
|
namespace: external-secrets
|
||||||
|
|||||||
@@ -11,22 +11,6 @@ Authentik is deployed as the central identity provider, providing OIDC and LDAP
|
|||||||
- `blueprint-ldap.yaml` — LDAP provider (base DN: `DC=ldap,DC=goauthentik,DC=io`)
|
- `blueprint-ldap.yaml` — LDAP provider (base DN: `DC=ldap,DC=goauthentik,DC=io`)
|
||||||
- `blueprint-mail-oidc.yaml` — OAuth2/OIDC provider for Stalwart mail
|
- `blueprint-mail-oidc.yaml` — OAuth2/OIDC provider for Stalwart mail
|
||||||
- `blueprint-vault-oidc.yaml` — OIDC provider for Vault
|
- `blueprint-vault-oidc.yaml` — OIDC provider for Vault
|
||||||
- `blueprint-argocd-oidc.yaml` — OIDC provider for ArgoCD
|
|
||||||
- `blueprint-freshrss-oidc.yaml` — OIDC provider for FreshRSS
|
|
||||||
- `blueprint-actualbudget-proxy.yaml` — Proxy provider for Actual Budget
|
|
||||||
- `blueprint-session-duration.yaml` — Session lifetime of the default authentication flow
|
|
||||||
|
|
||||||
## Session lifetime
|
|
||||||
|
|
||||||
Authentik ships the login stage of `default-authentication-flow` with
|
|
||||||
`session_duration: seconds=0`, i.e. the SSO session dies when the browser closes.
|
|
||||||
`blueprint-session-duration.yaml` raises this to 30 days for every app that uses
|
|
||||||
that flow (FreshRSS, ArgoCD, Vault, Actual Budget, mail).
|
|
||||||
|
|
||||||
The expiry is **absolute** — Authentik does not extend a session on activity. A
|
|
||||||
sliding window has to come from the application itself; FreshRSS does this via
|
|
||||||
`OIDC_SESSION_INACTIVITY_TIMEOUT` (see `freshrss/freshrss-deployment.yaml`), which
|
|
||||||
Apache mod_auth_openidc refreshes on every request.
|
|
||||||
|
|
||||||
## LDAP Outpost
|
## LDAP Outpost
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: authentik-blueprint-session
|
|
||||||
data:
|
|
||||||
session-duration.yaml: |
|
|
||||||
version: 1
|
|
||||||
metadata:
|
|
||||||
name: Session duration
|
|
||||||
entries:
|
|
||||||
# Overrides the login stage of the built-in `default-authentication-flow`,
|
|
||||||
# which every OIDC/proxy provider in this cluster authenticates against.
|
|
||||||
# authentik ships this stage with `session_duration: seconds=0`, which means
|
|
||||||
# "until the browser is closed" — that is why re-logins were so frequent.
|
|
||||||
#
|
|
||||||
# Note: authentik's session expiry is absolute (counted from login), it does
|
|
||||||
# not slide on activity. The sliding window lives in the applications, e.g.
|
|
||||||
# OIDC_SESSION_INACTIVITY_TIMEOUT in freshrss/freshrss-deployment.yaml.
|
|
||||||
- model: authentik_stages_user_login.userloginstage
|
|
||||||
state: present
|
|
||||||
identifiers:
|
|
||||||
name: default-authentication-login
|
|
||||||
attrs:
|
|
||||||
session_duration: days=30
|
|
||||||
# Uncomment to show a "Remember me on this device" checkbox that adds
|
|
||||||
# this offset on top of session_duration when ticked (0 = hidden).
|
|
||||||
# remember_me_offset: days=60
|
|
||||||
@@ -17,7 +17,7 @@ spec:
|
|||||||
app: bolletjestrui
|
app: bolletjestrui
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: ghcr.io/rubenhensen/bolletjestrui:main-10268f1
|
- image: ghcr.io/rubenhensen/bolletjestrui:main-bb54c6a
|
||||||
name: bolletjestrui
|
name: bolletjestrui
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 3000
|
- containerPort: 3000
|
||||||
@@ -31,9 +31,9 @@ spec:
|
|||||||
value: x-forwarded-proto
|
value: x-forwarded-proto
|
||||||
- name: HOST_HEADER
|
- name: HOST_HEADER
|
||||||
value: x-forwarded-host
|
value: x-forwarded-host
|
||||||
# GPX routes and profile photos (up to 20 MB); raise adapter-node's 512K default
|
# route GPX uploads can be a few MB; raise adapter-node's 512K default
|
||||||
- name: BODY_SIZE_LIMIT
|
- name: BODY_SIZE_LIMIT
|
||||||
value: "25M"
|
value: "10M"
|
||||||
- name: TZ
|
- name: TZ
|
||||||
value: Europe/Amsterdam
|
value: Europe/Amsterdam
|
||||||
- name: SITE_PASSWORD
|
- name: SITE_PASSWORD
|
||||||
@@ -51,24 +51,6 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: bolletjestrui-secrets
|
name: bolletjestrui-secrets
|
||||||
key: key_secret
|
key: key_secret
|
||||||
# Push notifications. optional:true is load-bearing: without it a missing
|
|
||||||
# key leaves the pod in CreateContainerConfigError and the site is down,
|
|
||||||
# which would make deploying this depend on the Vault entries landing
|
|
||||||
# first. The app already treats absent VAPID keys as "send nothing".
|
|
||||||
- name: VAPID_PUBLIC_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: bolletjestrui-secrets
|
|
||||||
key: vapid_public_key
|
|
||||||
optional: true
|
|
||||||
- name: VAPID_PRIVATE_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: bolletjestrui-secrets
|
|
||||||
key: vapid_private_key
|
|
||||||
optional: true
|
|
||||||
- name: VAPID_SUBJECT
|
|
||||||
value: mailto:ruben.hensen@protonmail.com
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "128Mi"
|
memory: "128Mi"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: external-secrets.io/v1beta1
|
apiVersion: external-secrets.io/v1
|
||||||
kind: ExternalSecret
|
kind: ExternalSecret
|
||||||
metadata:
|
metadata:
|
||||||
name: bolletjestrui-secrets
|
name: bolletjestrui-secrets
|
||||||
@@ -23,14 +23,3 @@ spec:
|
|||||||
remoteRef:
|
remoteRef:
|
||||||
key: kv/bolletjestrui
|
key: kv/bolletjestrui
|
||||||
property: key_secret
|
property: key_secret
|
||||||
# web-push keypair for the "de route is gekozen" notification.
|
|
||||||
# Generate once with `npx web-push generate-vapid-keys` and never rotate it:
|
|
||||||
# a new key invalidates every subscription on everyone's phone.
|
|
||||||
- secretKey: vapid_public_key
|
|
||||||
remoteRef:
|
|
||||||
key: kv/bolletjestrui
|
|
||||||
property: vapid_public_key
|
|
||||||
- secretKey: vapid_private_key
|
|
||||||
remoteRef:
|
|
||||||
key: kv/bolletjestrui
|
|
||||||
property: vapid_private_key
|
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ metadata:
|
|||||||
cert-manager.io/cluster-issuer: prod-cluster-issuer
|
cert-manager.io/cluster-issuer: prod-cluster-issuer
|
||||||
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
|
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
|
||||||
nginx.ingress.kubernetes.io/ssl-passthrough: "false"
|
nginx.ingress.kubernetes.io/ssl-passthrough: "false"
|
||||||
# matches the app's BODY_SIZE_LIMIT: a bulk route import posts every GPX at once
|
nginx.ingress.kubernetes.io/proxy-body-size: "10m"
|
||||||
nginx.ingress.kubernetes.io/proxy-body-size: "25m"
|
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: nginx
|
ingressClassName: nginx
|
||||||
rules:
|
rules:
|
||||||
|
|||||||
@@ -56,20 +56,6 @@ spec:
|
|||||||
value: "openid email profile"
|
value: "openid email profile"
|
||||||
- name: OIDC_X_FORWARDED_HEADERS
|
- name: OIDC_X_FORWARDED_HEADERS
|
||||||
value: X-Forwarded-Port X-Forwarded-Proto X-Forwarded-Host
|
value: X-Forwarded-Port X-Forwarded-Proto X-Forwarded-Host
|
||||||
# Session handling for the Apache mod_auth_openidc layer that guards /i/.
|
|
||||||
# Defaults are 5 min inactivity / ~7.5 h max, which is what caused the
|
|
||||||
# constant bounces back to authentik.
|
|
||||||
# Sliding window: refreshed on every request, so any visit within the
|
|
||||||
# period extends it by another 30 days.
|
|
||||||
- name: OIDC_SESSION_INACTIVITY_TIMEOUT
|
|
||||||
value: "2592000" # 30 days
|
|
||||||
# Hard cap, counted from login and never extended.
|
|
||||||
- name: OIDC_SESSION_MAX_DURATION
|
|
||||||
value: "7776000" # 90 days
|
|
||||||
# ":persistent" makes the session cookie survive a browser restart
|
|
||||||
# (its expiry tracks OIDC_SESSION_INACTIVITY_TIMEOUT).
|
|
||||||
- name: OIDC_SESSION_TYPE
|
|
||||||
value: "server-cache:persistent"
|
|
||||||
- name: TZ
|
- name: TZ
|
||||||
value: Europe/Amsterdam
|
value: Europe/Amsterdam
|
||||||
image: freshrss/freshrss:latest
|
image: freshrss/freshrss:latest
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ let
|
|||||||
"blog.rubenhensen.nl"
|
"blog.rubenhensen.nl"
|
||||||
"serpbear.rubenhensen.nl"
|
"serpbear.rubenhensen.nl"
|
||||||
"git.rubenhensen.nl"
|
"git.rubenhensen.nl"
|
||||||
"vic.rubenhensen.nl"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
sniMapEntries =
|
sniMapEntries =
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: external-secrets.io/v1beta1
|
apiVersion: external-secrets.io/v1
|
||||||
kind: ExternalSecret
|
kind: ExternalSecret
|
||||||
metadata:
|
metadata:
|
||||||
name: serpbear-secrets
|
name: serpbear-secrets
|
||||||
|
|||||||
Reference in New Issue
Block a user