gpt4 book ai didi

tomcat - wso2esb "Unable to validate SSL Certificate"

转载 作者:行者123 更新时间:2023-11-28 22:19:36 25 4
gpt4 key购买 nike

我无法将我在 wso2esb (4.8.1) 中的自定义代理连接到我只能在 https 上访问的 tomcat 部署的 soap 服务。

我已经将我的自签名 Tomcat 证书导入到 wso2esb 的客户端信任库,并以这种方式在传输部分编辑了 WSO2_ESB/repository/conf/axis2/axis2.xml:

<transportSender name="https"class="org.apache.synapse.transport.passthru.PassThroughHttpSSLSender">
<parameter name="non-blocking" locked="false">true</parameter>
<parameter name="keystore" locked="false">
<KeyStore>
<Location>repository/resources/security/wso2carbon.jks</Location>
<Type>JKS</Type>
<Password>wso2carbon</Password>
<KeyPassword>wso2carbon</KeyPassword>
</KeyStore>
</parameter>
<parameter name="truststore" locked="false">
<TrustStore>
<Location>repository/resources/security/client-truststore.jks</Location>
<Type>JKS</Type>
<Password>wso2carbon</Password>
</TrustStore>
</parameter>
<parameter name="HostnameVerifier">AllowAll</parameter>
</transportSender>

无论如何,每次我尝试在 wso2esb 中将地址端点设置为我的输出序列并对其进行测试时,我都会收到此消息:“无法验证 SSL 证书”

此外,当我创建自定义代理时,如果我尝试通过提供 wsdl 的地址来指定发布 WSDL 的源 URI 并对其进行测试,我会收到消息“无效的 WSDL URI(无法建立连接)”

我不知道还能做什么。请帮我解决这个问题。非常感谢

编辑:现在我有另一个问题:我编写了代理,如果我尝试使用 WSO2IS 中仅基于用户名的策略集,它会正常。

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="Prova1"
transports="https"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<entitlementService remoteServiceUrl="https://localhost:9443/services/"
remoteServiceUserName="admin"
remoteServicePassword="enc:kuv2MubUUveMyv6GeHrXr9il59ajJIqUI4eoYHcgGKf/BBFOWn96NTjJQI+wYbWjKW6r79S7L7ZzgYeWx7DlGbff5X3pBN2Gh9yV0BHP1E93QtFqR7uTWi141Tr7V7ZwScwNqJbiNoV+vyLbsqKJE7T3nP8Ih9Y6omygbcLcHzg="
callbackClass="org.wso2.carbon.identity.entitlement.mediator.callback.UTEntitlementCallbackHandler"
client="basicAuth">
<onReject>
<makefault version="soap11">
<code xmlns:soap11Env="http://schemas.xmlsoap.org/soap/envelope/"
value="soap11Env:VersionMismatch"/>
<reason value="you're not authorized"/>
<role/>
</makefault>
</onReject>
<onAccept>
<send>
<endpoint>
<address uri="https://localhost:8443/Calculator/services/Calcolatrice"/>
</endpoint>
</send>
</onAccept>
<obligations/>
<advice/>
</entitlementService>
</inSequence>
<outSequence>
<send/>
</outSequence>
<faultSequence>
<send/>
</faultSequence>
</target>
<publishWSDL uri="http://localhost:8080/Calculator/services/Calcolatrice?wsdl"/>
<parameter name="ScenarioID">scenario1</parameter>
<enableSec/>
<policy key="conf:/repository/axis2/service-groups/Prova1/services/Prova1/policies/UTOverTransport"/>
<description/>
</proxy>

现在我正在努力将 wso2 IS 作为 PDP。我解释得更好:如果我使用仅基于用户名或角色的规则设置策略,那么如果我尝试使用代理就没问题。一旦我尝试根据资源名称设置策略,它就无法正常工作,如果我尝试使用代理,它会给我错误消息“AxisFault:传入消息的输入流为空”。我不知道问题是出在我指定的资源上(我尝试了代理端点和 Tomcat 部署的服务端点,但都不起作用)还是权利调解器没有将资源名称发送到 wso2is。如果有人能帮助我,那将非常有用

编辑 2: 这是启用调试后的消息: enter image description here

所以我输入了调试控制台中指示的资源名称:

/services/Prova1.Prova1HttpsSoap12Endpoint/prodotto

现在它可以工作了(我不知道我必须使用这种语法)和允许的决定。但是当(我想)决定应该被拒绝时,我仍然得到“AxisFault:传入消息的输入流为空”。对于我在调试控制台中看到的情况,本例中的决定是 NotApplicable 而不是 Deny。我还是不明白为什么。我想 XACML 策略有问题。在这里:

<Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" PolicyId="prova5" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable" Version="1.0">
<Target>
<AnyOf>
<AllOf>
<Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">/services/Prova1.Prova1HttpsSoap12Endpoint/prodotto</AttributeValue>
<AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/>
</Match>
</AllOf>
</AnyOf>
</Target>
<Rule Effect="Permit" RuleId="regola5">
<Condition>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-is-in">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">NormalUser</AttributeValue>
<AttributeDesignator AttributeId="http://wso2.org/claims/role" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/>
</Apply>
</Condition>

编辑 2.1

看看这个,我已经将 RuleCombiningAlg 从“First Applicable”更改为“Deny unless Permit”,现在从调试控制台的决定最终是“拒绝”,但我仍然得到“AxisFault:传入的输入流当我在 wso2esb 中使用“TryIt”时出现“消息为空”错误。相反,我希望收到来自代理的错误消息。这是我得到的:

enter image description here

最佳答案

我认为您不想担心测试地址端点。根据 jira,端点/WSDL URL 测试功能在 ESB 中不起作用.这是 ESB 端点 UI 中的已知限制,它不使用 axis2.xml 中定义的 SSL 配置来验证 SSL 证书。因此它给出“无法验证 SSL 证书”。但是,当您在 axis2.xml 中配置好所有内容时,Service invocation must work 文件。因此,请在创建代理服务时跳过“测试”部分。

关于tomcat - wso2esb "Unable to validate SSL Certificate",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26833776/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com