首页 文章

WSO2 IS:如何允许匿名请求OIDC .well-known / openid-configuration

提问于
浏览
3

通常,对于OIDC发现,可以匿名请求.well已知的URI . WSO2 5.3.0 doc中的示例声明必须为请求提供管理级凭据:

https://docs.wso2.com/display/IS530/OpenID+Connect+Discovery

curl -v -k --user admin:admin https // localhost:9443 / oauth2 / oidcdiscovery / .well-known / openid-configuration

(下划线不是typpo而是绕过URL计数限制)

我可以确认导致curl -v -k https // localhost:9443 / oauth2 / oidcdiscovery / .well-known / openid-configuration返回401未授权 .

(下划线不是typpo而是绕过URL计数限制)

我尝试在/ _system / config / oidc的注册表中配置权限,“SYSTEM / wso2.anonymous.role is ALLOWed to READ”,我仍然得到401. Adiing“SYSTEM / wso2.anonymous.role”的权利是允许AUTHORIZE“返回200但是空身 .

关于如何解决OIDC发现(获得OIDC配置)而不必提供任何信誉(匿名)的任何建议?

谢谢

JF

2 回答

  • 0

    经过多次试验,可以通过在 /repository/conf/identity/identity.xml中注释.well-know行来提供匿名访问:

    <ResourceAccessControl>
        <Resource context="(.*)/api/identity/user/(.*)" secured="true" http-method="all"/>
        <Resource context="(.*)/api/identity/recovery/(.*)" secured="true" http-method="all"/>
        <!--<Resource context="(.*)/.well-known(.*)" secured="true" http-method="all"/>-->
        <Resource context="(.*)/identity/register(.*)" secured="true" http-method="all">
            <Permissions>/permission/admin/manage/identity/applicationmgt/delete</Permissions>
        </Resource>
        <Resource context="(.*)/identity/connect/register(.*)" secured="true" http-method="all">
            <Permissions>/permission/admin/manage/identity/applicationmgt/create</Permissions>
        </Resource>
        <Resource context="(.*)/oauth2/introspect(.*)" secured="true" http-method="all">
            <Permissions>/permission/admin/manage/identity/applicationmgt/view</Permissions>
        </Resource>
        <Resource context="(.*)/api/identity/entitlement/(.*)" secured="true" http-method="all">
            <Permissions>/permission/admin/manage/identity/pep</Permissions>
        </Resource>
    </ResourceAccessControl>
    
  • 4

    您可以使用类似Apache2 Reverse Proxy to an end-point that requires BasicAuth but want to hide this from user的方式将代理反向代理到该 endpoints ,或者,考虑到数据是相对静态的,您可以只下载数据并从其他地方的未受保护的 endpoints 提供数据 .

    但我想最好找到关闭基本身份验证的配置设置,因为它没有用处 .

相关问题