我正在努力使用网关为REST API设计SAML2.0身份验证.REST在我的后端和我的应用程序之间使用.我正在使用Java Servlet过滤器和Spring.
我看到两种可能性:
每次都将SAML令牌添加到标题中.
使用SAML进行一次身份验证,然后在客户端和网关之间使用会话或类似(安全对话).
案例1:这是一个很好的解决方案,因为我们仍然是RESTful但是:
案例2:它不再是无状态,我必须与客户端建立链接.由于我使用网关,底层服务仍然可以是RESTful.
案例2寻找更好的选择,尽管它不遵循其余约束.
是否有人已经这样做并给我一些指示(设计或实施)?
使用SAML有更好的方法吗?
欢迎任何帮助或建议.
I have an application workflow like this
(A) User-Agent (browser) <-----> (B) App Server <------> (C) REST service
Suppose the app server (B) is a SAML service provider and user@domain authenticates from the browser (A) to the app server (B) using the Web Browser SSO profile.
How can an application running on (B) authenticate to a REST service (C) as user@domain.com? (Assuming B and C are both SAML SP's on the same IdP.)
If the browser were just making …