【问题标题】:Prevent WSO2 AM of dropping authorization token from request防止 WSO2 AM 从请求中删除授权令牌
【发布时间】:2018-06-22 17:14:59
【问题描述】:

根据文档

当您向后端发送 API 请求时,您会在请求的 Authorization 标头中传递一个令牌。 API 网关使用此令牌授权访问,然后将其从传出消息中删除。 link

我想将此令牌传递给每个已发布 API 的后端。配置此类行为的正确位置是什么?

【问题讨论】:

    标签: wso2 wso2-am


    【解决方案1】:

    从 API Manager 3.0.0 版开始configuration model has been changed。因此,在 api-manager.xml 中所做的任何更改都会在服务器重启后恢复。

    现在我们需要更改<API-M_HOME>/repository/conf/deployment.toml

    Uncomment and set the following lines:

    [apim.oauth_config]
    enable_outbound_auth_header = true
    

    enable_outbound_auth_header 字符串 默认值:FALSE 如果为 TRUE,则将 Auth 标头发送到后端 来自客户。

    【讨论】:

      【解决方案2】:

      repository/conf/api-manager.xml 中取消注释下面的配置并设置false

      <RemoveOAuthHeadersFromOutMessage>true</RemoveOAuthHeadersFromOutMessage>
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-04-09
        • 2018-02-07
        • 1970-01-01
        • 2016-08-29
        • 2017-12-26
        • 2020-06-24
        • 2016-01-08
        • 2011-11-16
        相关资源
        最近更新 更多