简体   繁体   English

Azure AD / Python AA

[英]Azure AD / Python AA

I have a quite simple usecase. 我有一个非常简单的用例。 From my product I have to implement some kind of authentication / authorization backend for my custom application. 从我的产品中,我必须为我的自定义应用程序实现某种身份验证/授权后端。 The application itself supports LDAP as AA backend (w/o kerberos), but I'm not sure if Azure AD can be used this way externally. 应用程序本身支持将LDAP作为AA后端(不使用kerberos),但是我不确定Azure AD是否可以在外部使用。 Is this possible? 这可能吗?

If not, I'm going to implement some authentication / authorization using standard python libraries. 如果没有,我将使用标准python库实现一些身份验证/授权。 I've already found a lots of resources on this, however the whole picture still quite foggy. 我已经在这方面找到了很多资源,但是整个情况仍然很模糊。 Basically I need two functions, authenticate the user (by evaluating the username/password received by the python script), and also check some kind of group membership for authorization as I would do in LDAP. 基本上,我需要两个功能,对用户进行身份验证(通过评估python脚本接收的用户名/密码),以及像在LDAP中一样检查某种组成员身份以进行授权。

I don't want to invent the hot water, so, if there is any snippet for this, it would be great 我不想发明热水,所以,如果有任何摘录,那会很棒

Thank you L: 谢谢L:

If you want to use Azure AD for that, you would want to work against Azure Graph API 如果要为此使用Azure AD,则需要使用Azure Graph API

High level steps: 高级步骤:

  1. Create Azure AD Application 创建Azure AD应用程序
  2. Figure out token auth 找出令牌认证
  3. And using the REST API link figure the API calls to find appropriate permissions (probably adal can do that, not sure) 并使用REST API链接图,API调用以查找适当的权限(不确定adal可以做到这一点,不确定)

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

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