Beehive controls annotation '@Security' not working in WLP application.

(Doc ID 1087097.1)

Last updated on JANUARY 24, 2018

Applies to:

Oracle WebLogic Server - Version 10.3 and later
Information in this document applies to any platform.

Symptoms

The beehive controls annotation @Security is not working in Weblogic Portal (WLP) application, with error as below:

javax.naming.NoPermissionException: User <anonymous> does not have permission on weblogic.management.home to perform lookup operation."


The WLP application already has the following defined in weblogic-application.xml:

<security>
   <security-role-assignment>
       <role-name>PortalSystemAdministrator</role-name>
      <principal-name>portaladmin</principal-name>
    </security-role-assignment>
</security>


The application also has the following defined in application.xml:

<security-role>
   <role-name>PortalSystemAdministrator</role-name>
</security-role>


In the application's implementation class, the annotation is defined as below:

... ... ...
@Security(runAs = "PortalSystemAdministrator",runAsPrincipal = "portaladmin")
public boolean userExists(String username) throws UserProfileException
{
    return userSecurity.userExists(username);
}
... ... ...

Changes

None.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms