IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

Can Integration Server ignore 'bad' authentication?

  • 1.  Can Integration Server ignore 'bad' authentication?

    Posted Wed September 01, 2021 04:08 AM

    When IS handles a request, it first checks authentication and rejects the request if authentication is invalid. This is true even if the IS service being invoked is set to use the Anonymous ACL.

    In the example below, SomeAnonymousService uses the Anonymous ACL. But incorrect HTTP Basic Authentication is presented (wrong/wrong). So IS kills the request and returns 401/Invalid Credentials.

    $ curl -X POST http://<IS>:5555/invoke/SomeAnonymousService -u wrong:wrong -d '<cXML><Request/></cXML>' --verbose
    ...
    > Authorization: Basic d3Jvbmc6d3Jvbmc=
    ...
    < HTTP/1.1 401 [ISS.0084.9001] Invalid credentials
    

    Is there a way to convince IS to ignore ‘bad’ authentication? This is for a service which must always run, so that it can send back a formatted XML document.

    Basically, this is to make an IS service behave similar to this Ariba.com service.

    $ curl -X POST https://service.ariba.com/service/transaction/cxml.asp -u wrong:wrong -d '<cXML><Request/></cXML>'
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE cXML SYSTEM "cXML.dtd">
    
    <cXML timestamp="2021-09-01T00:44:22-07:00" payloadID="1630482262501-2228299194814794657@10.162.97.208">
    
    <Response>
    
    <Status code="406" text="Not Acceptable">The document could not be parsed: Premature end of document while looking for credentials [ANCLS-125040007]</Status>
    
    </Response>
    </cXML>
    

    #cXML
    #Integration-Server-and-ESB
    #authentication
    #webMethods
    #Ariba


  • 2.  RE: Can Integration Server ignore 'bad' authentication?

    Posted Wed September 01, 2021 08:17 AM

    If IS overlooks an invalid credentials issue, it’s a security hole - I’m not aware of any such feature for this and I don’t think this will be provided even if you request this feature.

    I won’t recommend Anonymous ACL either, unless you absolutely must have it and the environment is fully closed.

    KM


    #authentication
    #cXML
    #Ariba
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Can Integration Server ignore 'bad' authentication?

    Posted Wed September 01, 2021 10:44 AM

    We all agree if the credentials are bad, the call should be rejected. But this rejection occurs even when the credentials are good. For Anonymous ACL services credentials are not necessary but when valid and present, should be allowed – but IS rejects those too.


    #Integration-Server-and-ESB
    #Ariba
    #authentication
    #cXML
    #webMethods


  • 4.  RE: Can Integration Server ignore 'bad' authentication?

    Posted Wed September 01, 2021 10:55 AM

    My reply was for the original post where incorrect credentials were used, for a deliberate test.

    Now, IS does throw an error even for valid credentials, but only if the source application doesn’t use pre-emptive authentication. However, the request is still handled but an error is logged for the first auth try. You can test this out via SOAP UI, that has this setting. Perhaps this resolves the issue you highlight, Rob.

    If it’s not about pre-emptive auth, then I haven’t come across this issue. I will test it out.

    KM


    #Ariba
    #Integration-Server-and-ESB
    #cXML
    #webMethods
    #authentication


  • 5.  RE: Can Integration Server ignore 'bad' authentication?

    Posted Wed September 01, 2021 11:28 AM

    I checked this again. Apparently I misinterpreted something. It is behaving as expected. Sorry for the distraction.


    #authentication
    #Integration-Server-and-ESB
    #webMethods
    #cXML
    #Ariba


  • 6.  RE: Can Integration Server ignore 'bad' authentication?

    Posted Wed September 01, 2021 07:53 PM

    @reamon - No distraction at all, thanks for checking this out Rob.

    Mostly, I’m delighted to see you after many years. :slight_smile: I trust you have been well.


    #Ariba
    #webMethods
    #Integration-Server-and-ESB
    #cXML
    #authentication


  • 7.  RE: Can Integration Server ignore 'bad' authentication?

    Posted Thu September 02, 2021 09:58 AM

    Good to see you in the forums again – always fun to see familiar names! :grinning:


    #Integration-Server-and-ESB
    #webMethods
    #cXML
    #authentication
    #Ariba


  • 8.  RE: Can Integration Server ignore 'bad' authentication?

    Posted Wed September 01, 2021 08:37 AM

    Hi Sonam,
    As Kasi mentioned it’s not a good idea to globally ignore invalid credentials. You could however add a custom JAAS login module to Integration Server and in your module, you can make Authentication to succeed and return Default user. This will make sure that the request gets routed to your service and in your service, you could compose and send the XML reply back.

    For more information about adding custom JAAS login module to Integration Server, refer to the IS Administrators Guide.

    Regards,
    -Senthil


    #authentication
    #Integration-Server-and-ESB
    #webMethods
    #cXML
    #Ariba


  • 9.  RE: Can Integration Server ignore 'bad' authentication?

    Posted Wed September 01, 2021 09:21 AM

    Thanks @Senthil – yes, the ‘custom JAAS login module to Integration Server’ seems to be just what I’d need to fulfill this requirement.

    Thanks @Holger_von_Thomsen and @Venkata_Kasi_Viswanath_Mugada1 – good points all, and I agree ignoring bad credentials is bad practise. But I intend only for IS to ignore credentials – I still intend authenticating at the service code level.

    This approach is needed since IS’s default HTTP 401 doesn’t cut it. I’m told the Ariba cXML protocol requires a fully-formatted XML response under all conditions, including failed authentication. So the IS service code needs to execute, regardless of credentials, if only to send back XML similar to this:

    $ curl -X POST http://<IS>:5555/invoke/SomeAnonymousService -u wrong:wrong -d '<cXML>...' --verbose
    ...
    > Authorization: Basic d3Jvbmc6d3Jvbmc=
    ...
    < HTTP/1.1 200/OK
    ...
    <cXML timestamp="2021-09-01T00:44:22-07:00" payloadID="1630482262501-2228299194814794657@10.162.97.208">
    <Response>
    <Status code="401" text="Access Denied">Bad credentials...`

    #Integration-Server-and-ESB
    #Ariba
    #webMethods
    #authentication
    #cXML


  • 10.  RE: Can Integration Server ignore 'bad' authentication?

    Posted Wed September 01, 2021 08:59 AM

    Hi Sonam,

    for the case you need anonymous access to your service there shouldn´t be any credentials in the request.
    When there are credentials in the request, I agree with Kasi and Senthil that they should be either correct or that the IS rejects the request with “Invalid Credentials” for security reasons.

    Regards,
    Holger


    #authentication
    #webMethods
    #Integration-Server-and-ESB
    #Ariba
    #cXML