IBM Verify

IBM Verify

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

 View Only
Expand all | Collapse all

OTP mechanism

  • 1.  OTP mechanism

    Posted 11 days ago

    i am triggering this resource https://<hostname>/myapp/myresource, which then we are intercepting the request to complete the one-time password mechansim, once the OTP flow completes its giving 204 response instead of returning back to the intercepted url, please let me know for any suggestions. Thanks



    ------------------------------
    Raghavendra Gorkal
    ------------------------------


  • 2.  RE: OTP mechanism

    Posted 8 days ago

    Explain what you mean by: which then we are intercepting the request

    How are you doing that precisely?



    ------------------------------
    Shane Weeden
    IBM
    ------------------------------



  • 3.  RE: OTP mechanism

    Posted 8 days ago

    we have assigned the rba-pop(eas-trigger as trigger_rba_eas) for the resource and assigned the "one-time password" authentication policy.



    ------------------------------
    Raghavendra Gorkal
    ------------------------------



  • 4.  RE: OTP mechanism

    Posted 7 days ago

    Hi Raghavendra, 
    Are you using the "API" Auth service? or are you using a regular authservice (HTML) flow? 

    The API Auth service, will return a 204 upon completion. As the API client might not handle the 302. 

    We've had some patterns elsewhere (Some of the OOTB MMFA flows for example) that complete it with the API flow, until the 'last' page - which uses the regular auth service flow. 

    1) API Auth service (OTP Challenge)
    2) API Auth Service (OTP Response) 
    3) simple "Infomap" response that can be identified - and then have REST client to primary browser flow - which can then trigger the cached redirect. 



    ------------------------------
    Philip Nye
    Senior Product Manager - IBM Verify
    ------------------------------



  • 5.  RE: OTP mechanism

    Posted 6 days ago

    Thanks Nye for responding to the thread, we are using API Auth service

    we have one application(App1) in different proxy which is implemented using API Auth service which is working as expected, but not in other application(App2) not sure what configuration are we missing in App2, what we have noticed in logs for App1 is highlighted below, can you please let me know what configuration triggers this log statements: 

    App1 flow:

    1) trigger the resource from Single Page application

    2) webseal intercepted the resource, started the MFA

    3) once the MFA process completes webseal is redirected back to the backend application to process the request

    App1 Logs:

     thread(101) trace.pdweb.debug:3 /build/isam/src/i4w/pdweb/webseald/junctions/remote/framework/ThirdPartyJunction.cpp:4429: Processing time of the junction request: 59880 usec
     thread(101) trace.pdweb.debug:5 /build/isam/src/i4w/pdweb/webseald/http/server/handle-call.cpp:368: It has been determined that the redirect is destined for the local host/port: https://myhost/mfa/start
     thread(101) trace.pdweb.debug:5 /build/isam/src/i4w/pdweb/webseald/http/server/handle-call.cpp:399: This redirect will be handled internally as the request URL, /mga/sps/apiauthsvc?StateId=VPXiQXzbz0YUE4kNTPf2tvslnFujb0Oa5ZOoUpFr8PIsoYTWQ08uvTJJmLKwedei1XyXdp1NnDEjChztueeWanWUVesaxRGIvshW9afvsJI8i2IidFM3gax6bv1jUlss, matches one of our configured URLs (redirect: https://myhost/mfa/start)
     thread(101) trace.pdweb.debug:5 /build/isam/src/i4w/pdweb/webseald/http/server/handle-call.cpp:376: It has been determined that the redirect is destined for the local host/port as it is for a server relative URL: /mga/sps/apiauthsvc?TransactionId=e3b7a291-14ed-4bfa-a0cc-a820ceba0d52
     thread(101) trace.pdweb.debug:5 /build/isam/src/i4w/pdweb/webseald/http/server/handle-call.cpp:399: This redirect will be handled internally as the request URL, /mga/sps/apiauthsvc?StateId=VPXiQXzbz0YUE4kNTPf2tvslnFujb0Oa5ZOoUpFr8PIsoYTWQ08uvTJJmLKwedei1XyXdp1NnDEjChztueeWanWUVesaxRGIvshW9afvsJI8i2IidFM3gax6bv1jUlss, matches one of our configured URLs (redirect: /mga/sps/apiauthsvc?TransactionId=e3b7a291-14ed-4bfa-a0cc-a820ceba0d52)

     



    ------------------------------
    Raghavendra Gorkal
    ------------------------------



  • 6.  RE: OTP mechanism

    Posted 6 days ago

    Hey, 

    It looks like thats related to 'follow-redirects-for' in the Reverse Proxy Configuration file. 

    Although if you're getting a 204 - I'm not sure if it will give that experience or not. 



    ------------------------------
    Philip Nye
    Senior Product Manager - IBM Verify
    ------------------------------



  • 7.  RE: OTP mechanism

    Posted 6 days ago
    i have attached the network trace below for your reference, after webseal completes the MFA process its doing 302 from /apiauthsvc to the initial request. I am confused about how /apiauthsvc is triggering a 302 redirect in this scenario. This issue is hindering our development progress.
    this is the Reverse Proxy configuration setup we have:
    follow-redirects-for = * /mga/*
    follow-redirects-for = !LRR!
    follow-redirects-for = !REPLAY!
    Questions:
    1. is this true statement? for /authsvc services webseal will automatically redirects(302) back to the original request after MFA completes
    2. For /apiauthsvc service, webseal doesn't support redirect(302) automatically right after MFA completes? 
    3. For the /apiauthsvc service flow:

               a.) The frontend app calls the backend resource.
               b.) Webseal intercepts the request and triggers MFA.
               c.)  After entering the OTP code, Webseal sends a 204 response back to the frontend app. If Webseal returns only a 204 response, the frontend app then call the same backend resource                  for a second time, ensuring that Webseal does not intercept it again.

    Is Scenario-3 the best practice? Or do you suggest another approach?
    Thank you in advance for your assistance here.
    OTP network trace


    ------------------------------
    Raghavendra Gorkal
    ------------------------------



  • 8.  RE: OTP mechanism
    Best Answer

    Posted 5 days ago

    This might be related to changing the default values for the EAI Flags:

    https://philipnye.com/2014/12/18/isam-for-web-webseal-stream-eai-authentication-response-to-browser/
    In the Reverse Proxy Configuration File:

    [eai]
    eai-flags-header = am-eai-flags

    If the value isn't the one above, it will revert to similar behaviour as the standard Authsvc. 



    ------------------------------
    Philip Nye
    Senior Product Manager - IBM Verify
    ------------------------------



  • 9.  RE: OTP mechanism

    Posted 4 days ago

    Thank so much Nye, it worked for us.

    when i choose otp.user.otp-method.id: "email" as  email, after entering the OTP code its redirecting back to the initial target url again webseal is intercepting the request starting the MFA, this is happening only for email but not for sms/totp.

    2025-12-11-14:12:54.518-05:00I----- thread(145) trace.pdweb.debug:3 /build/isam/src/i4w/pdweb/webseald/junctions/remote/framework/ThirdPartyJunction.cpp:4429: Processing time of the junction request: 81965 usec
    2025-12-11-14:12:54.527-05:00I----- thread(145) trace.pdweb.debug:5 /build/isam/src/i4w/pdweb/webseald/http/server/handle-call.cpp:368: It has been determined that the redirect is destined for the local host/port: https://myhost:service/secure/mfa
    2025-12-11-14:12:54.527-05:00I----- thread(145) trace.pdweb.debug:5 /build/isam/src/i4w/pdweb/webseald/http/server/handle-call.cpp:399: This redirect will be handled internally as the request URL, /mga/sps/apiauthsvc?StateId=gVseYXXHZ2NHGGzJM31r5uzK5qFMxf7Ef390rQVXnyXG7tL2KojzpnTmHoCdbGOadVpKVyeuUgpIj1zENY0hvzVbBY85prujycz8Oe4q9GzNzuw25obMCPh9VHD90kpT, matches one of our configured URLs (redirect: https://myhost:service/secure/mfa)
    2025-12-11-14:12:54.547-05:00I----- thread(145) trace.pdweb.debug:5 /build/isam/src/i4w/pdweb/webseald/http/server/handle-call.cpp:376: It has been determined that the redirect is destined for the local host/port as it is for a server relative URL: /mga/sps/apiauthsvc?TransactionId=9b1d4205-3b43-4050-bfb1-50649b210728
    2025-12-11-14:12:54.547-05:00I----- thread(145) trace.pdweb.debug:5 /build/isam/src/i4w/pdweb/webseald/http/server/handle-call.cpp:399: This redirect will be handled internally as the request URL, /mga/sps/apiauthsvc?StateId=gVseYXXHZ2NHGGzJM31r5uzK5qFMxf7Ef390rQVXnyXG7tL2KojzpnTmHoCdbGOadVpKVyeuUgpIj1zENY0hvzVbBY85prujycz8Oe4q9GzNzuw25obMCPh9VHD90kpT, matches one of our configured URLs (redirect: /mga/sps/apiauthsvc?TransactionId=9b1d4205-3b43-4050-bfb1-50649b210728)
    2025-12-11-14:12:54.548-05:00I----- thread(145) trace.pdweb.debug:2 /build/isam/src/i4w/pdweb/webseald/ras/trace/debug_log.cpp:235: ----------------- PD ===> BackEnd -----------------
    Thread 145; fd 259; local 10.205.45.16:62664; remote 10.205.42.16:8443
    GET /sps/apiauthsvc?TransactionId=9b1d4205-3b43-4050-bfb1-50649b210728 HTTP/1.1



    ------------------------------
    Raghavendra Gorkal
    ------------------------------



  • 10.  RE: OTP mechanism

    Posted 4 days ago

    Ok. Let's take a step back, we've covered a bit. And need to rebaseline. 

    So, what's the new state? Vs the desired state?



    ------------------------------
    Philip Nye
    Senior Product Manager - IBM Verify
    ------------------------------



  • 11.  RE: OTP mechanism

    Posted 4 days ago

    In the current state we are using /authsvc based services for OTP mechanisms, we are trying to convert them to rest based /apiauthsvc

    In the new rest based api approach, when i trigger MFA for sms/totp it working as expected but when i choose email for the first time and enter valid OTP code still its triggering the MFA for multiple times.

    1.) client triggers the resource

    2) webseal intercepts the resource, start the MFA, enter valid OTP code

    3) webseal is redirecting back to the intercepted resource

    4) webseal again intercepting for the second time, starting the MFA (this is happening only for email)



    ------------------------------
    Raghavendra Gorkal
    ------------------------------



  • 12.  RE: OTP mechanism

    Posted 4 days ago

    And you're using Access Policies to protect this resource. 

    What does your policy look like? Are you singling out the other mechanisms in your policy? 



    ------------------------------
    Philip Nye
    Senior Product Manager - IBM Verify
    ------------------------------



  • 13.  RE: OTP mechanism

    Posted 4 days ago

    yes, we are using Access policies for this resource. 

    First policy calling the infomap to retrieve the sms/email/preferred mfa methods from LDAP and update the session context attributes.

    Second is the one-time password authentication policy mechanism.



    ------------------------------
    Raghavendra Gorkal
    ------------------------------



  • 14.  RE: OTP mechanism

    Posted 4 days ago

    never mind, after removing the first policy it started working for email as well. Thanks for your support Nye. 

    do i have any other options, i would like to get the latest email info from LDAP then start the MFA for email.



    ------------------------------
    Raghavendra Gorkal
    ------------------------------



  • 15.  RE: OTP mechanism

    Posted 6 days ago

    You're probably not forwarding the original request after the OTP check. A 204 usually means the OTP endpoint finished but didn't tell the app where to go next. Make sure you're storing the original URL and then redirecting/continuing the chain after the OTP verifies.



    ------------------------------
    Nate
    ------------------------------