goauthentik / goauthentik/authentik

Jenkins SAML - cannot find entity SPSSODescriptor in metadata provider

Open
#3,707 1 comment 1 reaction 0 assignees View on GitHub
question
Dominant language
Python
Stars
25.6k
Forks
2k
Avg merge
1d 1h
Merged PRs (30d)
644

Description

**Describe your question**
I have the current config for my SAML provider in Authentik:
- ACS URL: https://myjenkins.company.com/securityRealm/finishLogin
- Issuer: https://myjenkins.company.com/securityRealm/finishLogin
- Binding: Post
- Audience: https://myjenkins.company.com/securityRealm/finishLogin
- Signing certificate: Authentik self-signed

I have not configured the NameID Property Mapping to any value.

Then on the Jenkins side, I have defined the following in ConfigurationAsCode:
```
saml:
binding: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
emailAttributeName: email
idpMetadataConfiguration:
period: 0
xml: one_line_string_from_authentik_metadata_box
maximumAuthenticationLifetime: 1296000
usernameCaseConversion: none
```

And after deploying this, I get the error:
```WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID 45a0e0b4-90c7-4978-b859-27bb77e49ed7 org.pac4j.saml.exceptions.SAMLException: Cannot find entity org.pac4j.saml.metadata.SAML2ServiceProviderMetadataResolver@62fdadd7 or role {urn:oasis:names:tc:SAML:2.0:metadata}SPSSODescriptor in metadata provider
```

I hope anyone can help me troubleshoot this further.. Thanks in advance!

**Logs**
```
2022-09-30 09:12:49.132+0000 [id=45992] WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving https://jenkinsplay.internal.mobilevikings.be/securityRealm/commenceLogin
org.pac4j.saml.exceptions.SAMLException: Cannot find entity org.pac4j.saml.metadata.SAML2ServiceProviderMetadataResolver@62fdadd7 or role {urn:oasis:names:tc:SAML:2.0:metadata}SPSSODescriptor in metadata provider
at org.pac4j.saml.context.SAML2ContextProvider.addContext(SAML2ContextProvider.java:132)
at org.pac4j.saml.context.SAML2ContextProvider.addSPContext(SAML2ContextProvider.java:105)
at org.pac4j.saml.context.SAML2ContextProvider.buildServiceProviderContext(SAML2ContextProvider.java:68)
at org.pac4j.saml.context.SAML2ContextProvider.buildContext(SAML2ContextProvider.java:74)
at org.pac4j.saml.redirect.SAML2RedirectActionBuilder.redirect(SAML2RedirectActionBuilder.java:37)
at org.pac4j.core.client.IndirectClient.getRedirectAction(IndirectClient.java:109)
at org.jenkinsci.plugins.saml.SamlRedirectActionWrapper.process(SamlRedirectActionWrapper.java:47)
at org.jenkinsci.plugins.saml.SamlRedirectActionWrapper.process(SamlRedirectActionWrapper.java:30)
at org.jenkinsci.plugins.saml.OpenSAMLWrapper.get(OpenSAMLWrapper.java:67)
at org.jenkinsci.plugins.saml.SamlSecurityRealm.doCommenceLogin(SamlSecurityRealm.java:261)
at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:397)
```

**Version and Deployment (please complete the following information):**
- authentik version: 2022.8.2
- Deployment: docker-compose

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.