IBM Support

PI75111: Admin center doesn't work with AccessControlException after enabling Java2 security

Fixes are available

17.0.0.2: WebSphere Application Server Liberty 17.0.0.2
17.0.0.3: WebSphere Application Server Liberty 17.0.0.3
17.0.0.4: WebSphere Application Server Liberty 17.0.0.4
18.0.0.1: WebSphere Application Server Liberty 18.0.0.1
18.0.0.2: WebSphere Application Server Liberty 18.0.0.2
18.0.0.3: WebSphere Application Server Liberty 18.0.0.3
18.0.0.4: WebSphere Application Server Liberty 18.0.0.4
19.0.0.1: WebSphere Application Server Liberty 19.0.0.1
19.0.0.2: WebSphere Application Server Liberty 19.0.0.2
19.0.0.3: WebSphere Application Server Liberty 19.0.0.3
19.0.0.4: WebSphere Application Server Liberty 19.0.0.4
19.0.0.5: WebSphere Application Server Liberty 19.0.0.5
19.0.0.6: WebSphere Application Server Liberty 19.0.0.6
19.0.0.7: WebSphere Application Server Liberty 19.0.0.7
19.0.0.8: WebSphere Application Server Liberty 19.0.0.8
19.0.0.9: WebSphere Application Server Liberty 19.0.0.9
19.0.0.10: WebSphere Application Server Liberty 19.0.0.10
19.0.0.11: WebSphere Application Server Liberty 19.0.0.11
19.0.0.12: WebSphere Application Server Liberty 19.0.0.12
20.0.0.1: WebSphere Application Server Liberty 20.0.0.1
20.0.0.2: WebSphere Application Server Liberty 20.0.0.2
20.0.0.3: WebSphere Application Server Liberty 20.0.0.3
20.0.0.4: WebSphere Application Server Liberty 20.0.0.4
20.0.0.5: WebSphere Application Server Liberty 20.0.0.5
20.0.0.6: WebSphere Application Server Liberty 20.0.0.6
20.0.0.7: WebSphere Application Server Liberty 20.0.0.7
20.0.0.8: WebSphere Application Server Liberty 20.0.0.8
20.0.0.9: WebSphere Application Server Liberty 20.0.0.9
20.0.0.10: WebSphere Application Server Liberty 20.0.0.10
20.0.0.11: WebSphere Application Server Liberty 20.0.0.11
20.0.0.12: WebSphere Application Server Liberty 20.0.0.12
21.0.0.3: WebSphere Application Server Liberty 21.0.0.3
21.0.0.4: WebSphere Application Server Liberty 21.0.0.4
21.0.0.5: WebSphere Application Server Liberty 21.0.0.5
21.0.0.6: WebSphere Application Server Liberty 21.0.0.6
21.0.0.7: WebSphere Application Server Liberty 21.0.0.7
21.0.0.8: WebSphere Application Server Liberty 21.0.0.8
21.0.0.9: WebSphere Application Server Liberty 21.0.0.9
21.0.0.1: WebSphere Application Server Liberty 21.0.0.1
21.0.0.2: WebSphere Application Server Liberty 21.0.0.2
21.0.0.10: WebSphere Application Server Liberty 21.0.0.10
21.0.0.11: WebSphere Application Server Liberty 21.0.0.11
21.0.0.12: WebSphere Application Server Liberty 21.0.0.12
22.0.0.1: WebSphere Application Server Liberty 22.0.0.1
22.0.0.2: WebSphere Application Server Liberty 22.0.0.2
22.0.0.3: WebSphere Application Server Liberty 22.0.0.3
22.0.0.4: WebSphere Application Server Liberty 22.0.0.4

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • 1. Create liberty profile simple server configuration.
    server create <servername>
    
    2. Modify server.xml for using Admin Center.
    - Add Admin Center feature.
    <feature>adminCenter-1.0</feature>
    - Add following setting for using Admin Center.
    <keyStore id="defaultKeyStore" password="*******"/>
    <basicRegistry id="basic">
    <user name="****" password="****"/>
    </basicRegistry>
    <administrator-role>
    <user>admin</user>
    </administrator-role>
    <remoteFileAccess>
    <writeDir>${server.config.dir}</writeDir>
    </remoteFileAccess>
    - Add host="*" in httpEndpoint.
    <httpEndpoint id="defaultHttpEndpoint" httpPort="9080"
    httpsPort="9443" host="*"/>
    
    3. Add bootstrap.properties file with following property in
    this file.
    websphere.java.security
    
    4. Start liberty profile server.
    server start <servername>
    
    5. Access to Admin Center from Web browser.
    http://<Liberty's hostname>:9443/adminCenter/
    
    6. In the login page, specify user and password.
    
    7. Press 'Submit' button. Then, we see following in web
    browser.
    "Error 500: java.security.AccessControlException: Access
    denied
    ("java.net.NetPermission" "setCookieHandler")
    
    In the log, we see the following stack.
    -------------------------------------------------------
    com.ibm.ws.webcontainer.webapp.WebApp
    E
    handleRequest SRVE0315E: An exception occurred:
    java.lang.Throwable:
    java.security.AccessControlException: access denied
    ("java.net.NetPermission" "setCookieHandler")
    at
    com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.j
    ava:
    5000)
    at
    com.ibm.ws.webcontainer31.osgi.webapp.WebApp31.handleRequest
    (Web
    App31.java:525)
    at
    com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.handleRequ
    est(
    DynamicVirtualHost.java:315)
    at
    com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContai
    ner.
    java:1014)
    :
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.security.AccessControlException: access
    denied
    ("java.net.NetPermission" "setCookieHandler")
    at
    java.security.AccessControlContext.checkPermission(AccessCon
    trol
    Context.java:472)
    at
    java.security.AccessController.checkPermission(AccessControl
    ler.
    java:884)
    at
    java.lang.SecurityManager.checkPermission(SecurityManager.ja
    va:5
    49)
    at
    java.net.CookieHandler.setDefault(CookieHandler.java:95)
    at com.ibm._jsp._toolbox._jspService(_toolbox.java:154)
    
    at
    com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:
    101)
    
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.service(Servl
    etWr
    apper.java:1290)
    -------------------------------------------------------
    

Local fix

  • With the following two properties in server.xml, the issue can
    be avoided.
    ------------------------------------------------------
    <javaPermission className="java.net.NetPermission"
    name="setCookieHandler"/>
    <javaPermission className="java.net.SocketPermission"
    name="my_host:my_httpsPort" actions="connect,resolve"/>
    ------------------------------------------------------
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty - Security                   *
    ****************************************************************
    * PROBLEM DESCRIPTION: Acessing the AdminCenter application    *
    *                      results in                              *
    *                      java.security.AccessControlException.   *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    User accesses the AdminCenter application from a browser and
    receives the login screen. They enter authorized credentials,
    userid and password, the originally requested panel fails to
    load the following exception is seen in the log:
    com.ibm.ws.webcontainer.webapp.WebApp                        E
    handleRequest SRVE0315E: An exception occurred:
    java.lang.Throwable:
    java.security.AccessControlException: access denied
    ("java.net.NetPermission" "setCookieHandler")
    
    The AdminCenter application is an OSGi application that contains
    Web Application Bundles (WABs). WAB permissions are added by way
    of the permissions.perm file. In Liberty, If the WAB contains no
    permissions.perm file, the policy should default to
    java.security.AllPermission.
    

Problem conclusion

  • Liberty security code will be changed so that OSGi applications
    that contain Web Application Bundles (WABs) will default to
    java.security.AllPermission if no permission.perm file is
    present.
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 17.0.0.2.  Please refer to the Recommended Updates page for
    delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI75111

  • Reported component name

    LIBERTY PROFILE

  • Reported component ID

    5724J0814

  • Reported release

    CD0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-01-18

  • Closed date

    2017-05-11

  • Last modified date

    2017-05-11

  • 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

    LIBERTY PROFILE

  • Fixed component ID

    5724J0814

Applicable component levels

  • RCD0 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"CD0","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
04 May 2022