generated from traefik/plugindemo
-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from wiltonsr/improve-conn
Improve connections
- Loading branch information
Showing
7 changed files
with
238 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
version: "3.3" | ||
|
||
services: | ||
|
||
traefik: | ||
# build: | ||
# context: . | ||
image: traefik:v2.10.0 | ||
container_name: "traefik" | ||
command: | ||
#- "--log.level=DEBUG" | ||
- "--api.insecure=true" | ||
- "--providers.docker=true" | ||
- "--entrypoints.web.address=:80" | ||
# Load ldapAuth from local private plugins format ===============================# | ||
# https://github.com/traefik/traefik/pull/8224 # | ||
# "A plugin must be declared in the static configuration" # | ||
# https://doc.traefik.io/traefik-pilot/plugins/overview/#installing-plugins # | ||
- "--experimental.localPlugins.ldapAuth.moduleName=github.com/wiltonsr/ldapAuth" # | ||
# ===============================================================================# | ||
# Load ldapAuth Dynamic conf from file ==========================================# | ||
# https://doc.traefik.io/traefik/providers/file/#filename # | ||
- "--providers.file.filename=/dynamic-conf/ldapAuth-tls-conf.toml" # | ||
# ===============================================================================# | ||
ports: | ||
- "80:80" | ||
- "8080:8080" | ||
volumes: | ||
- "/var/run/docker.sock:/var/run/docker.sock:ro" | ||
- "../../ldapAuth:/plugins-local/src/github.com/wiltonsr/ldapAuth:ro" | ||
- "./dynamic-conf/ldapAuth-tls-conf.toml:/dynamic-conf/ldapAuth-tls-conf.toml:ro" | ||
|
||
whoami: | ||
image: "traefik/whoami" | ||
container_name: "whoami" | ||
labels: | ||
- "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)" | ||
- "traefik.http.routers.whoami.entrypoints=web" | ||
# Enable LDAP Auth Middleware defined in ldapAuth-tls-conf.toml | ||
- "traefik.http.routers.whoami.middlewares=my-ldapAuth@file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
version: "3.3" | ||
|
||
services: | ||
|
||
traefik: | ||
# build: | ||
# context: . | ||
image: traefik:v2.10.0 | ||
container_name: "traefik" | ||
command: | ||
#- "--log.level=DEBUG" | ||
- "--api.insecure=true" | ||
- "--providers.docker=true" | ||
- "--entrypoints.web.address=:80" | ||
# Load ldapAuth from local private plugins format ===============================# | ||
# https://github.com/traefik/traefik/pull/8224 # | ||
# "A plugin must be declared in the static configuration" # | ||
# https://doc.traefik.io/traefik-pilot/plugins/overview/#installing-plugins # | ||
- "--experimental.localPlugins.ldapAuth.moduleName=github.com/wiltonsr/ldapAuth" # | ||
# ===============================================================================# | ||
# Load ldapAuth Dynamic conf from file ==========================================# | ||
# https://doc.traefik.io/traefik/providers/file/#filename # | ||
- "--providers.file.filename=/dynamic-conf/ldapAuth-tls-conf.yml" # | ||
# ===============================================================================# | ||
ports: | ||
- "80:80" | ||
- "8080:8080" | ||
volumes: | ||
- "/var/run/docker.sock:/var/run/docker.sock:ro" | ||
- "../../ldapAuth:/plugins-local/src/github.com/wiltonsr/ldapAuth:ro" | ||
- "./dynamic-conf/ldapAuth-tls-conf.yml:/dynamic-conf/ldapAuth-tls-conf.yml:ro" | ||
|
||
whoami: | ||
image: "traefik/whoami" | ||
container_name: "whoami" | ||
labels: | ||
- "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)" | ||
- "traefik.http.routers.whoami.entrypoints=web" | ||
# Enable LDAP Auth Middleware defined in ldapAuth-tls-conf.yml | ||
- "traefik.http.routers.whoami.middlewares=my-ldapAuth@file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
[http.middlewares] | ||
[http.middlewares.my-ldapAuth.plugin.ldapAuth] | ||
Attribute = "uid" | ||
BaseDN = "cn=users,cn=accounts,dc=demo1,dc=freeipa,dc=org" | ||
Enabled = true | ||
LogLevel = "DEBUG" | ||
Port = "636" | ||
Url = "ldaps://ipa.demo1.freeipa.org" | ||
CertificateAuthority = ''' | ||
-----BEGIN CERTIFICATE----- | ||
MIIFWzCCA8OgAwIBAgIBCDANBgkqhkiG9w0BAQsFADA8MRowGAYDVQQKDBFERU1P | ||
MS5GUkVFSVBBLk9SRzEeMBwGA1UEAwwVQ2VydGlmaWNhdGUgQXV0aG9yaXR5MB4X | ||
DTIzMDQyMDEzMzYxNFoXDTI1MDQyMDEzMzYxNFowPDEaMBgGA1UECgwRREVNTzEu | ||
RlJFRUlQQS5PUkcxHjAcBgNVBAMMFWlwYS5kZW1vMS5mcmVlaXBhLm9yZzCCASIw | ||
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMEzBE9i2gqOMM2HKyNnM7Ih5+mv | ||
duVmE5D+5raJtqA1eNZkNrQmSaKwS9cnHGX+2/zSY1FDkZnIhGXySPf0/7fxCuG/ | ||
J9MvRlecGnJTWOCvPIVhkvd5PyTKkClmsk4ojx2IwCU6q2nvy0zvSxhhzd2UpOL6 | ||
y7fNtS3VBYYZjWNEv0K7F+pGtW40MauGDotsP1zQmyVW5J1IszDDlRgTLC6azdBs | ||
+RP0vYCyKkgh1tpWLYfFnQhNVOlja79QcnlKdvnZu4sFdDSvOqext28mBJuCm8ib | ||
HLnQQcxTqg2jMx8AW2zh9F8sMoEsn/mjDHI41oGGsHeZt3j5a8Ab7jtlz8MCAwEA | ||
AaOCAeYwggHiMB8GA1UdIwQYMBaAFKFAgcvZmgX3tnFhcPQ5i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B8GA1UdIwQY | ||
MBaAFKFAgcvZmgX3tnFhcPQ5i4jZ+xE9MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0P | ||
AQH/BAQDAgHGMB0GA1UdDgQWBBShQIHL2ZoF97ZxYXD0OYuI2fsRPTBDBggrBgEF | ||
BQcBAQQ3MDUwMwYIKwYBBQUHMAGGJ2h0dHA6Ly9pcGEtY2EuZGVtbzEuZnJlZWlw | ||
YS5vcmcvY2Evb2NzcDANBgkqhkiG9w0BAQsFAAOCAYEAH0du998ux4CkH/W9/2l0 | ||
GnnHE5GbBBcGd4zEIxxoe0kYm7MKJjXL9gDRZ3RMseEhy0mAX8cixA7xmg/IFgM9 | ||
TFHoHbTUNgEzLZtOYl5Qccp48ZV1XLrzfK1DorEH6tgza0X2rNJ7RU25sq9i687Y | ||
S0Tt6W3CNkOnQed7blDbxfZJOq7gvqiTFy09a5OXv2AxpkmRrLwFWd/+4Whbsji1 | ||
wiwTD+t7gDTGizqINEsJ3lT+2dDp+mAxPKTd4XiTE4aBPVc4LBxHDnMzqFxa1qzG | ||
v/BL+aa3FkahD/zMm6/B70iApFOFeCrng/1Q7DxUsBWWuzS+oVdm8MEUWtHxANC5 | ||
VG91hbzs4jBAig6AY1hGe49oOabkM1IGhp/TIySAaogA4BFS9DNV1TyNZ4Y9PO61 | ||
JZHjzfXOLIdSlluwsBJem4Lj6Xdw8epzANA0CVnEQ5R1Aql0uRlSsAuhcsleCYJC | ||
4gbTjx3PDQLm4BUvsNZ62knVDJPvjAX4nOybumpLAVKg | ||
-----END CERTIFICATE----- | ||
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
http: | ||
middlewares: | ||
my-ldapAuth: | ||
plugin: | ||
ldapAuth: | ||
Enabled: true | ||
LogLevel: "DEBUG" | ||
Url: "ldaps://ipa.demo1.freeipa.org" | ||
Port: 636 | ||
BaseDN: "cn=users,cn=accounts,dc=demo1,dc=freeipa,dc=org" | ||
Attribute: "uid" | ||
CertificateAuthority: |- | ||
-----BEGIN CERTIFICATE----- | ||
MIIFWzCCA8OgAwIBAgIBCDANBgkqhkiG9w0BAQsFADA8MRowGAYDVQQKDBFERU1P | ||
MS5GUkVFSVBBLk9SRzEeMBwGA1UEAwwVQ2VydGlmaWNhdGUgQXV0aG9yaXR5MB4X | ||
DTIzMDQyMDEzMzYxNFoXDTI1MDQyMDEzMzYxNFowPDEaMBgGA1UECgwRREVNTzEu | ||
RlJFRUlQQS5PUkcxHjAcBgNVBAMMFWlwYS5kZW1vMS5mcmVlaXBhLm9yZzCCASIw | ||
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMEzBE9i2gqOMM2HKyNnM7Ih5+mv | ||
duVmE5D+5raJtqA1eNZkNrQmSaKwS9cnHGX+2/zSY1FDkZnIhGXySPf0/7fxCuG/ | ||
J9MvRlecGnJTWOCvPIVhkvd5PyTKkClmsk4ojx2IwCU6q2nvy0zvSxhhzd2UpOL6 | ||
y7fNtS3VBYYZjWNEv0K7F+pGtW40MauGDotsP1zQmyVW5J1IszDDlRgTLC6azdBs | ||
+RP0vYCyKkgh1tpWLYfFnQhNVOlja79QcnlKdvnZu4sFdDSvOqext28mBJuCm8ib | ||
HLnQQcxTqg2jMx8AW2zh9F8sMoEsn/mjDHI41oGGsHeZt3j5a8Ab7jtlz8MCAwEA | ||
AaOCAeYwggHiMB8GA1UdIwQYMBaAFKFAgcvZmgX3tnFhcPQ5i4jZ+xE9MEMGCCsG | ||
AQUFBwEBBDcwNTAzBggrBgEFBQcwAYYnaHR0cDovL2lwYS1jYS5kZW1vMS5mcmVl | ||
aXBhLm9yZy9jYS9vY3NwMA4GA1UdDwEB/wQEAwIE8DAdBgNVHSUEFjAUBggrBgEF | ||
BQcDAQYIKwYBBQUHAwIwfAYDVR0fBHUwczBxoDmgN4Y1aHR0cDovL2lwYS1jYS5k | ||
ZW1vMS5mcmVlaXBhLm9yZy9pcGEvY3JsL01hc3RlckNSTC5iaW6iNKQyMDAxDjAM | ||
BgNVBAoMBWlwYWNhMR4wHAYDVQQDDBVDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHQYD | ||
VR0OBBYEFGsje2irExO4AvvLW6jv2oEkrZfSMIGtBgNVHREEgaUwgaKCFWlwYS5k | ||
ZW1vMS5mcmVlaXBhLm9yZ6A8BgorBgEEAYI3FAIDoC4MLGxkYXAvaXBhLmRlbW8x | ||
LmZyZWVpcGEub3JnQERFTU8xLkZSRUVJUEEuT1JHoEsGBisGAQUCAqBBMD+gExsR | ||
REVNTzEuRlJFRUlQQS5PUkehKDAmoAMCAQGhHzAdGwRsZGFwGxVpcGEuZGVtbzEu | ||
ZnJlZWlwYS5vcmcwDQYJKoZIhvcNAQELBQADggGBADO5SovCVFoVJQOKxrePdh5y | ||
VIQ45UQSjmfXT+FlzbzlX47ejpvdqDKDl0yj5JBUKtKxv3Mj6natUQAVnveRcXlo | ||
mjzEOQsozCaWcCrtnIW8AOny78DjxnSdwPqd/TRV4r2/T2cRndd0GCg6LrQxEdTf | ||
VNKJAMAYin6xmopsarpXwVJVd7YweFUMd7Tu5Tvpde1oubnBtb7ZEGixb6AB200g | ||
lHQroWz6s+a/d7BxsyM0DA5bOk728LqroIJ8m/9xIbnACoyeVdmM5BF/1/cUsX4N | ||
RkRJIfcITNB3zr/4WUldKsM/7bfEA5S0GQUjTd4njt5r7d8j2r6V88maN9ANgXZ4 | ||
Vf1RbjmTOw4OovwGXtRu8DkQ4kSqnyd1COelH48EfGxtOYbzqNNgnip+95mmMoFr | ||
3BkxKP8G/lQ3kGOYqBIQ+1ICtvx29Smllo87RkJ3KltHy7RKVMZry7inLTqCNBAA | ||
uIdew6R5uJhBBrfjmXGyGjba9wtxDPiPoTa9gGAu7w== | ||
-----END CERTIFICATE----- | ||
-----BEGIN CERTIFICATE----- | ||
MIIEnTCCAwWgA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ZGVtbzEuZnJlZWlw | ||
YS5vcmcvY2Evb2NzcDANBgkqhkiG9w0BAQsFAAOCAYEAH0du998ux4CkH/W9/2l0 | ||
GnnHE5GbBBcGd4zEIxxoe0kYm7MKJjXL9gDRZ3RMseEhy0mAX8cixA7xmg/IFgM9 | ||
TFHoHbTUNgEzLZtOYl5Qccp48ZV1XLrzfK1DorEH6tgza0X2rNJ7RU25sq9i687Y | ||
S0Tt6W3CNkOnQed7blDbxfZJOq7gvqiTFy09a5OXv2AxpkmRrLwFWd/+4Whbsji1 | ||
wiwTD+t7gDTGizqINEsJ3lT+2dDp+mAxPKTd4XiTE4aBPVc4LBxHDnMzqFxa1qzG | ||
v/BL+aa3FkahD/zMm6/B70iApFOFeCrng/1Q7DxUsBWWuzS+oVdm8MEUWtHxANC5 | ||
VG91hbzs4jBAig6AY1hGe49oOabkM1IGhp/TIySAaogA4BFS9DNV1TyNZ4Y9PO61 | ||
JZHjzfXOLIdSlluwsBJem4Lj6Xdw8epzANA0CVnEQ5R1Aql0uRlSsAuhcsleCYJC | ||
4gbTjx3PDQLm4BUvsNZ62knVDJPvjAX4nOybumpLAVKg | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters