R76: dcr singleflight, L1 no-resurrect, TLS loopback

This commit is contained in:
2026-08-13 17:59:14 +01:00
parent e7378d640d
commit 60980b5eb6
7 changed files with 249 additions and 12 deletions
+7 -1
View File
@@ -678,10 +678,16 @@ func (t *TraefikOidc) updateMetadataEndpoints(metadata *ProviderMetadata) {
t.logger.Debugf("Dynamic client registration endpoint discovered: %s", registrationURL)
}
// Perform Dynamic Client Registration if enabled and ClientID is not set
// Perform Dynamic Client Registration if enabled and ClientID is not set.
// dcrMu serializes the check and the registration so the concurrent
// metadata-refresh goroutine can't pass the same gate and register a
// second client (and so the clientID read here can't race the write in
// performDynamicClientRegistration).
t.dcrMu.Lock()
if t.dcrConfig != nil && t.dcrConfig.Enabled && t.clientID == "" {
t.performDynamicClientRegistration()
}
t.dcrMu.Unlock()
}
// performDynamicClientRegistration performs automatic client registration with the OIDC provider