mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-17 04:37:48 +00:00
Update documentation.
This commit is contained in:
@@ -11,8 +11,10 @@ testData:
|
|||||||
clientID: 1234567890.apps.googleusercontent.com
|
clientID: 1234567890.apps.googleusercontent.com
|
||||||
clientSecret: secret
|
clientSecret: secret
|
||||||
callbackURL: /oauth2/callback
|
callbackURL: /oauth2/callback
|
||||||
|
logoutURL: /oauth2/logout
|
||||||
scopes:
|
scopes:
|
||||||
- openid
|
- openid
|
||||||
- email
|
- email
|
||||||
- profile
|
- profile
|
||||||
sessionEncryptionKey: potato-secret
|
sessionEncryptionKey: potato-secret
|
||||||
|
forceHTTPS: false
|
||||||
|
|||||||
@@ -7,16 +7,95 @@ This middleware is supposed to replace the need for the forward-auth and oauth2-
|
|||||||
|
|
||||||
### Configuration options
|
### Configuration options
|
||||||
|
|
||||||
|
#### Docker compose example
|
||||||
|
|
||||||
|
`docker-compose.yaml`
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
traefik:
|
||||||
|
image: traefik:v3.0.1
|
||||||
|
command:
|
||||||
|
- "--experimental.plugins.traefikoidc.modulename=github.com/lukaszraczylo/traefikoidc"
|
||||||
|
- "--experimental.plugins.traefikoidc.version=v0.2.1"
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- ./traefik-config/traefik.yml:/etc/traefik/traefik.yml
|
||||||
|
- ./traefik-config/dynamic-configuration.yml:/etc/traefik/dynamic-configuration.yml
|
||||||
|
labels:
|
||||||
|
- "traefik.http.routers.dash.rule=Host(`dash.localhost`)"
|
||||||
|
- "traefik.http.routers.dash.service=api@internal"
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
|
||||||
|
hello:
|
||||||
|
image: containous/whoami
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.routers.hello.entrypoints=http
|
||||||
|
- traefik.http.routers.hello.rule=Host(`hello.localhost`)
|
||||||
|
- traefik.http.services.hello.loadbalancer.server.port=80
|
||||||
|
- traefik.http.routers.hello.middlewares=my-plugin@file
|
||||||
|
|
||||||
|
whoami:
|
||||||
|
image: jwilder/whoami
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.routers.whoami.entrypoints=http
|
||||||
|
- traefik.http.routers.whoami.rule=Host(`whoami.localhost`)
|
||||||
|
- traefik.http.services.whoami.loadbalancer.server.port=8000
|
||||||
|
- traefik.http.routers.whoami.middlewares=my-plugin@file
|
||||||
```
|
```
|
||||||
testData:
|
|
||||||
providerURL: https://accounts.google.com
|
`traefik-config/traefik.yaml`
|
||||||
clientID: 1234567890.apps.googleusercontent.com
|
|
||||||
clientSecret: secret
|
```yaml
|
||||||
callbackURL: /oauth2/callback
|
log:
|
||||||
logoutURL: /oauth2/logout
|
level: INFO
|
||||||
scopes:
|
|
||||||
- openid
|
experimental:
|
||||||
- email
|
localPlugins:
|
||||||
- profile
|
traefikoidc:
|
||||||
sessionEncryptionKey: potato-secret
|
moduleName: github.com/lukaszraczylo/traefikoidc
|
||||||
|
|
||||||
|
# API and dashboard configuration
|
||||||
|
api:
|
||||||
|
dashboard: true
|
||||||
|
insecure: true
|
||||||
|
|
||||||
|
entryPoints:
|
||||||
|
http:
|
||||||
|
address: ":80"
|
||||||
|
forwardedHeaders:
|
||||||
|
insecure: true
|
||||||
|
|
||||||
|
providers:
|
||||||
|
docker:
|
||||||
|
endpoint: "unix:///var/run/docker.sock"
|
||||||
|
exposedByDefault: false
|
||||||
|
file:
|
||||||
|
filename: /etc/traefik/dynamic-configuration.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
`traefik-config/dynamic-configuration.yaml`
|
||||||
|
```yaml
|
||||||
|
http:
|
||||||
|
middlewares:
|
||||||
|
my-plugin:
|
||||||
|
plugin:
|
||||||
|
traefikoidc:
|
||||||
|
providerURL: https://accounts.google.com
|
||||||
|
clientID: 1234567890.apps.googleusercontent.com
|
||||||
|
clientSecret: secret
|
||||||
|
callbackURL: /oauth2/callback
|
||||||
|
logoutURL: /oauth2/logout
|
||||||
|
scopes:
|
||||||
|
- openid
|
||||||
|
- email
|
||||||
|
- profile
|
||||||
|
sessionEncryptionKey: potato-secret
|
||||||
|
forceHTTPS: false
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user