要验证您的逻辑应用程序发送的令牌中存在哪些索赔,您可以按照以下步骤进行操作:
1。启用托管身份:确保您的逻辑应用程序使用托管身份。这涉及在逻辑应用程序的身份设置中启用系统分配或用户分配的身份[5]。
2。捕获令牌:修改接收逻辑应用程序以在其响应中返回传入请求的标题。这使您可以捕获授权标头,其中包含由发送逻辑应用程序发送的携带者令牌[1]。
3。解码令牌:使用JWT.IO之类的工具来解码捕获的携带者令牌。这将揭示令牌中存在的所有索赔,例如``appid','appidacr',`iSS`和其他[1]。
4。验证索赔:一旦确定了令牌中的索赔,就可以根据您的授权政策进行验证。确保发行人(``ISS')索赔与您的Azure AD租户ID匹配,并验证其他任何必要的索赔,例如``appid''或'groups' [3] [10]。
5。调试:如果遇到问题,请简化您的授权政策,仅检查像发行人这样的基本主张。这有助于隔离与特定索赔检查有关的问题[1]。
通过遵循以下步骤,您可以有效地验证和验证逻辑应用程序发送的令牌中的索赔。
引用:
[1] https://hybridbrothers.com/ususe-managed-indistities-in-logic-app-http-triggers/
[2] https://learn.microsoft.com/en-us/security/zero-trust/develop/configure-tokens-tokens-cloup-clair--clairs-app-roles
[3] https://learn.microsoft.com/en-us/entra/indentity-platform/claims-validation
[4] https://turbo360.com/blog/logic-app-best-practices-practices-tips-and-tricks-10-fix-connectors-or-api-connections
[5] https://stackoverflow.com/questions/58821345/logic-app-calling-webapi-with-with-managed-managed-indistity-what-what-what-kind-kind of-token-is-is-is-is-is-inded-to-to-to-to-re
[6] https://community.auth0.com/t/token-not-working-in-azure-logic-apps/48174
[7] https://www.codit.eu/blog/service-bus-clair-check-check-app-for-logic-apps/
[8] https://www.reddit.com/r/azure/comments/wzlsle/noob_question_how_do_do_i_i_tell_if_a_a_logic_if_is_is_is_on/
[9] https://marczak.io/posts/2019/08/secure-logic-app-with-api-management/
[10] https://adityadeshpandeadi.wordpress.com/2020/07/23/authorization-for-azure-logic-apps-token-基于