繁体   English   中英

属性文件的 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"

它包含列表,如何将其转换为属性并不明显。 我在网上找不到太多关于它的信息。

配置文件的这一部分配置了以下类:

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM