[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] Fwd: HTTP API Question



The server clearly requires BASIC authentication. Yes, it should be possible to use the “@” in the password. The http headers are encoded to CCSID 819 which is also known as ISO 8859-1. When I use “Donald” for the user name and “My@S3cret!” as the password I get the Base64 string “RG9uYWxkOk15QFMzY3JldCE=” in the authorization header.

 

That string decodes to “Donald:My@S3cret!” at https://www.base64decode.org/, which is exactly what I had specified.

 

Just a silly question, but are you sure that you specified the right credentials?

 

Thomas.

 

 

Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von Vino
Gesendet: Donnerstag, 24. Mai 2018 01:14
An: FTPAPI/HTTPAPI mailing list
Betreff: Re: [Ftpapi] Fwd: HTTP API Question

 

Hi Scott/Thomas,

 

All the credentials are correct. Can i use special character "@" in the password. Still i am getting the error, 

 

recvresp(): entered

HTTP/1.1 401 Unauthorized

Content-Type: text/xml

WWW-Authenticate: Basic realm=login

X-Backside-Transport: FAIL FAIL

Connection: close

 

 

SetError() #13: HTTP/1.1 401 Unauthorized

recvresp(): end with 401

recvdoc parms: identity 0

interpret_auth(): entered

SetError() #36: This page requires a user-id & password

http_close(): entered

 

Thanks.

 

Regards,

Vino.

 

On Wed, May 23, 2018 at 10:50 AM, Vino <vinomails@xxxxxxxxx> wrote:

Hi Thomas,

 

Thanks a lot for the guidance. Find the below log. I feel that the authentication designed as Login. That may be the issue. I will check on that. 

 

 

recvresp(): entered

HTTP/1.1 401 Unauthorized

Content-Type: text/xml

WWW-Authenticate: Basic realm=login

X-Backside-Transport: FAIL FAIL

Connection: close

 

 

SetError() #13: HTTP/1.1 401 Unauthorized

recvresp(): end with 401

recvdoc parms: identity 0

interpret_auth(): entered

SetError() #36: This page requires a user-id & password

http_close(): entered

 

 

 

Regards,

Vino.

 

 

On Wed, May 23, 2018 at 1:55 AM, Amit Sharma <sharma.amit0904@xxxxxxxxx> wrote:

I was about say the same as what Thomas suggested. Turn on the debug mode in program before you do basic authentication. That will give you all the details.




On Wednesday, May 23, 2018, Thomas Raddatz <thomas.raddatz@xxxxxx> wrote:
> Vino,
>
>  
>
> in addition to Scott’s response I suggest to post a debug log, that we can see the http headers passed between the client and server.
>
>  
>
> If you cannot post a debug log, you can check the log by yourself like this:
>
>  
>
> Disable statement http_setauth(), enable the debug log with http_debug(*on: path_to_debug_log) and call the web service. Look for "HTTP/1.1 401 Unauthorized". A few lines below you should find the "WWW-Authenticate" header. That header is returned by the server to inform the client about the supported (required) authentication scheme. If the header is "WWW-Authenticate: Basic" then the server expects BASIC authentication.
>
>  
>
> POST /PMR/services/Namespaces HTTP/1.1
>
> Host: 10.214.128.57:8080
>
> User-Agent: http-api/1.38
>
> Content-Length: 1100
>
> Content-Type: text/xml; charset=utf-8
>
> SOAPAction:
>
>  
>
>  
>
> sendraw(): entered
>
> <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope>...</soapenv:Envelope>
>
> recvresp(): entered
>
> HTTP/1.1 401 Unauthorized
>
> Server: Apache-Coyote/1.1
>
> WWW-Authenticate: Basic realm="Basic Authentication"
>
> Content-Type: text/html;charset=utf-8
>
> Content-Length: 954
>
> Date: Tue, 27 Feb 2018 13:32:10 GMT
>
>  
>
>  
>
> SetError() #13: HTTP/1.1 401 Unauthorized
>
> recvresp(): end with 401
>
> recvdoc parms: identity 954
>
> interpret_auth(): entered
>
> SetError() #36: This page requires a user-id & password
>
>  
>
> Enable statement http_setauth() and call the server again. Search the debug log for "Authorization: Basic". That is the header send by HTTP API to the server to authenticate the client. The string following "Authorization: Basic" is the user name and password concatenated by a colon and encoded to Base64. You can decode the Base64 string "RG9uYWxkOkR1Y2s=" at https://www.base64decode.org/ to see the user name and password. For example, "RG9uYWxkOkR1Y2s=" decodes to "Donald:Duck" where "Donald" is the user name and "Duck" the password.
>
>  
>
> POST /PMR/services/Namespaces HTTP/1.1
>
> Host: 10.214.128.57:8080
>
> User-Agent: http-api/1.38
>
> Content-Length: 1100
>
> Authorization: Basic RG9uYWxkOkR1Y2s=
>
> Content-Type: text/xml; charset=utf-8
>
>  
>
> Do the decoded user name and password match the values that you passed to http_setauth()?
>
>  
>
> Thomas.
>
>  
>
> Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von Vino
> Gesendet: Montag, 21. Mai 2018 19:39
> An: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> Betreff: [Ftpapi] Fwd: HTTP API Question
>
>  
>
> Hi Team,
>
>  
>
> I need to send SOAP request as a XML file to another server with basic authentication. I am little confused which procedures to use for authentication and send xml file. 
>
>  
>
> Please advise. 
>
>  
>
> Thanks.
>
>  
>
> Regards,
>
> Vino.
>
>  
>
> --
> IMPORTANT NOTICE:
> This email is confidential, may be legally privileged, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender.

--

Many Thanks,

Amit Sharma

0450201285

 

--
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi

 

 

--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender.
-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi