简体   繁体   English

如何为Spring Boot应用程序实现SAML?

[英]How do I implement SAML for my Spring Boot application?

I have an internal application hosted on AWS with https. 我有一个内部应用程序,它通过https托管在AWS上。 I need help understanding how to implement SAML authentication to my web application. 我需要帮助,以了解如何对我的Web应用程序实施SAML身份验证。 I am using Spring Boot for my backend and AngularJS for my front end. 我的后端使用Spring Boot,前端使用AngularJS。 I am using ADFS as my IP. 我正在使用ADFS作为我的IP。 From what I gather, the following are the steps. 根据我的收集,以下是步骤。

  1. Get a https URL for your application 获取您的应用程序的https URL
  2. Create a basic ADFS trust. 创建基本的ADFS信任。
  3. Add the roles on ADFS 在ADFS上添加角色
  4. Get a metadata URL and enter it in your application.properties. 获取元数据URL并将其输入到application.properties中。

I am trying to implement SAML for the first time and have confused myself completely. 我正在尝试第一次实施SAML,并完全感到困惑。 Any thoughts shared would be greatly appreciated. 任何想法共享将不胜感激。

Your Spring Boot application needs to be a Service Provider (SP) that trusts your ADFS Identity Provider (IdP) and you ADFS IdP needs to trust your SP. 您的Spring Boot应用程序必须是信任您的ADFS身份提供程序(IdP)的服务提供商(SP),而ADFS IdP需要信任您的SP。 This trust is usually done using the SAML2 metadata profile, ie the SP and IdP SAML2 metadata files. 通常使用SAML2元数据配置文件(即SP和IdP SAML2元数据文件)来完成此信任。

You can either design your application as a 'standalone', ie no SAML ability and put something in front of it that understand SAML and blocks all requests until the IdP sends attributes. 您可以将应用程序设计为“独立”应用程序,即没有SAML功能,并在其前面放置一些可以理解SAML并阻止所有请求的操作,直到IdP发送属性为止。 This is how the standard Shibboleth SP works but it needs Apache. 这就是标准Shibboleth SP的工作方式,但它需要Apache。 The other option is to use the framework to plumb in the SAML capability such as Spring Security SAML 另一个选择是使用框架来探查SAML功能,例如Spring Security SAML。

暂无
暂无

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

相关问题 如何在Spring Boot Application中实现自定义身份验证 - How to implement customized authentication in Spring Boot Application 单个Spring Boot应用程序中的SAML和Oauth2 - SAML and Oauth2 in a single spring boot application 是否可以使用 SAML2 在 ReactJs 应用程序中实现 SSO? 如果可能的话如何? - Is it possible to implement SSO in a ReactJs application with SAML2? if possible how? 如何在我的应用程序中实现内置的django auth和第三方social-auth? - How do i implement both built-in django auth and third party social-auth in my application? 我可以使用两个不同的表通过 spring 安全登录我的 spring 引导应用程序吗? - Can i use two different tables for login in my spring boot application by spring security? 如何使用 keycloak-saml 适配器将第三方 IdP SAML 属性映射到我的本地应用程序角色 - How to map third party IdP SAML attributes to my local application roles using keycloak-saml adapter 如何使用单页应用程序和REST后端实现授权? - How do I implement Authorization with a Single Page Application and REST Backend? 如何为Spring Webflux应用程序实现自定义Spring Security预身份验证方案? - How can I implement a custom Spring Security PreAuthentication scenario for a Spring Webflux application? 如何在我的网站上实施“使用谷歌登录”? - How do I implement ‘sign in with google’ on my site? 如何使用OpenID并在我的Laravel应用程序中实现它? - How do I use OpenID and implement it in my Laravel app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM