msg="middleware \"my-keycloakopenid@docker\" does not exist" entryPointName=web routerName=api-test-router@docker
Closed this issue · 3 comments
Hello,
I am trying ot use your plugin, but I receive this error:
msg="middleware "my-keycloakopenid@docker" does not exist" entryPointName=web routerName=api-test-router@docker
My traefikyml is like this:
traefik.yml
Global configuration
global:
checkNewVersion: true
sendAnonymousUsage: false
Entry points configuratie
entryPoints:
web:
address: ":80" # Poort waarop Traefik toegankelijk is
API-definities
api:
insecure: true
Providers configuratie
providers:
docker: {}
file:
directory: .
watch: true
accessLog:
filePath: "/var/log/access.log"
format: "json"
experimental:
plugins:
keycloakopenid:
moduleName: "github.com/Gwojda/keycloakopenid"
version: "v0.1.31"
And my dynamic.yml is like this:
http:
middlewares:
my-keycloakopenid:
plugin:
keycloakopenid:
ClientID: CLIENTID
ClientSecret: CLIENTSECRET
KeycloakRealm: MYREALM
KeycloakURL: URLTOKEYCLOAKSERVER
In the label of the api server I add this line:
- "traefik.http.routers.api-test-router.middlewares=my-keycloakopenid"
Do you have any idea what I did wrong?
Thank you in advance,
Mark
Hi,
To use the plugin :
add this label on traefik conf:
"--experimental.plugins.keycloakopenid.modulename=github.com/Gwojda/keycloakopenid",
"--experimental.plugins.keycloakopenid.version=v0.1.31",
Then, define your middleware, for example :
plugin:
keycloakopenid:
KeycloakURL: "keycloak.xxx.com",
KeycloakRealm : "my_realm",
ClientID: "ClientID",
ClientSecret : "ClientSecret"
}
}
```
And to use it (example for kubernetes), add this annotation :
```
"traefik.ingress.kubernetes.io/router.middlewares" = "<NAMESPACE>-<MIDDLEWARENAME>@kubernetescrd"
never tried with docker, but maybe your issue is with the `my-keycloakopenid` name. Try to name it `keycloakopenid` and to specify the right namespace
you have to define your middleware in your dynamic conf file
Please read https://plugins.traefik.io/install