You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Robert Lazarski (Jira)" <ji...@apache.org> on 2022/03/18 18:28:00 UTC

[jira] [Commented] (AXIS2-6023) Basic Auth creds missing if target auth not required

    [ https://issues.apache.org/jira/browse/AXIS2-6023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17509002#comment-17509002 ] 

Robert Lazarski commented on AXIS2-6023:
----------------------------------------

I'm not sure how to implement the PreemptiveAuthInterceptor class mentioned as I am not a basic auth user. 

This really seems like something that should be done at the HTTPConstants.CACHED_HTTP_CLIENT level by HTTPClient customization - like was done by the OP.

I'm going to mark this as incomplete though feel free to re-open if you could supply some code and a test case.

 

> Basic Auth creds missing if target auth not required
> ----------------------------------------------------
>
>                 Key: AXIS2-6023
>                 URL: https://issues.apache.org/jira/browse/AXIS2-6023
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.8.0
>            Reporter: Rod
>            Priority: Major
>
> This might be working as designed, but there's a clear change in behavior between Axis2 v1.7.9 and v1.8.0 which is affecting functionality dependent on client provided username:
> WSDL generated client provides basic auth credentials as such:
>   Options opt = thestub._getServiceClient().getOptions();
>   HttpTransportPropertiesImpl.Authenticator basicAuth = new HttpTransportPropertiesImpl.Authenticator();
>   basicAuth.setUsername(user);
>   basicAuth.setPassword(pass);
>   basicAuth.setPreemptiveAuthentication(true);
>   opt.setProperty(HTTPConstants.AUTHENTICATE, basicAuth);
>   opt.setProperty(HttpTransportPropertiesImpl.Authenticator.BASIC, basicAuth);
>         opt.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE);
>         thestub._getServiceClient().setOptions(opt);
> If targeting Axis2 v1.7.9, the user/pass basicAuth is received by target service, however, in v1.8.0 it is not.
> After looking around deep in org.apache.axis2.transport.http, it appears this might be occurring if the target endpoint doesn't require authentication. 
> Is this by design? Is there a known way to force the transmission of credentials?
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org