Yaml 配置对象列表到属性文件
Yaml configuration list of objects to properties file
我正在尝试将以下用于 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"
它包含列表,如何将其转换为属性并不明显。
我在网上找不到太多关于它的信息。
配置文件的这一部分配置以下内容class:
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.identityprovider.entity-id=xyz
spring.security.saml2.relyingparty.registration.xyz.identityprovider.sso-url=xyz.com
spring.security.saml2.relyingparty.registration.xyz.identityprovider.verification.credentials[0].certificate-location=classpath:saml/xyz.pem
我正在尝试将以下用于 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"
它包含列表,如何将其转换为属性并不明显。 我在网上找不到太多关于它的信息。
配置文件的这一部分配置以下内容class:
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.identityprovider.entity-id=xyz
spring.security.saml2.relyingparty.registration.xyz.identityprovider.sso-url=xyz.com
spring.security.saml2.relyingparty.registration.xyz.identityprovider.verification.credentials[0].certificate-location=classpath:saml/xyz.pem