.NET (ADFS / WIF) 和 Java (Federation) 之间的属性如何映射
假设有两家公司:A.NET(一家 .NET 商店)和 B.Java(一家 Java 商店)。 每家公司的用户都需要访问对方公司的网站,因此两家公司使用 ADFS 和 Oracle Identity Federation 或 OpenSSO Federation 建立联合。
在 .NET 世界中,属性作为 IClaimsPrincipal 和 IClaimsIdentity 内的声明进行访问。
在 Java 世界中,属性作为 HTTP 标头进行访问。
联合基础设施是否自动执行此映射,即
如果 A.NET 用户访问 B.Java 站点,他们是否会获取其属性作为声明?
如果 B.Java 用户访问 A.NET 站点,他们是否会获取其属性作为标头?
Assume there are two companies: A.NET which is a .NET shop and B.Java which is a Java shop.
Users in each company need to access the other company's web sites so the two companies set up Federation using ADFS and Oracle Identity Federation or OpenSSO Federation.
In the .NET world, the attributes are accessed as claims inside IClaimsPrincipal and IClaimsIdentity.
In the Java world, the attributes are accessed as HTTP headers.
Does the Federation infrastructure do this mapping automatically i.e.
If a A.NET user accesses a B.Java site do they get their attributes as claims?
If a B.Java user accesses a A.NET site do they get their attributes as headers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您可以在两侧使用 WS-Federation,那么在这两种情况下,您要处理的主要工件都是 SAML 令牌。
一般来说,您的联合基础设施完全独立于应用程序堆栈。在任何一种情况下,ADFS 都会颁发 SAML 令牌(对于 Java 应用程序和 .NET 应用程序)。 OIF 还必须为两组用户颁发 SAML 令牌。
在 .NET 世界中,WIF 会将 SAML 令牌解析/验证等转换为表示其中信息(声明、颁发者等)的 .NET 对象模型。该对象模型是ClaimsPrincipal(以及所有相关的接口和类型)。您必须查看 Java 世界中的 WIF 等效项。但无论哪种情况,输入都是 SAML 令牌。
在您的场景中,两个 STS 中可能都会有令牌转换:
对于 .NET 应用程序:
1- B 公司的用户在 OIF 上进行身份验证并获取 A 公司的 SAML 令牌
2-用户将令牌发送到ADFS
3- ADFS 从 B 读取令牌,验证并颁发新令牌(可能且很可能添加/转换/删除声明)
4-用户将转换后的令牌发送到应用程序 A
A 中的用户访问 B 上的 java 应用程序的序列完全相同。请注意,本例中存在双向信任(A 公司信任 B 的发行人,反之亦然)
Assuming you can use WS-Federation on both sides, then in both cases the main artifact you would be dealing with is a SAML token.
In general, your federation infrastructure is completely independent of the application stack. ADFS would issue SAML tokens in either case (for the Java app and for the .NET app). OIF would also have to issue SAML tokens for both sets of users.
In the .NET world, WIF will parse/validate, etc. the SAML token into a .NET object model that represents the information in it (the claims, the issuer, etc). That object model is the ClaimsPrincipal (and all related interfaces and types). You would have to look at the WIF equivalent on the java world. But in either case, the input is a SAML token.
In your scenario it is likely that there will be a token transformation in both STSs:
For the .NET app:
1- user from the B company authenticates on OIF and gets a SAML token for company A
2- user sends token to ADFS
3- ADFS reads the token from B, validates and issues a new token (potentially and very likely adding/transforming/removing claims)
4- user sends the transformed token to app A
The sequence from a user in A accesing the java app on B is exactly the same. Notice there's a bidirectional trust in this case (Company A trusts issuer in B and viceversa)