【问题标题】:how to change wso2 api manager(3.2.0) jwt default algorithm from RS256 to S512?如何将 wso2 api manager(3.2.0) jwt 默认算法从 RS256 更改为 S512?
【发布时间】:2022-01-10 13:29:18
【问题描述】:

我正在使用 wso2 api manager 3.2.0。如何将 wso2 api manager(3.2.0) jwt 默认算法从 RS256 更改为 S512 或其他类似 hs 512 的算法?

【问题讨论】:

    标签: wso2 wso2-am wso2carbon


    【解决方案1】:

    您可以通过“deployment.toml”文件进行更改。

    #[apim.jwt]
    #enable = true
    #encoding = "base64" # base64,base64url
    #generator_impl = "org.wso2.carbon.apimgt.keymgt.token.JWTGenerator"
    #claim_dialect = "http://wso2.org/claims"
    #convert_dialect = false
    #header = "X-JWT-Assertion"
    #signing_algorithm = "SHA256withRSA"
    #enable_user_claims = true
    #claims_extractor_impl = "org.wso2.carbon.apimgt.impl.token.ExtendedDefaultClaimsRetriever"
    

    这里有一个叫做“signing_algorithm”的属性,可以改变它。

    签名算法用于对 JWT 进行签名。 JWT 的一般格式是 {token infor}.{claims list}.{signature}。当算法指定为 NONE 时,签名被关闭,JWT 看起来像 {token infor}。{claims list} 有两个字符串,由句点和句点分隔。

    此元素只能有两个值 - 默认值为 SHA256withRSANONE。[1]

    [1]。 https://apim.docs.wso2.com/en/3.2.0/learn/api-gateway/passing-end-user-attributes-to-the-backend/passing-enduser-attributes-to-the-backend-using-jwt/#passing-enduser-attributes-to-the-backend-using-jwt

    【讨论】:

    • 感谢先生的帮助
    猜你喜欢
    • 2014-04-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多