簡體   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