From ce916f3ca3f71b50095d50dc7a3a894df1dff6a7 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Fri, 4 Oct 2024 17:15:43 +0100 Subject: [PATCH] Update documentation - setting secrets in kubernetes. --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 2c63b31..a38ffe9 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,34 @@ Middleware currently supports following scenarios: #### How to configure... +##### Keeping secrets secret + +This works ONLY in kubernetes environments. Don't forget to create secret traefik-middleware-oidc with fields ISSUER, CLIENT_ID and SECRET keys. + +``` +apiVersion: traefik.io/v1alpha1 +kind: Middleware +metadata: + name: oidc-with-open-urls + namespace: traefik +spec: + plugin: + traefikoidc: + providerURL: urn:k8s:secret:traefik-middleware-oidc:ISSUER + clientID: urn:k8s:secret:traefik-middleware-oidc:CLIENT_ID + clientSecret: urn:k8s:secret:traefik-middleware-oidc:SECRET + sessionEncryptionKey: vvv + callbackURL: /cool-oidc/callback + logoutURL: /cool-oidc/logout + scopes: + - openid + - email + - profile + excludedURLs: # Determines the list of URLs which are NOT a subject to authentication + - /login # covers /login, /login/me, /login/reminder etc. + - /my-public-data +``` + ##### Excluded URLs with open access ```