我正在尝试将以下用于SAML2安全的yaml配置转换为等效属性文件。
spring:
security:
saml2:
relyingparty:
registration:
xyz:
signing:
credentials:
- certificate-location: "classpath:saml/xyz.pem"
private-key-location: "classpath:saml/xyz.key"
identityprovider:
entity-id: xyz
sso-url: xyz.com
verification:
credentials:
- certificate-location: "classpath:saml/xyz.pem"
它包含列表,如何将其转换为属性尚不清楚。我在网上找不到很多。
配置文件的此部分配置以下类:
org.springframework.boot.autoconfigure.security.saml2.Saml2RelyingPartyProperties
从spring-boot-autoconfigure-2.2.5.RELEASE.jar。
尝试一下。这应该工作
spring.security.saml2.relyingparty.registration.xyz.signing.credentials[0].certificate-location="classpath:saml/xyz.pem"
spring.security.saml2.relyingparty.registration.xyz.signing.credentials[0].private-key-location="classpath:saml/xyz.key"
spring.security.saml2.relyingparty.registration.xyz.signing.identityprovider.entity-id=xyz
spring.security.saml2.relyingparty.registration.xyz.signing.identityprovider.sso-url=xyz.com
spring.security.saml2.relyingparty.registration.xyz.signing.identityprovider.verification.credentials[0].certificate-location="classpath:saml/xyz.pem"