IBM Support

PI62148: EXPOSE APIS TO RETRIEVE TOKENS FROM RUNAS SUBJECT

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as new function.

Error description

  • SAML Web SSO puts the SAML token from the IdP on the runAs
    Subject after authentication. Developers would like an easy way
    to get that SAML token to work with it.
    
    The WS-Security runtime puts tokens on the runAs Subject in
    the same way. Developers would like an easy way to get that
    token to work with it.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server                                      *
    ****************************************************************
    * PROBLEM DESCRIPTION: Expose convience method to retrieve     *
    *                      WS-Security and SAML tokens from        *
    *                      the runAs Subject                       *
    ****************************************************************
    * RECOMMENDATION:  Install a fix pack that contains this       *
    *                  APAR.                                       *
    ****************************************************************
    The Web Services Security (WS-Security) and SAML Web Single
    Sign-on (SSO) runtimes put tokens on the WebSphere runAs
    Subject.  Application developers sometimes need access to
    these tokens.  Although it is possible for an application
    developer to develop the code that will retrieve a token from
    the runAs Subject, it is not always obvious how to do this.
    

Problem conclusion

  • The following convience methods are added to the
    com.ibm.websphere.wssecurity.wssapi.WSSUtilFactory class in the
    plugins/com.ibm.wsfp.main.jar, dev/was_public.jar,
    runtimes/com.ibm.jaxws.thinclient_7.0.0.jar,
    runtimes/com.ibm.jaxws.thinclient_8.0.0.jar and
    runtimes/com.ibm.jaxws.thinclient_8.5.0.jar files in the
    application server:
    
    /**
     * getRunAsSubject returns a JAAS subject that represents the
     * RunAs identity.
     *
     * @return a JAAS subject represents the RunAs identity.
     */
    public abstract Subject getRunAsSubject();
    
    /**
     * Retrieves a security  token (whose value type matches the
     * qname param) from the runAs subject.
     *
     * This method returns null if the runAs subject does not
     * contain any security token with matching value type.
     *
     * @param qname value type to compare
     * @return SecurityToken
     */
    public abstract SecurityToken getTokenFromSubject(QName qname);
    
    /**
     * Retrieves the SAMLV2.0 token from the runAs subject.
     *
     * This method returns null if the runAs subject does
     * not contain SAMLV2.0 token.
     *
     * @return SAMLToken
     */
    public abstract SAMLToken getSaml20Token();
    
    /**
     * Returns the base64 encoded SAMLV2.0 token which is retrieved
     * from the runAs subject.
     *
     * This method will return either compressed or not compressed
     * base64 encoded SAMLV2.0 token that existed in the runAs
     * subject.
     * It will return null in case if there is no SAMLV2.0 token in
     * the runAs subject.
     *
     * @param compress specify whether to compress the token string
     * @return base64 encoded (compressed/non-compressed) SAMLV2.0
     * token
     */
    public abstract String getBase64EncodedSaml20Token(
                                                  boolean compress);
    /**
     * Returns the base64 encoded SAML token.
     *
     * This method will return either compressed or not compressed
     * base64 encoded SAML token that is based on the supplied xml
     * string.
     *
     * @param xml SAML token string
     * @param compress specify whether to compress the token string
     * @return base64 encoded (compressed/non-compressed) SAML token
     */
    public abstract String getBase64EncodedSamlToken(String xml,
                                              boolean compress);
    /**
     * Returns the Security Token element.
     *
     * This method will retrieve the token OMElement representing
     * the token from the token object.
     *
     * @param token SecurityToken
     * @return SecurityToken element
     */
    public abstract OMElement getTokenElement(SecurityToken token);
    
    /**
     * Returns the XML of the token in String form.
     *
     * This method will retrieve XML String representing the token
     * from the token object.
     *
     * @param token SecurityToken
     * @return String XML form of the token element
     */
    public abstract String getXML(SecurityToken token);
    
    
    The fix for this APAR is currently targeted for inclusion in
    fix pack 7.0.0.43, 8.0.0.13 and 8.5.5.10.  Please refer to the
    Recommended Updates page for delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    
    Keywords: IBMWL3WSS, SAMLWSSEC, WSSEC
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI62148

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-05-10

  • Closed date

    2016-07-26

  • Last modified date

    2016-09-14

  • 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

    WEBS APP SERV N

  • Fixed component ID

    5724H8800

Applicable component levels

  • R700 PSY

       UP

  • R800 PSY

       UP

  • R850 PSY

       UP

  • R900 PSY

       UP



Document information

More support for: WebSphere Application Server
General

Software version: 7.0

Reference #: PI62148

Modified date: 14 September 2016