IBM Support

PI19464: GETUSERPRINCIPAL RETURNS NULL WITHIN WORKLIGHT ADAPTER

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • From Worklight adapter, it is not possible to obtain the user
    principal from the request. This is caused by a limitation of
    client state in the request
    
    WL.Server.getClientRequest().getUserPrincipal() returns null
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Developers using LTPA based authentication who would like to *
    * extract the user principal within an adapter call.           *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * The client request object accessible within an adapter call  *
    * does not contain user state, and cannot be used to retrieve  *
    * the user's principal. As a result,                           *
    * WL.Server.getClientRequest().getUserPrincipal() will return  *
    * null                                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * -                                                            *
    ****************************************************************
    

Problem conclusion

  • A 'Principal' attribute was added to the LTPA user identity and
    represents the principal of the logged in user. The attribute
    can be accessed from within the adapter procedure that is
    protected by an LTPA realm. The attribute can be retrieved using
    the following code snippet within the adapter procedure:
    WL.Server.getActiveUser().attributes['Principal']
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI19464

  • Reported component name

    WORKLIGHT CONSU

  • Reported component ID

    5725I4301

  • Reported release

    610

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-06-05

  • Closed date

    2014-07-09

  • Last modified date

    2014-07-09

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WORKLIGHT CONSU

  • Fixed component ID

    5725I4301

Applicable component levels

  • R610 PSY

       UP

  • R620 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSZH4A","label":"IBM Worklight"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"610","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 October 2021