Comments on: Spring Boot with SAML2 and Keycloak https://piotrminkowski.com/2024/10/28/spring-boot-with-saml2-and-keycloak/ Java, Spring, Kotlin, microservices, Kubernetes, containers Thu, 09 Jan 2025 12:55:21 +0000 hourly 1 https://wordpress.org/?v=6.9.1 By: Yusuf Özacet https://piotrminkowski.com/2024/10/28/spring-boot-with-saml2-and-keycloak/#comment-2562 Thu, 09 Jan 2025 12:55:21 +0000 https://piotrminkowski.com/?p=15413#comment-2562 In reply to Michele Cenci.

To fix the certificate error, you need to import the localhost-crt.pem file into the cacerts file of the Java runtime that runs your program.

like this
keytool -importcert -trustcacerts -file localhost-crt.pem -keystore cacerts -alias piomin

]]>
By: Francisco MM https://piotrminkowski.com/2024/10/28/spring-boot-with-saml2-and-keycloak/#comment-2556 Wed, 11 Dec 2024 19:34:24 +0000 https://piotrminkowski.com/?p=15413#comment-2556 Hi, Piotr.

I’m developing an application which is a relying party.

In my developpment environment I use an IDP (WSO2) which acts as asserting party.

I follwed the tutorials and I get it working, but in production has another setup and the support team ask me for a metadata containing AuthnRequestsSigned and WantAssertionsSigned as following:

«md:SPSSODescriptor protocolSupportEnumeration=”urn:oasis:names:tc:SAML:2.0:protocol” WantAssertionsSigned=”true” AuthnRequestsSigned=”true”»

Mi actual application.yml is:
logging.level.org.springframework.security: DEBUG
logging.level.org.springframework.security.saml2: DEBUG

spring:
mvc:
view:
prefix: /templates/
suffix: .pug
static-path-pattern: /static/**

security:
saml2:
relyingparty:
registration:
pma_web:
entity-id: “${sso.entity-id}”
signing:
credentials:
– private-key-location: classpath:saml/credentials/rp-private.key
certificate-location: classpath:saml/credentials/rp-certificate.crt
singlelogout:
binding: POST
url: “{baseUrl}/logout/saml2/slo”
assertingparty:
metadata-uri: classpath:saml/${env}/metadata.xml

datasource:
jndi-name: java:jboss/datasources/pma_web
jpa:
hibernate:
ddl-auto: update
properties:
hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialect

pma-cmdb:
pma-keystore-key-alias: pma-jwt-signing-key
pma-keystore-password: pma-jwt-p422w0rd

Do you know what i’m missing?

Thanks in advance!

]]>
By: Francisco MM https://piotrminkowski.com/2024/10/28/spring-boot-with-saml2-and-keycloak/#comment-2554 Wed, 11 Dec 2024 19:30:58 +0000 https://piotrminkowski.com/?p=15413#comment-2554 Hi, navigator deleted the xml sppsodescritor after “I follwed the tutorials and I get it working, but in production has another setup and the support team ask me for a metadata containing AuthnRequestsSigned and WantAssertionsSigned as following” this is the descriptor I wanted to say: «md:SPSSODescriptor protocolSupportEnumeration=”urn:oasis:names:tc:SAML:2.0:protocol»

]]>
By: piotr.minkowski https://piotrminkowski.com/2024/10/28/spring-boot-with-saml2-and-keycloak/#comment-2544 Mon, 18 Nov 2024 13:04:27 +0000 https://piotrminkowski.com/?p=15413#comment-2544 In reply to Michele Cenci.

Hello,
Thanks. For kind of errors do you have? Could you also create an issue in GitHub repo for that?

]]>
By: Michele Cenci https://piotrminkowski.com/2024/10/28/spring-boot-with-saml2-and-keycloak/#comment-2540 Tue, 12 Nov 2024 13:58:22 +0000 https://piotrminkowski.com/?p=15413#comment-2540 Hi Piotr,
this is a tutorial of great value, but, the git project is not a ready-to-go project.
There are errors during authentication and the process for certificate generation/replacement is not straightforward.
Can you please add this infos?

]]>