Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Web services 403在安全的双向ssl环境中调用web服务时禁止响应_Web Services_Rest_Tomcat_Ssl_Jakarta Ee - Fatal编程技术网

Web services 403在安全的双向ssl环境中调用web服务时禁止响应

Web services 403在安全的双向ssl环境中调用web服务时禁止响应,web-services,rest,tomcat,ssl,jakarta-ee,Web Services,Rest,Tomcat,Ssl,Jakarta Ee,我有一个使用apachecfx实现的restfulweb服务。web服务的URL类似于htts://hostname:port/ServiceName/param1/param2/param3. 它在tomcat强化环境中运行,在web xml中,安全约束配置如下 <security-constraint> <web-resource-collection> <web-resource-name>Source Name</web

我有一个使用apachecfx实现的restfulweb服务。web服务的URL类似于htts://hostname:port/ServiceName/param1/param2/param3.

它在tomcat强化环境中运行,在web xml中,安全约束配置如下

<security-constraint>
    <web-resource-collection>
        <web-resource-name>Source Name</web-resource-name>
        <url-pattern>/ServiceName</url-pattern>
    </web-resource-collection>
    <auth-constraint>
        <role-name>ws-role-name</role-name>
        <role-name>ws-admin-role-name</role-name>
    </auth-constraint>
    <user-data-constraint>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
</security-constraint>

源名称
/服务名
ws角色名称
ws-admin角色名称
保密的
这在启用了双向SSL的相同配置环境中进行了测试,并且我能够使用curl命令成功地调用web服务。但是,在另一个启用了相同tomcat强化功能且在调用web服务时支持双向SSL的环境中,我收到了以下错误

    < HTTP/1.1 403 Forbidden
< Content-Type: text/html;charset=utf-8
< Content-Language: en
< Content-Length: 1027
< Vary: Accept-Encoding
< Date: Sat, 10 Oct 2016 01:02:23 GMT
< Server: Jetty
< 
<html><head><title>Jetty - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 403 - Access to the requested resource has been denied</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Access to the requested resource has been denied</u></p><p><b>description</b> <u>Access to the specified resource has been forbidden.</u></p><HR size="1" noshade="noshade"><h3>Jetty</h3></body></ht* Connection #0 to host host name left intact
* Closing connection #0
类型状态报告拒绝访问请求的资源的消息说明禁止访问指定的资源。


Jetty
<url-pattern>/ServiceName/*</url-pattern>