Hi everyone,
I'm encountering an issue when deploying cBioPortal with SAML2 authentication using Keycloak in Docker. I followed the guide from the cBioPortal documentation on Using Keycloak in Docker and I'm running Keycloak version 18.0.2.
Issue Description:
Every time I try to start the services, the cBioPortal service fails with the following error:
... 20 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'relyingPartyRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/saml2/Saml2RelyingPartyRegistrationConfiguration.class]: Failed to instantiate [org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepository]: Factory method 'relyingPartyRegistrationRepository' threw exception with message: entityId cannot be null or empty
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:654) ~[spring-beans-6.0.12.jar:6.0.12]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:642) ~[spring-beans-6.0.12.jar:6.0.12]
... 50 common frames omitted
Below is the relevant section from my application.properties:
spring.security.saml2.relyingparty.registration.cbioportal.entity-id=
https://vm21197.virt.gwdg.despring.security.saml2.relyingparty.registration.cbioportal.assertion-consumer-service-url=
https://vm21197.virt.gwdg.de/login/saml2/sso/cbioportalspring.security.saml2.relyingparty.registration.cbioportal.idp.metadata-location=file:/opt/docker/testSSL/cbioportal-docker-compose/metadata/client-tailored-saml-idp-metadata.xml
spring.security.saml2.relyingparty.registration.cbioportal.signing.credentials[0].private-key-location=file:/cbioportal-webapp/WEB-INF/classes/privateKey_pkcs8.pem
spring.security.saml2.relyingparty.registration.cbioportal.signing.credentials[0].certificate-location=file:/opt/docker/testSSL/cbioportal-docker-compose/letsencrypt/live/vm21197.virt.gwdg.de-0001/cert.pem
I’ve verified that the metadata file exists at the specified location and that its contents include a valid IdP entityID (e.g., entityID="
https://vm21197.virt.gwdg.de/realms/cbioportal"). Despite this, the error persists indicating that an entityId is null or empty.
Any insights or suggestions on how to resolve the "entityId cannot be null or empty" error would be greatly appreciated!
Thanks in advance for your help.