简体   繁体   English

Azure Active Directory SSO - 帐户映射

[英]Azure Active Directory SSO - Account Mapping

iam currently researching how to implement Single Sign On for our WebService. iam目前正在研究如何为我们的WebService实现单点登录。 This is what i came up with so far. 这就是我到目前为止所提出的。

  1. If a customer of our WebService has an AzureActiveDirectory they can log on with their active directory user account to our WebService if we provide the nessecary interfaces for SAML, Oauth2, OpenID or whatever authorization protocoll we chose and azure supports. 如果我们的WebService的客户有AzureActiveDirectory,他们可以使用他们的活动目录用户帐户登录到我们的WebService,如果我们为SAML,Oauth2,OpenID或我们选择的任何授权协议提供nessecary接口并且azure支持。
  2. The customers could also have their local network Active Directory synced to their Azure AD and use their Domain accounts to log on to our WebApplication. 客户还可以将其本地网络Active Directory同步到其Azure AD,并使用其域帐户登录到我们的WebApplication。
  3. Customers need to use the myapps.microsoft.com portal to "wrap" authentication. 客户需要使用myapps.microsoft.com门户来“包装”身份验证。
  4. Once everything is set up correctly the Identity Provider (AzureAD) would provide use with (eg) an authenticated User Identity. 一旦正确设置了所有内容,身份提供商(AzureAD)将提供(例如)经过身份验证的用户身份。

Here is were my problem begins. 这是我的问题开始。 Of course i need to somehow map the identity provided by the AzureAD to a certain Account for our WebService - we cannot simply use the provided identity. 当然,我需要以某种方式将AzureAD提供的身份映射到我们的WebService的某个帐户 - 我们不能简单地使用提供的身份。

As far as i understand it, you can grant AzureAD the right to create an Account on the target WebService in the name of the user which is currently signing in. (Its called : enabling automatic user provisioning in the azure management portal). 据我了解,您可以授予AzureAD以当前登录用户名称在目标WebService上创建帐户的权限。(其名称为:在azure管理门户中启用自动用户配置)。

However, when testing this with the Box, Canvas or Google apps i failed. 但是,使用Box,Canvas或Google应用程序测试时,我失败了。 Either i got an error or in the case of google apps i was just promted to login with my azure AD test account and then asked for a password and username of my google account (i set up SSO as an azure AD trust relation- so this should not happen) 要么我得到一个错误,或者在谷歌应用程序的情况下,我只是被允许登录我的天蓝色AD测试帐户,然后要求我的密码和我的谷歌帐户的用户名(我将SSO设置为天蓝色的AD信任关系 - 所以这不应该发生)

Can someone provide some insights on how to accomplish the following? 有人可以提供一些有关如何完成以下内容的见解吗?

Once the user is authenticated by SSO I want to create an account for our WebSerivce and then save the credentials for that user only in the Active directory of that particular user. 一旦用户通过SSO进行身份验证,我想为我们的WebSerivce创建一个帐户,然后仅将该用户的凭据保存在该特定用户的Active目录中。 So if the user logs in the second time we can check wether there is an account already existing and log in the user with this account. 因此,如果用户第二次登录,我们可以检查是否存在已存在的帐户,并使用此帐户登录用户。

(I was told by microsoft that this might be possible with Azure Rights Management, but i cannot really find good documentation on that) (微软告诉我,这可能是Azure Rights Management的可能,但我真的找不到那方面的好文档)

Storing the relationship: "Microsoft AD Identity <-> our WebServiceAccount Credentials" on our side is not desired because we cannot securly encrypt the data in a way that we DONT know whats in there. 存储关系:我们不希望“Microsoft AD Identity < - >我们的WebServiceAccount凭证”,因为我们不能以我们不知道在那里知道什么的方式安全地加密数据。 (or there is , and i dont know of it yet) (或者有,我还不知道它)

"Bonus Question": Can i support SSO for a desktop application too? “奖金问题”:我是否也可以支持桌面应用程序的SSO? (Do i need a provide proxy web application or can the desktop app do this directly?) (我是否需要提供代理Web应用程序,或桌面应用程序可以直接执行此操作吗?)

Please see my answer to a similar question here: asp.net azure active directory user profile data 请在此处查看我对类似问题的回答: asp.net azure活动目录用户配置文件数据

However - I'm trying to understand if you need something different. 但是 - 我想知道你是否需要不同的东西。 Are you expecting your customers to already have a directory and Azure AD accounts (maybe through having Office 365 subscriptions), and use those to sign in to your web app, or does your app scenario require creation/provisioning of user accounts into your customer's Azure AD directory? 您是否希望您的客户已拥有目录和Azure AD帐户(可能通过Office 365订阅),并使用这些帐户登录您的Web应用程序,或者您的应用程序方案是否需要在客户的Azure中创建/配置用户帐户AD目录? Provisioning can be done through graph API (as per your link), as long as the admin of your customer grants consent to allow your app to write to their directory. 只要客户的管理员同意允许您的应用程序写入其目录,就可以通过图形API(根据您的链接)完成配置。 You can find some samples on github, and I recommend you look through https://msdn.microsoft.com/en-us/library/azure/dn499820.aspx and https://msdn.microsoft.com/en-us/library/azure/dn646737.aspx for code samples. 您可以在github上找到一些示例,我建议您浏览https://msdn.microsoft.com/en-us/library/azure/dn499820.aspxhttps://msdn.microsoft.com/en-us/ library / azure / dn646737.aspx代码示例。

HTHs, HTHS,

I think, without testing it. 我想,没有测试它。 That using the Graph API enables me to save custom data for any Directory User effectively enabling my desired functionality. 使用Graph API,我可以为任何目录用户保存自定义数据,从而有效地实现我所需的功能。 This is the documentation i found very usefull. 这是我发现非常有用的文档。

https://msdn.microsoft.com/en-us/library/hh974476.aspx https://msdn.microsoft.com/en-us/library/hh974476.aspx

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM