无法使用Deployment.toml配置X509证书身份验证器

时间:2020-05-06 07:44:10

标签: wso2 identity wso2is

我有WSO2 IS 5.10.0。它使用deployment.toml。在配置x509身份验证时,我需要使用与x509相关的值来更新文件application-authentication.xml。但是,重新启动WSO2 IS时,此文件中的更新被覆盖。我怀疑这与Deployment.toml有关。要使x509在此版本的WSO2 IS上运行,我需要做什么?

1 个答案:

答案 0 :(得分:0)

除非已在deployment.toml文件中定义值,否则xml文件将被默认配置覆盖。因此,您可以将以下配置(带有您的值)添加到Deployment.toml中,然后重新启动服务器以应用它们。

[authentication.authenticator.x509_certificate.parameters]
AuthenticationEndpoint ="https://localhost:8443/x509-certificate-servlet"
username = "CN"
setClaimURI = "http://wso2.org/claims/identity/userCertificate"
EnforceSelfRegistration = true

参考:https://github.com/wso2/docs-is/issues/986

编辑:添加Tomcat连接器配置

deployment.toml添加一个额外的tomcat连接器似乎还不方便。因此,我们可以按照以下步骤操作。

在正确的位置,将以下新连接器添加到模板文件repository/resources/conf/templates/repository/conf/tomcat/catalina-server.xml.j2中。

{% for trasport in custom_trasport %}
  <Connector
  {% for name,value in trasport.properties.items() %}
            {{name}}="{{value}}"
  {% endfor %}
  >
  </Connector>
{% endfor %}

然后将所有连接器属性添加到depoyment.toml中,如下所示。

[custom_trasport.x509.properties]
protocol="HTTP/1.1"
port="8443"
maxThreads="200"
scheme="https"
secure="true"
SSLEnabled="true"
keystoreFile="/path/to/keystore.jks"
keystorePass="keystorepwd"
truststoreFile="/path/to/truststore.jks"
truststorePass="truststorespassword"
bindOnInit = "false"
clientAuth="want"
sslProtocol="TLS"