在 Spring 安全 Saml 示例中生成 saml 身份验证请求的位置

Where is the saml authentication request is getting generated in Spring Security Saml Sample

我正在学习实施 Saml,到目前为止,我已经从 link https://github.com/spring-projects/spring-security-saml/tree/master/sample 下载了一个 spring saml 安全示例,浏览了参考指南和各种其他 SAML links.

我需要问的一件事是,因为服务提供商必须发送 Saml AuthRequest,我们在程序中在哪里定义它。

我已尝试实施示例并创建了虚拟项目以将其与 OpenAM 一起使用,这对于 SSO 来说工作正常,但我不明白 Saml 身份验证请求是从哪里生成的。

I got to know that the SP's system itself is going to generate authentication request and send it to IDP using SAML 2.0 protocol. I need help about the parameters i need to pass so that i can customize my own saml authentication request

非常感谢任何帮助!。提前致谢。 (我知道这是一个愚蠢的问题,但我无能为力,因为我一无所知。)

根据所选的身份验证提供程序和您的过滤器链的配置执行身份验证请求。在使用像 Spring 这样的高级框架时,这些方面的一些细节是透明的。 Spring SAML 基于 OpenSAML 库,提供了一组工具以便轻松处理 Spring 应用程序的整个 AuthN 过程。

确实,要正确完成此过程,您需要设置您的应用程序端点 (entityID)、验证各方身份的证书、保护您的应用程序路径、配置绑定协议、在 IdP 之间建立信任关系和您的应用程序交换一些元数据。

例如,考虑如下代码存根,取自 vdenotaris/spring-boot-security-saml-sample:

@Bean
public MetadataGenerator metadataGenerator() {
    MetadataGenerator metadataGenerator = new MetadataGenerator();
    metadataGenerator.setEntityId("com:vdenotaris:spring:sp");
    metadataGenerator.setExtendedMetadata(extendedMetadata());
    metadataGenerator.setIncludeDiscoveryExtension(false);
    metadataGenerator.setKeyManager(keyManager()); 
    return metadataGenerator;
}

您可以检查我的元数据生成自定义参数,为基于 SAML 的 SSO 自定义我的应用程序设置。

AuthN 请求通常通过在第三方资源(即网站)上重定向用户来执行,并在其中提供凭据。验证后,IdP 向请求者应用程序(服务提供商)发送包含用户信息的 SAML 信封。