You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2) Configure and activate the plugin as a middleware in your dynamic traefik config:
@@ -70,6 +70,7 @@ Name | Description
70
70
`forwardToken`| Boolean indicating whether the token should be forwarded to the backend. Default true. If multiple tokens are present in different locations (e.g. cookie and header) and forwarding is false, only the token used will be removed.
71
71
`optional`| Validate tokens according to the normal rules but don't require that a token be present. If specific claim requirements are specified in `require` but with `optional` set to `true` and a token is not present, access will be permitted even though the requirements are obviously not met, which may not be what you want or expect. In this case, no headers will be set from claims (as there aren't any). This is quite a niche case but is intended for use on endpoints that support both authorized and anonymous access and you want JWTs verified if present.
72
72
`insecureSkipVerify` | A list of issuers' domains for which TLS certificates should not be verified (i.e. use `InsecureSkipVerify: true`). Only the hostname/domain should be specified (i.e. no scheme or trailing slash). Applies to both the openid-configuration and jwks calls.
73
+
`rootCAs`| One or more additional root certificate authorities, in PEM format, to be combined with the system cert pool when verifying server certificates.
73
74
`infoToStdout`| traefik does not yet have support for plugins to use the logger so, by default, all messages are logged using `log.Printf`, which will send messages from the plugin out as if they were logged at `ERROR` level. This may be irritating for those that don't like to see non-error messages show up as if they are errors. There is a workaround available in that the plugin can send messages to STDOUT and traefik will log these as if they were logged at `DEBUG` level. Setting `infoToStdout` to `true` will send all non-error info messages to STDOUT and these will appear in logs at `DEBUG` level. These will obviously only appear if you set your traefik log level to `DEBUG` (which may actually be more irritating if you don't want the spew that this creates, so this option is not enabled by default). Note also that this workaround does not appear to be working correctly in traefik v2 and in this case you may not see info messages at all if you enable this.
// We don't plan an option to set useSystemCertPool=false but it helps with test coverage
582
+
certs=x509.NewCertPool()
583
+
}
584
+
for_, pem:=rangepems {
585
+
if!certs.AppendCertsFromPEM([]byte(pem)) {
586
+
log.Printf("failed to add root CA:\n%s", pem)
587
+
}
588
+
}
589
+
transport:=&http.Transport{
590
+
TLSClientConfig: &tls.Config{
591
+
RootCAs: certs,
592
+
},
593
+
}
594
+
return&http.Client{Transport: transport}
595
+
}
596
+
572
597
// createClients reads a list of domains in the InsecureSkipVerify configuration and creates a map of domains to http.Client with InsecureSkipVerify set.
0 commit comments