WSO2 IS:如何设置 Commonauth 调用者路径

WSO2 IS: How to Set Commonauth Caller Path

我是 运行 WSO2 5.7.0,使用 OIDC 和隐式流程。我已将上下文根设置为 wso2-is,因此授权端点位于 http://MY_DOMAIN/wso2-is/oauth2/authorize。当我通过对 oauth2/authorize 端点的 GET 调用开始流程时,我被重定向到 http://MY_DOMAIN/authenticationendpoint/login.do?client_id=MY_CLIENT_ID&commonAuthCallerPath=%2Foauth2%2Fauthorize...

问题是它删除了上下文根,所以后来在隐式流中我被(错误地)重定向到 http://MY_DOMAIN/oauth2/authorize,这失败了,因为 URL 缺少 [= 的上下文根10=]。代码中的How/where是commonAuthCallerPath参数集吗?

根据 the official documentation使用反向代理 是向 wso2 产品添加自定义上下文路径的推荐方法。

如果您不打算使用反向代理,我建议您按照以下步骤添加自定义上下文路径。但是,请注意,我仅使用 oauth2/oidc 测试了基本身份验证。

  1. repository/conf/carbon.xml中的WebContextRoot设置为/wso2-is以更改carbon管理控制台的上下文路径
  2. repository/conf/carbon.xml中的ProxyContextPath设置为/wso2-is
  3. 通过添加前缀 wso2-is#
  4. 重命名 repository/deployment/server/webapps/ 中的 oauth2.warauthenticationendpoint.war
  5. 通过在端口后添加上下文路径 /wso2-is 来更新 repository/conf/indeitiy/identity.xml 以下模式的所有相关实例 ${carbon.protocol}://${carbon.host}:${carbon.management.port}/xxxxx ${carbon.protocol}://${carbon.host}:${carbon.management.port}/wso2-is/xxxxx

  6. 通过添加 /wso2-is 前缀

    [= 更新 repository/conf/identity/application-authentication.xml 中的 AuthenticationEndpointURLAuthenticationEndpointRetryURLAuthenticationEndpointMissingClaimsURL 值53=]
  7. 重新启动身份服务器

不要忘记,这不是 the documentation 中推荐的方式。