java.lang.NullPointerException: signingKey cannot be null

Solution Unverified - Updated -

Issue

The following error is observed on SAML SP protected by RH-SSO SAML adapter:

Caused by: java.lang.NullPointerException: signingKey cannot be null
    at javax.xml.crypto.dsig.dom.DOMSignContext.<init>(DOMSignContext.java:100)
    at org.keycloak.saml.processing.core.util.XMLSignatureUtil.sign(XMLSignatureUtil.java:412)
    at org.keycloak.saml.processing.api.saml.v2.sig.SAML2Signature.sign(SAML2Signature.java:142)
    at org.keycloak.saml.processing.api.saml.v2.sig.SAML2Signature.signSAMLDocument(SAML2Signature.java:159)
    at org.keycloak.saml.BaseSAML2BindingBuilder.signDocument(BaseSAML2BindingBuilder.java:277)
    at org.keycloak.saml.BaseSAML2BindingBuilder$BasePostBindingBuilder.<init>(BaseSAML2BindingBuilder.java:154)
    at org.keycloak.saml.BaseSAML2BindingBuilder.postBinding(BaseSAML2BindingBuilder.java:219)
    at org.keycloak.adapters.saml.SamlUtil.sendSaml(SamlUtil.java:45)
    at org.keycloak.adapters.saml.profile.AbstractSamlAuthenticationHandler$3.sendAuthnRequest(AbstractSamlAuthenticationHandler.java:622)
    at org.keycloak.adapters.saml.AbstractInitiateLogin.challenge(AbstractInitiateLogin.java:61)
    ... 42 more

Environment

  • Red Hat Single Sign-on 7.4.x SAML adapters

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content