You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Prasanth <db...@pangburngroup.com> on 2022/10/06 14:48:58 UTC

Axis2 1.8.2 with Rampart 1.7.1

Hi,

I am building a client for a web service using Axis2 1.8.1 and Rampart 1.7.1 with axis2.xml (partial) shown below. When I run in debug mode I am not getting a call to my password callback class.

Also is there a way to view the final SOAP request that is sent out after rampart adds security elements? I am able to view the SOAP request prior to Rampart security (by running the code in debug mode).

Thanks,
Prasanth


---------------------------------------------------------------------------------------------------
<axisconfig name="AxisJava2.0">

     <module ref="rampart" />

     <!-- ================================================= -->
     <!-- Parameters -->
     <!-- ================================================= -->
     <parameter name="OutflowSecurity">
         <action>
             <items>UsernameToken  Timestamp</items>
             <user>prasanth</user>
<passwordCallbackClass>com.nqadmin.callreports.client.PasswordCallback</passwordCallbackClass>
         </action>
     </parameter>


---------------------------------------------------------------------------------------------------

Re: Axis2 1.8.2 with Rampart 1.7.1

Posted by Prasanth <db...@pangburngroup.com>.
Eclipse doesn't download the mar file when using the maven plugin so I had manually download it and save it. It was still using 1.7.1 (while I downgraded the rampart version to 1.6.4 in the pom). 
After manually downloading the mar file and including it in the build path the security elements are now added.  I am still getting the 403 error. At least I have the full soap message with the 
usernameToken and Timestamp that I can send to the service provider.

Appreciate your help.

Thanks,
Prasanth

On 10/11/22 3:53 PM, robertlazarski wrote:
> I am working on a new Rampart release now, the goal is by the end of the year.
>
> For now, increase your rampart logging by:
>
>    log4j.category.org.apache.rampart=TRACE
>
> I also suggest putting all your Axis2 logging at the TRACE level.
>
> Let us know if that clarifies the HTTP 403 error. You seem not to be executing your Rampart code.
>
> On Tue, Oct 11, 2022 at 9:42 AM Prasanth <db...@pangburngroup.com> wrote:
>
>     I have talked to the service provider they don't seem to have access to the actual request to tell me what is wrong. They keep telling me to make sure I have username token, nonce and time stamp
>     in the request.
>
>     Looking at the log shouldn't I see the security details in the below SOAP request? Also when I run it in debug mode there doesn't seem to be a call back to my password callback class.  Is the
>     config I have correct?
>
>     -------------From Log--------------------------------------------
>     2022-10-10 15:18:49,121 [main] DEBUG org.apache.axis2.transport.http.SOAPMessageFormatter  - end writeTo()
>     2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "1ed[\r][\n]"
>     *2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
>     <http://www.w3.org/2003/05/soap-envelope>><soapenv:Header/><soapenv:Body><ns1:RetrieveFacsimile xmlns:ns1="http://cdr.ffiec.gov/public/services"
>     <http://cdr.ffiec.gov/public/services>><ns1:dataSeries>Call</ns1:dataSeries><ns1:reportingPeriodEndDate>06/30/2011</ns1:reportingPeriodEndDate><ns1:fiIDType>FDICCertNumber</ns1:fiIDType><ns1:fiID>57095</ns1:fiID><ns1:facsimileFormat>XBRL</ns1:facsimileFormat></ns1:RetrieveFacsimile></soapenv:Body></soapenv:Envelope>"**
>     *2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "[\r][\n]"
>     2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "0"
>     2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "[\r][\n]"
>     2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "[\r][\n]"
>     2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "<html>[\r][\n]"
>     2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "<head><title>403 Forbidden</title></head>[\r][\n]"
>     2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "<body>[\r][\n]"
>     2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "<center><h1>403 Forbidden</h1></center>[\r][\n]"
>     2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "<hr><center>Microsoft-Azure-Application-Gateway/v2</center>[\r][\n]"
>     2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "</body>[\r][\n]"
>     2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "</html>[\r][\n]"
>
>     ----------------------From axis2.xml---------------------
>     <axisconfig name="AxisJava2.0">
>         <module ref="rampart" />
>
>         <!-- ================================================= -->
>         <!-- Parameters -->
>         <!-- ================================================= -->
>         <parameter name="OutflowSecurity">
>             <action>
>                 <items>UsernameToken Timestamp</items>
>                 <user>prasanth</user>
>     <passwordCallbackClass>com.nqadmin.callreports.client.PasswordCallback</passwordCallbackClass>
>             </action>
>         </parameter>
>
>     Thanks,
>     Prasanth
>
>     On 10/11/22 1:29 PM, robertlazarski wrote:
>>
>>
>>     On Mon, Oct 10, 2022 at 10:22 AM Prasanth <db...@pangburngroup.com> wrote:
>>
>>         2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "<head><title>403 Forbidden</title></head>[\r][\n]"
>>
>>         Thanks,
>>         Prasanth
>>
>>
>>     The error "http 403" means "forbidden" and is a red flag.
>>
>>     There is something, somewhere, that is denying access to that URL.
>

Re: Axis2 1.8.2 with Rampart 1.7.1

Posted by robertlazarski <ro...@gmail.com>.
I am working on a new Rampart release now, the goal is by the end of the
year.

For now, increase your rampart logging by:

  log4j.category.org.apache.rampart=TRACE

I also suggest putting all your Axis2 logging at the TRACE level.

Let us know if that clarifies the HTTP 403 error. You seem not to be
executing your Rampart code.



On Tue, Oct 11, 2022 at 9:42 AM Prasanth <db...@pangburngroup.com> wrote:

> I have talked to the service provider they don't seem to have access to
> the actual request to tell me what is wrong. They keep telling me to make
> sure I have username token, nonce and time stamp in the request.
>
> Looking at the log shouldn't I see the security details in the below SOAP
> request? Also when I run it in debug mode there doesn't seem to be a call
> back to my password callback class.  Is the config I have correct?
>
> -------------From Log--------------------------------------------
> 2022-10-10 15:18:49,121 [main] DEBUG
> org.apache.axis2.transport.http.SOAPMessageFormatter  - end writeTo()
> 2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >>
> "1ed[\r][\n]"
> *2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "<?xml
> version='1.0' encoding='UTF-8'?><soapenv:Envelope
> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
> <http://www.w3.org/2003/05/soap-envelope>><soapenv:Header/><soapenv:Body><ns1:RetrieveFacsimile
> xmlns:ns1="http://cdr.ffiec.gov/public/services"
> <http://cdr.ffiec.gov/public/services>><ns1:dataSeries>Call</ns1:dataSeries><ns1:reportingPeriodEndDate>06/30/2011</ns1:reportingPeriodEndDate><ns1:fiIDType>FDICCertNumber</ns1:fiIDType><ns1:fiID>57095</ns1:fiID><ns1:facsimileFormat>XBRL</ns1:facsimileFormat></ns1:RetrieveFacsimile></soapenv:Body></soapenv:Envelope>"*
> 2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >>
> "[\r][\n]"
> 2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "0"
> 2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >>
> "[\r][\n]"
> 2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >>
> "[\r][\n]"
> 2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - <<
> "<html>[\r][\n]"
> 2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - <<
> "<head><title>403 Forbidden</title></head>[\r][\n]"
> 2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - <<
> "<body>[\r][\n]"
> 2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - <<
> "<center><h1>403 Forbidden</h1></center>[\r][\n]"
> 2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - <<
> "<hr><center>Microsoft-Azure-Application-Gateway/v2</center>[\r][\n]"
> 2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - <<
> "</body>[\r][\n]"
> 2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - <<
> "</html>[\r][\n]"
>
> ----------------------From axis2.xml---------------------
> <axisconfig name="AxisJava2.0">
>     <module ref="rampart" />
>
>     <!-- ================================================= -->
>     <!-- Parameters -->
>     <!-- ================================================= -->
>     <parameter name="OutflowSecurity">
>         <action>
>             <items>UsernameToken  Timestamp</items>
>             <user>prasanth</user>
>
> <passwordCallbackClass>com.nqadmin.callreports.client.PasswordCallback</passwordCallbackClass>
>         </action>
>     </parameter>
>
> Thanks,
> Prasanth
>
> On 10/11/22 1:29 PM, robertlazarski wrote:
>
>
>
> On Mon, Oct 10, 2022 at 10:22 AM Prasanth <db...@pangburngroup.com>
> wrote:
>
>> 2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - <<
>> "<head><title>403 Forbidden</title></head>[\r][\n]"
>>
>> Thanks,
>> Prasanth
>>
>>
> The error "http 403" means "forbidden" and is a red flag.
>
> There is something, somewhere, that is denying access to that URL.
>
>
>

Re: Axis2 1.8.2 with Rampart 1.7.1

Posted by Prasanth <db...@pangburngroup.com>.
I have talked to the service provider they don't seem to have access to the actual request to tell me what is wrong. They keep telling me to make sure I have username token, nonce and time stamp in 
the request.

Looking at the log shouldn't I see the security details in the below SOAP request? Also when I run it in debug mode there doesn't seem to be a call back to my password callback class.  Is the config I 
have correct?

-------------From Log--------------------------------------------
2022-10-10 15:18:49,121 [main] DEBUG org.apache.axis2.transport.http.SOAPMessageFormatter  - end writeTo()
2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "1ed[\r][\n]"
*2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope 
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header/><soapenv:Body><ns1:RetrieveFacsimile 
xmlns:ns1="http://cdr.ffiec.gov/public/services"><ns1:dataSeries>Call</ns1:dataSeries><ns1:reportingPeriodEndDate>06/30/2011</ns1:reportingPeriodEndDate><ns1:fiIDType>FDICCertNumber</ns1:fiIDType><ns1:fiID>57095</ns1:fiID><ns1:facsimileFormat>XBRL</ns1:facsimileFormat></ns1:RetrieveFacsimile></soapenv:Body></soapenv:Envelope>"**
*2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content - >> "[\r][\n]"
2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "0"
2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "[\r][\n]"
2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "[\r][\n]"
2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "<html>[\r][\n]"
2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "<head><title>403 Forbidden</title></head>[\r][\n]"
2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "<body>[\r][\n]"
2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "<center><h1>403 Forbidden</h1></center>[\r][\n]"
2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "<hr><center>Microsoft-Azure-Application-Gateway/v2</center>[\r][\n]"
2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "</body>[\r][\n]"
2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "</html>[\r][\n]"

----------------------From axis2.xml---------------------
<axisconfig name="AxisJava2.0">
     <module ref="rampart" />

     <!-- ================================================= -->
     <!-- Parameters -->
     <!-- ================================================= -->
     <parameter name="OutflowSecurity">
         <action>
             <items>UsernameToken  Timestamp</items>
             <user>prasanth</user>
<passwordCallbackClass>com.nqadmin.callreports.client.PasswordCallback</passwordCallbackClass>
         </action>
     </parameter>

Thanks,
Prasanth

On 10/11/22 1:29 PM, robertlazarski wrote:
>
>
> On Mon, Oct 10, 2022 at 10:22 AM Prasanth <db...@pangburngroup.com> wrote:
>
>     2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "<head><title>403 Forbidden</title></head>[\r][\n]"
>
>     Thanks,
>     Prasanth
>
>
> The error "http 403" means "forbidden" and is a red flag.
>
> There is something, somewhere, that is denying access to that URL.

Re: Axis2 1.8.2 with Rampart 1.7.1

Posted by robertlazarski <ro...@gmail.com>.
On Mon, Oct 10, 2022 at 10:22 AM Prasanth <db...@pangburngroup.com> wrote:

> 2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - <<
> "<head><title>403 Forbidden</title></head>[\r][\n]"
>
> Thanks,
> Prasanth
>
>
The error "http 403" means "forbidden" and is a red flag.

There is something, somewhere, that is denying access to that URL.

Re: Axis2 1.8.2 with Rampart 1.7.1

Posted by Prasanth <db...@pangburngroup.com>.
I have tried to use Axis2 1.7.9 with Rampart 1.6.4 but still the same result the credentials are not present in the request.

2022-10-10 15:18:49,121 [main] DEBUG org.apache.axis2.transport.http.SOAPMessageFormatter  - end writeTo()
2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "1ed[\r][\n]"
2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope 
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header/><soapenv:Body><ns1:RetrieveFacsimile 
xmlns:ns1="http://cdr.ffiec.gov/public/services"><ns1:dataSeries>Call</ns1:dataSeries><ns1:reportingPeriodEndDate>06/30/2011</ns1:reportingPeriodEndDate><ns1:fiIDType>FDICCertNumber</ns1:fiIDType><ns1:fiID>57095</ns1:fiID><ns1:facsimileFormat>XBRL</ns1:facsimileFormat></ns1:RetrieveFacsimile></soapenv:Body></soapenv:Envelope>"
2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "[\r][\n]"
2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "0"
2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "[\r][\n]"
2022-10-10 15:18:49,121 [main] DEBUG httpclient.wire.content  - >> "[\r][\n]"
2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "<html>[\r][\n]"
2022-10-10 15:18:49,171 [main] DEBUG httpclient.wire.content  - << "<head><title>403 Forbidden</title></head>[\r][\n]"

Thanks,
Prasanth

On 10/10/22 9:16 AM, Prasanth Pasala wrote:
> Thanks for the response Robert.  I will try Axis2 1.7.9
>
> Also is there a way to pass the username token and password digest in SOAP request without using Rampart?
>
> Thanks,
> Prasanth
>
> On 10/10/22 9:00 AM, robertlazarski wrote:
>> First of all, see RAMPART-449 for a discussion on the next release.
>>
>> To see the messages, the way I would do it is the SOAP Monitor as explained in the docs.
>>
>> On Thu, Oct 6, 2022 at 4:50 AM Prasanth <db...@pangburngroup.com> wrote:
>>
>>     Hi,
>>
>>     I am building a client for a web service using Axis2 1.8.1 and Rampart 1.7.1 with axis2.xml (partial) shown below. When I run in debug mode I am not getting a call to my password callback class.
>>
>>     Also is there a way to view the final SOAP request that is sent out after rampart adds security elements? I am able to view the SOAP request prior to Rampart security (by running the code in
>>     debug mode).
>>
>>     Thanks,
>>     Prasanth
>>
>>
>>     ---------------------------------------------------------------------------------------------------
>>     <axisconfig name="AxisJava2.0">
>>
>>         <module ref="rampart" />
>>
>>         <!-- ================================================= -->
>>         <!-- Parameters -->
>>         <!-- ================================================= -->
>>         <parameter name="OutflowSecurity">
>>             <action>
>>                 <items>UsernameToken Timestamp</items>
>>                 <user>prasanth</user>
>>     <passwordCallbackClass>com.nqadmin.callreports.client.PasswordCallback</passwordCallbackClass>
>>             </action>
>>         </parameter>
>>
>>
>>     ---------------------------------------------------------------------------------------------------
>>
>

Re: Axis2 1.8.2 with Rampart 1.7.1

Posted by robertlazarski <ro...@gmail.com>.
First of all, see RAMPART-449 for a discussion on the next release.

To see the messages, the way I would do it is the SOAP Monitor as explained
in the docs.

On Thu, Oct 6, 2022 at 4:50 AM Prasanth <db...@pangburngroup.com> wrote:

> Hi,
>
> I am building a client for a web service using Axis2 1.8.1 and Rampart
> 1.7.1 with axis2.xml (partial) shown below. When I run in debug mode I am
> not getting a call to my password callback class.
>
> Also is there a way to view the final SOAP request that is sent out after
> rampart adds security elements? I am able to view the SOAP request prior to
> Rampart security (by running the code in debug mode).
>
> Thanks,
> Prasanth
>
>
>
> ---------------------------------------------------------------------------------------------------
> <axisconfig name="AxisJava2.0">
>
>     <module ref="rampart" />
>
>     <!-- ================================================= -->
>     <!-- Parameters -->
>     <!-- ================================================= -->
>     <parameter name="OutflowSecurity">
>         <action>
>             <items>UsernameToken  Timestamp</items>
>             <user>prasanth</user>
>
> <passwordCallbackClass>com.nqadmin.callreports.client.PasswordCallback</passwordCallbackClass>
>         </action>
>     </parameter>
>
>
>
> ---------------------------------------------------------------------------------------------------
>