IBM Support

PI67237: AccessControlException issued when an API tries to obtain an int ernal OSGi service via the kernel service SPIs.

Fixes are available

16.0.0.3: WebSphere Application Server Liberty 16.0.0.3
16.0.0.4: WebSphere Application Server Liberty 16.0.0.4
17.0.0.1: WebSphere Application Server Liberty 17.0.0.1
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

  • For a Liberty server with Java 2 Security enabled, when an
    application uses an Application Programming Interface (API)
    that tries to obtain an internal OSGi service using the the
    kernel's AtomicServiceReference or
    ConcurrentServiceReferenceElement Service Programming
    Interface (SPI), an AccessControlException for the
    "org.osgi.framework.ServicePermission" permission and the
    "get" action might be issued if the application using the
    API is not configured with the permission.  The stack trace
    in messages.log, trace.log, or FFDC is similar to the
    following stack trace, where the service.id is unique to the
    service being obtained,
    
    java.security.AccessControlException: Access denied
    ("org.osgi.framework.ServicePermission" "(service.id=597)"
    "get")
    at
    java.security.AccessController.throwACE(AccessController.jav
    a:157)
    at
    java.security.AccessController.checkPermissionHelper(AccessC
    ontroller.java:217)
    at
    java.security.AccessController.checkPermission(AccessControl
    ler.java:349)
    at
    java.lang.SecurityManager.checkPermission(SecurityManager.ja
    va:562)
    at
    org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.ch
    eckGetServicePermission(ServiceRegistry.java:1080)
    at
    org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.ge
    tService(ServiceRegistry.java:460)
    at
    org.eclipse.osgi.internal.framework.BundleContextImpl.getSer
    vice(BundleContextImpl.java:619)
    at
    org.apache.felix.scr.impl.manager.SingleRefPair.getServiceOb
    ject(SingleRefPair.java:72)
    at
    org.apache.felix.scr.impl.manager.DependencyManager.getServi
    ce(DependencyManager.java:1396)
    at
    org.apache.felix.scr.impl.manager.DependencyManager.getServi
    ce(DependencyManager.java:1370)
    at
    org.apache.felix.scr.impl.manager.ComponentContextImpl.locat
    eService(ComponentContextImpl.java:135)
    at
    com.ibm.wsspi.kernel.service.utils.AtomicServiceReference.ge
    tService(AtomicServiceReference.java:243)
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty - Security                   *
    ****************************************************************
    * PROBLEM DESCRIPTION: AccessControlException issued when an   *
    *                      API tries to obtain an internal OSGi    *
    *                      service via the kernel service SPIs.    *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    For a Liberty server with Java 2 Security enabled, when an
    application uses an Application Programming Interface (API) that
    tries to obtain an internal OSGi service using the the kernel's
    AtomicServiceReference or ConcurrentServiceReferenceElement
    Service Programming Interface (SPI), an AccessControlException
    for the "org.osgi.framework.ServicePermission" permission and
    the "get" action might be issued if the application using the
    API is not configured with the permission.  The stack trace in
    messages.log, trace.log, or FFDC is similar to the following
    stack trace, where the service.id is unique to the service being
    obtained,
    
    java.security.AccessControlException: Access denied
    ("org.osgi.framework.ServicePermission" "(service.id=597)"
    "get")
        at
    java.security.AccessController.throwACE(AccessController.java:15
    7)
        at
    java.security.AccessController.checkPermissionHelper(AccessContr
    oller.java:217)
        at
    java.security.AccessController.checkPermission(AccessController.
    java:349)
        at
    java.lang.SecurityManager.checkPermission(SecurityManager.java:5
    62)
        at
    org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.checkG
    etServicePermission(ServiceRegistry.java:1080)
        at
    org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getSer
    vice(ServiceRegistry.java:460)
        at
    org.eclipse.osgi.internal.framework.BundleContextImpl.getService
    (BundleContextImpl.java:619)
        at
    org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject
    (SingleRefPair.java:72)
        at
    org.apache.felix.scr.impl.manager.DependencyManager.getService(D
    ependencyManager.java:1396)
        at
    org.apache.felix.scr.impl.manager.DependencyManager.getService(D
    ependencyManager.java:1370)
        at
    org.apache.felix.scr.impl.manager.ComponentContextImpl.locateSer
    vice(ComponentContextImpl.java:135)
        at
    com.ibm.wsspi.kernel.service.utils.AtomicServiceReference.getSer
    vice(AtomicServiceReference.java:243)
    

Problem conclusion

  • The code was modified to avoid the AccessControlException for
    the org.osgi.framework.ServicePermission when an application
    uses an Application Programming Interface (API) that tries to
    obtain an internal OSGi service using the the kernel's
    AtomicServiceReference or ConcurrentServiceReferenceElement
    Service Programming Interface (SPI).
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 16.0.0.3.  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

    PI67237

  • Reported component name

    WAS LIBERTY COR

  • Reported component ID

    5725L2900

  • Reported release

    855

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-08-09

  • Closed date

    2016-08-16

  • Last modified date

    2016-08-16

  • 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

    WAS LIBERTY COR

  • Fixed component ID

    5725L2900

Applicable component levels

  • R855 PSY

       UP

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

Document Information

Modified date:
03 May 2022