【问题标题】:Are dynamic urls with static authority are safe?具有静态权限的动态网址是否安全?
【发布时间】:2021-01-08 14:30:13
【问题描述】:

来自this doc

虽然可以使用清单编辑器使用通配符设置重定向 URI,但我们强烈建议您遵守 RFC 6749 的第 3.1.2 节并仅使用绝对 URI。

现在他们举例说明权限是动态的 (https://*.contoso.com)。 就我而言,只有路径是动态的,例如:https://example.com/users/{id}/profile

在这种情况下,在重定向 URI 中使用通配符是否安全:https://example.com/users/*/profile

由于在重定向 URI 中使用通配符,我是否需要进行其他安全检查?

【问题讨论】:

    标签: oauth-2.0 azure-active-directory microsoft-graph-api


    【解决方案1】:

    这需要你自己的感觉,我可以告诉你,如果你在重定向 URI 中使用通配符,例如 https://example.com/users/*/profile,用户可以在授权后重定向到 OAuth 2.0 授权 URI 中配置的任何 redirect_uri,例如auth code flow,匹配 https://example.com/users/*/profile,例如https://example.com/users/test/profile.

    您应该注意,通配符 URI 仅适用于配置为仅登录组织的 Azure AD 租户中的工作或学校帐户的应用。

    【讨论】:

    • 谢谢,我需要我的应用程序与其他租户(多租户)一起使用。我更改了清单,似乎它正在工作。我应该担心吗?
    • @Michael 您是否尝试使用个人帐户登录?我不认为它会起作用,正如文档所说Wildcard URIs are currently unsupported in app registrations configured to sign in personal Microsoft accounts and work or school accounts.
    • 不,我不需要个人帐户访问权限。
    • @Michael 如果是这样,基本上它应该是安全的,但仍然建议您通过 RFC 使用绝对 url。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-09-12
    • 2013-07-25
    • 2013-11-29
    • 2021-09-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多