Oracle Fusion Middleware extensions for Logging and Diagnostics
11g Release 1 (11.1.2)

E22565-02

oracle.apps.fnd.appltest.diagfwk.engine.provider.security.cli
Class CLIDevSecurityProvider

java.lang.Object
  extended by oracle.apps.fnd.appltest.diagfwk.common.DiagBaseFactory
      extended by oracle.apps.fnd.appltest.diagfwk.engine.provider.security.SecurityProvider
          extended by oracle.apps.fnd.appltest.diagfwk.engine.provider.security.cli.CLIDevSecurityProvider
All Implemented Interfaces:
DiagConstants

public class CLIDevSecurityProvider
extends SecurityProvider

Provides Command-Line interface specific interface for the SecurityProvider APIs.
This implementation is intended only for internal development environments and not for production use. This implementation always returns GUID and names for the "DIAG_ADMINISTRATOR" user and "FND_DIAG_ADMINISTRATOR" enterprise role. WARNING: since this bypasses JPS, Subjects created using this provider will not have any apps roles which include our Data Security App Roles

Since:
release specific (what release of product did this appear in)
Version:
$Header: atgpf/appltest/applications/Diagnostics/Engine/src/oracle/apps/fnd/appltest/diagfwk/engine/provider/security/cli/CLIDevSecurityProvider.java /main/5 2010/04/06 14:14:54 ilawler Exp $
Author:
ppradhan

Nested Class Summary
 
Nested classes/interfaces inherited from interface oracle.apps.fnd.appltest.diagfwk.common.DiagConstants
DiagConstants.ExecutionMode, DiagConstants.Format, DiagConstants.LinkType, DiagConstants.Status
 
Field Summary
static java.lang.String ROLEGUID_FND_DIAG_ADMINISTRATOR
          FND_DIAG_ADMINISTRATOR role GUID
static java.lang.String ROLENAME_FND_DIAG_ADMINISTRATOR
          FND_DIAG_ADMINISTRATOR role name
static java.lang.String USERGUID_DIAG_ADMINISTRATOR
          DIAG_ADMINISTRATOR GUID
static java.lang.String USERNAME_DIAG_ADMINISTRATOR
          DIAG_ADMINISTRATOR user
 
Fields inherited from class oracle.apps.fnd.appltest.diagfwk.engine.provider.security.SecurityProvider
DEFAULT_DIAGNOSTICS_POLICY_STRIPE_NAME
 
Fields inherited from interface oracle.apps.fnd.appltest.diagfwk.common.DiagConstants
APPS_MSG_ID_TAG_NAME, CFG_ADR_PROVIDER_CLASS, CFG_CACHE_PROVIDER_CLASS, CFG_CRED_PROVIDER_CLASS, CFG_DAO_FACTORY_CLASS, CFG_DB_CONN_INFO_PROVIDER_CLASS, CFG_DB_CONN_PROVIDER_CLASS, CFG_NLS_PROVIDER_CLASS, CFG_PLSQL_PROVIDER_CLASS, CFG_PROFILE_PROVIDER_CLASS, CFG_SECURITY_PROVIDER_CLASS, CFG_SESSION_INFO_PROVIDER_CLASS, CFG_URL_PROVIDER_FACTORY_CLASS, CFG_WLS_MBEANSRV_CONNINFO_PROVIDER_CLASS, DATA_SECURITY_PERMISSION_ALLOWED, DATA_SECURITY_PERMISSION_NOT_ALLOWED, DELIM_URL, EXEC_MODE_CLI, EXEC_MODE_ESS, EXEC_MODE_INCIDENT, EXEC_MODE_JAVA, EXEC_MODE_UI, EXECUTABLE_TYPE_JAVA, EXECUTABLE_TYPE_PLSQL, EXECUTABLE_TYPE_TESTREF, FORMAT_HTML, FORMAT_XML, GUID_ORACLE_MINUS1, GUID_ORACLE_ZERO, INPUTS_STATUS_ALL_OPT_INPUTS, INPUTS_STATUS_NO_INPUTS, INPUTS_STATUS_REQ_INPUTS_NO_DEFAULTS, INPUTS_STATUS_REQ_INPUTS_W_DEFAULTS, IO_FLAG_I, IO_FLAG_O, JMX_API_BASE_OBJECT_NAME, LINK_EXTERNAL, LINK_INTERNAL, LINK_METALINK, N, NLS_BUNDLE_JAVA_RES, NLS_BUNDLE_MSG_SVC, NLS_BUNDLE_RES_REF, NLS_BUNDLE_XLIFF, NO, NULL, ODF_MBEAN_DOMAIN_NAME, PARAM_MON_INTERVAL, PLSQL_DEBUG_ENABLED_SYSTEM_PROP, PREREQ_TYPE_TAG_VALUE, PREREQ_TYPE_TEST, SECONDS_IN_ONE_DAY, SECONDS_IN_ONE_HOUR, STATUS_CANCELED, STATUS_EXECERROR, STATUS_FAILURE, STATUS_RUNNING, STATUS_SUCCESS, STATUS_WARNING, SYS_PROP_MAX_MONITOR_INTERNVAL, SYS_PROP_MAX_NUM_THREADS, SYSPROP_APPCONNFILE, SYSPROP_DIAG_CONFIG_FILE, TAG_TYPE_DIAG, TAG_TYPE_TAXONOMY, TEST_TYPE_DECL, TEST_TYPE_JAVA, USER_NAME, WEB_APP_NAME_TAG_NAME, Y, YES
 
Constructor Summary
CLIDevSecurityProvider()
           
 
Method Summary
 javax.security.auth.Subject authenticateUser(java.lang.String user, java.lang.String password)
          API to authenticate a user given the user/pw
 void checkAccessJMXAPI(javax.security.auth.Subject wlsSubject)
           
 java.util.Map<java.lang.String,java.lang.String> getAllUserRoles()
           
 java.lang.String getDiagJPSPolicyContextID()
          This is a temporary method to return the JPS PolicyStore security context ID for the stripe containing Diagnostics roles so that we can get application roles in JMX/J2SE contexts.
 java.util.List<java.lang.String> getEnterpriseRoleNames()
           
 java.lang.String getPillarJPSPolicyContextID()
          This is a temporary method to return the JPS PolicyStore security context ID for the current pillar so that we can get application roles in JMX contexts.
 javax.security.auth.Subject getSubject()
           
 java.lang.String getUserGUID()
           
 java.lang.String getUserName()
           
 java.lang.Boolean isUserAuthenticated()
           
 
Methods inherited from class oracle.apps.fnd.appltest.diagfwk.engine.provider.security.SecurityProvider
getIsDumpExec, getIsRemoteInAppExec, instance, setIsDumpExec, setIsRemoteInAppExec
 
Methods inherited from class oracle.apps.fnd.appltest.diagfwk.common.DiagBaseFactory
createClassLoader, loadClassFor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USERNAME_DIAG_ADMINISTRATOR

public static final java.lang.String USERNAME_DIAG_ADMINISTRATOR
DIAG_ADMINISTRATOR user

See Also:
Constant Field Values

USERGUID_DIAG_ADMINISTRATOR

public static final java.lang.String USERGUID_DIAG_ADMINISTRATOR
DIAG_ADMINISTRATOR GUID

See Also:
Constant Field Values

ROLENAME_FND_DIAG_ADMINISTRATOR

public static final java.lang.String ROLENAME_FND_DIAG_ADMINISTRATOR
FND_DIAG_ADMINISTRATOR role name

See Also:
Constant Field Values

ROLEGUID_FND_DIAG_ADMINISTRATOR

public static final java.lang.String ROLEGUID_FND_DIAG_ADMINISTRATOR
FND_DIAG_ADMINISTRATOR role GUID

See Also:
Constant Field Values
Constructor Detail

CLIDevSecurityProvider

public CLIDevSecurityProvider()
Method Detail

isUserAuthenticated

public java.lang.Boolean isUserAuthenticated()
Specified by:
isUserAuthenticated in class SecurityProvider
Returns:
true if the user is logged in/authenticated

authenticateUser

public javax.security.auth.Subject authenticateUser(java.lang.String user,
                                                    java.lang.String password)
Description copied from class: SecurityProvider
API to authenticate a user given the user/pw

Specified by:
authenticateUser in class SecurityProvider
Returns:
the Subject attached to the user

getSubject

public javax.security.auth.Subject getSubject()
Specified by:
getSubject in class SecurityProvider
Returns:
the subject of the currently logged in user

getUserName

public java.lang.String getUserName()
Specified by:
getUserName in class SecurityProvider
Returns:
the user name of the currently logged in user

getUserGUID

public java.lang.String getUserGUID()
Specified by:
getUserGUID in class SecurityProvider
Returns:
the user GUID of the currently logged in user

getDiagJPSPolicyContextID

public java.lang.String getDiagJPSPolicyContextID()
This is a temporary method to return the JPS PolicyStore security context ID for the stripe containing Diagnostics roles so that we can get application roles in JMX/J2SE contexts. The Policy Context ID is used to determine which "application" we're in to figure out what stripe of the policy store we need to traverse to look for app roles to attach to our subject's principals.

Specified by:
getDiagJPSPolicyContextID in class SecurityProvider
Returns:
application context ID as expected by the PolicyStore's application map for use in PolicyContext.setContextID
See Also:
SecurityProvider.getDiagJPSPolicyContextID()

getPillarJPSPolicyContextID

public java.lang.String getPillarJPSPolicyContextID()
This is a temporary method to return the JPS PolicyStore security context ID for the current pillar so that we can get application roles in JMX contexts. If the current pillar cannot be determined, fall back to the stripe containing diagnostics roles. This should be removed when proper JMX handling is in place since this is a hack. The Policy Context ID is used to determine which "application" we're in to figure out what stripe of the policy store we need to traverse to look for app roles to attach to our subject's principals.

Specified by:
getPillarJPSPolicyContextID in class SecurityProvider
Returns:
application context ID as expected by the PolicyStore's application map for use in PolicyContext.setContextID
See Also:
SecurityProvider.getPillarJPSPolicyContextID()

getAllUserRoles

public java.util.Map<java.lang.String,java.lang.String> getAllUserRoles()
Specified by:
getAllUserRoles in class SecurityProvider
Returns:
Map of [role name->role GUI]D for all enterprise, app roles contained in the currently logged in user's Subject.

getEnterpriseRoleNames

public java.util.List<java.lang.String> getEnterpriseRoleNames()
Specified by:
getEnterpriseRoleNames in class SecurityProvider
Returns:
the list of enterprise role names contained in the currently logged in user's Subject.

checkAccessJMXAPI

public void checkAccessJMXAPI(javax.security.auth.Subject wlsSubject)
Specified by:
checkAccessJMXAPI in class SecurityProvider
Parameters:
wlsSubject - current user's WLS subject

Oracle Fusion Middleware extensions for Logging and Diagnostics
11g Release 1 (11.1.2)

E22565-02

Copyright © 2011 Oracle. All Rights Reserved.