spring-boot saml:配置服务提供商实体ID

8oomwypt  于 2023-05-17  发布在  Spring
关注(0)|答案(1)|浏览(132)

是否有方法在以下配置中配置服务提供商的entityID:

spring:
  security:
    saml2:
      relyingparty:
        registration:
          myapp:
            signing:
              credentials:
                - private-key-location: "classpath:private.pem"
                  certificate-location: "classpath:public.pem"
            identityprovider:
              entity-id: idp
              singlesignon:
                sign-request: false
                url: https://.../auth/realms/saml-demo/protocol/saml

当前,身份提供程序始终接收以下格式:

{baseUrl}/saml2/service-provider-metadata/{registrationId}

例如:

http://localhost:8080/saml2/service-provider-metadata/myapp

在使用yaml配置时,可以自定义此格式吗?

nnsrf1az

nnsrf1az1#

你好,这就是它的工作原理。

spring:
  security:
    saml2:
      relyingparty:
        registration:
          myapp:
            signing:
              credentials:
                - private-key-location: "classpath:private.pem"
                  certificate-location: "classpath:public.pem"
            entity-id: "http://localhost:8080/saml2/service-provider-metadata/myapp"

不要使用identityprovide。只需添加实体ID,它就可以工作了。官方文件有误。从我所看到的。

相关问题