Determining if a User is Internal or External using the UserScope Interface

To support alternative methods for determining if a user is internal or external the custom interface UserScope is available. For example, even though usernames must be unique across the set of internal and external users, this custom interface can be implemented to allow duplicate usernames across internal and external applications in a limited way.

To provide a custom implementation for determining the type of user, the curam.util.security.UserScope interface must be implemented. This interface has one method isUserExternal() that determines the type of user. This method should return true if the user is considered external or false indicating the user is internal.

For example, an installation might have application1 deployed with userA, a Cúram internal user, and application2 deployed with userA being external (e.g. defined to LDAP). The ability for application1 to use internal userA and application2 to use external userA would be controlled by different properties. That is, Bootstrap.properties in properties.jar in the application1 EAR would have a different custom property setting from application2 EAR and the implementation of curam.util.security.UserScope.isUserExternal() would interrogate this setting to decide if the user is internal or external.

To specify a custom implementation of the UserScope interface the curam.custom.userscope.implementation property must be set in Application.prx. This should be set to the fully qualified name of the class that implements the UserScope interface.

Note: The curam.custom.userscope.implementation property is not dynamic, and if changed the application must be restarted before the change will take effect.

The isUserExternal() method of the UserScope interface is detailed in User Type Determination.