[英]Is it possible to implement a key store in WSO2 Enterprise Integrator?
Is it possible to implement a key store for external endpoints in the WSO2-Integrator?是否可以在 WSO2-Integrator 中为外部端点实现密钥存储?
I'm building a solution with multiple endpoints that will all have their seperate authorization keys.我正在构建一个具有多个端点的解决方案,这些端点都有各自的授权密钥。 Currently, these are hard-coded into the sequences: the header is created right before I send the message to the endpoint.目前,这些被硬编码到序列中:header 是在我将消息发送到端点之前创建的。 The authorization is hard-coded into that header.授权被硬编码到 header 中。
Is it possible to create a seperate authorization key file and use the keys there as variables to call upon when you create the header?是否可以创建一个单独的授权密钥文件,并在创建 header 时将其中的密钥用作要调用的变量?
Current situation:现在的情况:
<header name="Accept" scope="transport" value="application/json"/>
<header name="Authorization" scope="transport" value="Bearer [authorization key gibberish]"/>
<call description="Send request to the endpoint">
<endpoint key="PostEndpoint"/>
</call>
Given Access Tokens
should be stored securely in the server the best option is to use securevault
and then extract the required token from Secure Vault within the integration.鉴于Access Tokens
应该安全地存储在服务器中,最好的选择是使用securevault
,然后在集成中从 Secure Vault 中提取所需的令牌。 Once stored you can read a token like the below.存储后,您可以读取如下所示的令牌。 Read more from here .从这里阅读更多信息。
<property expression="wso2:vault-lookup('accesstoken')" name="accesstoken"/>
<header name="Authorization" scope="transport" expression="fn:concat('Bearer ', $ctx:accesstoken)"/>
<call description="Send request to the endpoint">
<endpoint key="PostexEndpoint"/>
</call>
If you want to just store them in a properties file as key-value pairs you can refer to this document .如果您只想将它们作为键值对存储在属性文件中,您可以参考此文档。
You can use a securevault, such as HashiCorp Vault [1], and call for credentials to be populated when the endpoint is activated [2].您可以使用安全保险库,例如 HashiCorp Vault [1],并要求在激活端点时填充凭据 [2]。
[1] https://ei.docs.wso2.com/en/7.2.0/micro-integrator/setup/security/using-hashicorp-secrets/ [1] https://ei.docs.wso2.com/en/7.2.0/micro-integrator/setup/security/using-hashicorp-secrets/
[2] https://docs.wso2.com/display/EI660/HTTP+Endpoint Go down to the "Client credentials grant type" section. [2] https://docs.wso2.com/display/EI660/HTTP+Endpoint Go 到“客户端凭据授予类型”部分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.