Generieren Sie AuthnRequestsSigned und WantAssertionsSigned in den Metadaten Spring Security SAML2 V6.4.1

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Generieren Sie AuthnRequestsSigned und WantAssertionsSigned in den Metadaten Spring Security SAML2 V6.4.1

by Guest » 20 Dec 2024, 14:47

Ich muss die Integration der Anwendung, die ich entwickle, in ein vorhandenes SSO erstellen, über das ich keine Kontrolle habe.
Im letzten Projekt habe ich

org.springframework.boot
spring-boot-starter-parent
2.1.2.RELEASE



und:

org.springframework.security.extensions
spring-security-saml2-core
1.0.10.RELEASE


org.springframework.security.extensions
spring-security-saml-dsl-core
1.0.5.RELEASE


Neben anderen Abhängigkeiten.
Und in der Weiterleitung der von der Partei generierten Metadatendatei konnte ich Folgendes sehen:



Aber jetzt haben wir uns für ein Upgrade entschieden auf:
3.4.0-M3
2.0.0.M31
1.0.5.RELEASE
6.4.0-M4

Ich habe getan, was in der Spring SAML2-Dokumentation steht, i. z.B.:
Das ist meine SecurityConfig
@Configuration
@EnableWebSecurity
@EnableMethodSecurity(securedEnabled = true)
public class SecurityConfig{
private static final String SAML_METADATA = "/saml/metadata";

@Autowired
PmaLdapValidationHandler pmaLdapValidationHandler;

@Bean
SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {

// @formatter:off
http
.saml2Metadata((saml2) -> saml2.metadataUrl(SAML_METADATA))
.saml2Login(withDefaults()).saml2Logout(withDefaults())
.logout(withDefaults())
.authorizeHttpRequests((authorize) -> authorize.anyRequest().authenticated());
// @formatter:on
return http.build();
}
}


Dies ist meine application.yml:
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


Aber jetzt sind solche Attribute verschwunden:


Ich habe fast alles versucht, um diese Attribute zu generieren, aber es gelang mir bisher nicht.
Wie könnte ich das machen?

Top