简体   繁体   English

Azure AD答复URLS和客户端凭据授予流

[英]Azure AD reply URLS and Client Credential Grant flow

I have 2 services, let's say A and B configured as web apps in azure. 我有2个服务,比如说A和B在天蓝色时配置为Web应用程序。 B needs a JWT bearer token to return a value. B需要一个JWT承载令牌来返回一个值。 So when we try to call B from A, we Include the JWT bearer token in HTTP call from A using the Client Credential Grant flow explained here: https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-oauth2-client-creds-grant-flow 因此,当我们尝试从A调用B时,我们使用此处解释的“客户端凭据授予”流将JWT承载令牌包括在A的HTTP调用中: https : //docs.microsoft.com/zh-cn/azure/active-directory/开发/ V1-的oauth2-客户creds赠款流

Now the AAD registration of service B doesn't have localhost as it's reply URL but I noticed that I was able to talk to it from localhost. 现在,服务B的AAD注册没有回复地址的本地主机,但我注意到我能够从本地主机与其进行对话。 So Does AAD not respect reply URLs in client credential grant flow? 那么,AAD是否不尊重客户端证书授予流程中的回复URL?

My understanding of reply URLs is this: 我对回复网址的理解是:

“In the case of a web API or web application, the Reply URL is the location to which Azure AD will send the authentication response, including a token if the authentication was successful.” “对于Web API或Web应用程序,答复URL是Azure AD将身份验证响应发送到的位置,如果身份验证成功,则包括令牌。”

I'm using AuthorizationContext.AcquireTokenAsync() method with client credentials of App A and resource id of App B. So It should not return me the token to localhost because it's not configured? 我使用的是AuthorizationContext.AcquireTokenAsync()方法,其中包含应用程序A的客户端凭据和应用程序B的资源ID。因此,由于未配置令牌,因此不应将其返回给本地主机吗?

Now the AAD registration of service B doesn't have localhost as it's reply URL but I noticed that I was able to talk to it from localhost. 现在,服务B的AAD注册没有回复地址的本地主机,但我注意到我能够从本地主机与其进行对话。 So Does AAD not respect reply URLs in client credential grant flow? 那么,AAD是否不尊重客户端证书授予流程中的回复URL?

No, reply URLs define the destinations where AAD can send tokens after user authenticates. 否,回复URL定义了AAD在用户验证后可以发送令牌的目的地。 In client credentials flow the tokens are sent in a response to a request from a program. 在客户端凭证流中,令牌是对程序请求的响应而发送的。 So they do not matter. 所以他们没关系。

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

相关问题 Springboot+Oauth 客户端凭证授予流程与 Azure AD - Springboot+Oauth Client Credential Grant Flow with Azure AD Azure AD OAuth 客户端凭据授予流程 - Azure AD OAuth Client Credentials Grant flow Azure AD阻止添加HTTP答复URL - Azure AD prevents adding HTTP reply URLs 在使用 Azure AD 客户端凭据流生成的访问令牌中的 UPN 声明中添加自定义值 - Add Custom value in UPN claim in Access Token generated using Azure AD Client Credential Flow Microsoft Identity Web:Azure AD 客户端凭据流与基于证书的身份验证 - Microsoft Identity Web : Azure AD Client Credential flow with Certificate Based Authentication 租户ID在客户端凭证授予流中是否始终保持相同? - Does the tenant ID stays always the same in the client credential grant flow? 使用 Spring 设置 Azure 客户端凭据流 - Setup Azure Client Credential Flow with Spring Azure AD Graph - 使用应用程序凭据流创建 AppRole - Azure AD Graph - AppRole Creation using Application Credential Flow Azure AD-具有守护程序服务和授权代码授予流的多租户,目标租户可以生成client_secret吗? - Azure AD - Multi-Tenant with Daemon Service and Authorization Code Grant flow, can a target tenant generate a client_secret? Azure AD 快速入门说回复 url 与应用程序不匹配 - Azure AD Quickstart says reply urls don't match the application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM