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

Inserting the Logout button on credential viewer app

  • 1.  Inserting the Logout button on credential viewer app

    Posted Fri January 30, 2026 07:33 AM

    I often use the Credential Viewer app to troubleshoot and resolve various issues. However, I have always wondered why this app does not include a logout button.

    Using a Lua module, I was able to solve this by creating an LUA HTTP transformation that injects a logout button into the response.

    Here is the code I used:

    local body = HTTPResponse.getBody()
    
    local modified_body = body:gsub(
      "Credential Viewer</h1>",
      'Credential Viewer</h1><a href="/pkmslogout"><button>Logout</button></a>',
      1
    )
    HTTPResponse.setBody(modified_body)
    

    After that, I configured the instance to execute this Lua script using the following settings:

    insert-logout-in-creds = InsertLogoutCreds.lua
    
    [http-transformations:insert-logout-in-creds]
    request-match = response:GET /creds*
    

    With this configuration, the logout button is automatically added to the Credential Viewer page, making it easier and safer to end sessions when needed.



    ------------------------------
    Rudy Santos
    ------------------------------