com.metamatrix.admin.server
Class ServerSecurityAdminImpl

java.lang.Object
  extended by com.metamatrix.admin.server.AbstractAdminImpl
      extended by com.metamatrix.admin.server.ServerSecurityAdminImpl
All Implemented Interfaces:
ServerSecurityAdmin, SecurityAdmin

public class ServerSecurityAdminImpl
extends AbstractAdminImpl
implements ServerSecurityAdmin

Since:
4.3

Field Summary
 
Fields inherited from class com.metamatrix.admin.server.AbstractAdminImpl
OBJECT_TYPE_CACHE, OBJECT_TYPE_CONNECTION_POOL, OBJECT_TYPE_CONNECTOR_BINDING, OBJECT_TYPE_CONNECTOR_TYPE, OBJECT_TYPE_EXTENSION_MODULE, OBJECT_TYPE_GROUP, OBJECT_TYPE_LOG_CONFIGURATION, OBJECT_TYPE_MODEL, OBJECT_TYPE_PROCESS_OBJECT, OBJECT_TYPE_PROPERTY_DEFINITION, OBJECT_TYPE_QUEUE_WORKER_POOL, OBJECT_TYPE_REQUEST, OBJECT_TYPE_ROLE, OBJECT_TYPE_SESSION, OBJECT_TYPE_TRANSACTION, OBJECT_TYPE_VDB, OBJECTS_PACKAGE, parent, registry
 
Constructor Summary
ServerSecurityAdminImpl(ServerAdminImpl parent, ClusteredRegistryState registry)
           
 
Method Summary
 void assignRoleToGroup(java.lang.String roleIdentifier, java.lang.String groupIdentifier)
          Assign to the given Group the given Administrative Role.
 boolean authenticateUser(java.lang.String username, char[] credentials, java.io.Serializable trustePayload, java.lang.String applicationName)
          Authenticate a user with the specified user name and credentials for use with the specified application.
 char[] exportDataRoles(java.lang.String vdbName, java.lang.String vdbVersion)
          Export the data roles defined for the given vdb from the current system
 java.util.List<java.lang.String> getDomainNames()
          Returns the active authorization provider domain names, in authentication order.
 java.util.Collection<Group> getGroups(java.lang.String groupIdentifier)
          Get the group denoted by the given groupIdentifier.
 java.util.Collection<Group> getGroupsForDomain(java.lang.String domainName)
          Return the Groups for a given domain.
 java.util.Collection getGroupsForUser(java.lang.String userIdentifier)
          Get the group memberships for the given user.
 java.util.Collection getRolesForGroup(java.lang.String groupIdentifier)
          Get the Collection of administrative role names possessed by the given group, if any.
 java.util.Collection getRolesForUser(java.lang.String userIdentifier)
          Get the Collection of administrative role names possessed by the given user, if any.
 java.lang.String importDataRoles(java.lang.String vdbName, java.lang.String vdbVersion, char[] xmlContents, AdminOptions options)
          Import the data Roles for given vdb and version into the connected server
 void removeRoleFromGroup(java.lang.String roleIdentifier, java.lang.String groupIdentifier)
          Remove an administrative role from the given Group.
 
Methods inherited from class com.metamatrix.admin.server.AbstractAdminImpl
convertPropertyDefinitions, convertPropertyDefinitions, convertPropertyDefinitions, convertToAdminVDB, getAdminObjects, getAuthorizationServiceProxy, getConfigurationModel, getConfigurationServiceProxy, getConnectorBindingNamesFromUUIDs, getConnectorBindingNamesMapFromUUIDs, getDeployedComponent, getExtensionSourceManager, getMembershipServiceProxy, getName, getObjectType, getParent, getQueryServiceProxy, getRuntimeStateAdminAPIHelper, getSessionID, getSessionServiceProxy, getUserName, getVDBs, identifierMatches, identifierMatches, logDetail, shutDownConnectorBinding, throwProcessingException, validateSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerSecurityAdminImpl

public ServerSecurityAdminImpl(ServerAdminImpl parent,
                               ClusteredRegistryState registry)
Method Detail

assignRoleToGroup

public void assignRoleToGroup(java.lang.String roleIdentifier,
                              java.lang.String groupIdentifier)
                       throws AdminException
Description copied from interface: ServerSecurityAdmin
Assign to the given Group the given Administrative Role.

Specified by:
assignRoleToGroup in interface ServerSecurityAdmin
Specified by:
assignRoleToGroup in interface SecurityAdmin
Parameters:
roleIdentifier - one of AdminRoles.
groupIdentifier - the unique identifier for the Principal. The WILDCARD cannot be used here.
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
com.metamatrix.admin.api.server.ServerSecurityAdmin#addRoleToGroup(java.lang.String, java.lang.String)

removeRoleFromGroup

public void removeRoleFromGroup(java.lang.String roleIdentifier,
                                java.lang.String groupIdentifier)
                         throws AdminException
Description copied from interface: ServerSecurityAdmin
Remove an administrative role from the given Group.

Specified by:
removeRoleFromGroup in interface ServerSecurityAdmin
Specified by:
removeRoleFromGroup in interface SecurityAdmin
Parameters:
roleIdentifier - one of AdminRoles
groupIdentifier - the unique identifier for the Principal. The WILDCARD cannot be used here.
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
ServerSecurityAdmin.removeRoleFromGroup(java.lang.String, java.lang.String)

authenticateUser

public boolean authenticateUser(java.lang.String username,
                                char[] credentials,
                                java.io.Serializable trustePayload,
                                java.lang.String applicationName)
                         throws AdminException
Description copied from interface: ServerSecurityAdmin
Authenticate a user with the specified user name and credentials for use with the specified application. The application name may also be used by the Membership Service to determine the appropriate authentication mechanism.

Specified by:
authenticateUser in interface ServerSecurityAdmin
Specified by:
authenticateUser in interface SecurityAdmin
Parameters:
username - the user name that is to be authenticated
applicationName - the name of the application for which the user is authenticating
Returns:
true if the authentication is successful
Throws:
AdminException

getRolesForUser

public java.util.Collection getRolesForUser(java.lang.String userIdentifier)
                                     throws AdminException
Description copied from interface: ServerSecurityAdmin
Get the Collection of administrative role names possessed by the given user, if any.

Specified by:
getRolesForUser in interface ServerSecurityAdmin
Parameters:
userIdentifier - The unique identifier for the user. This is generally a user name. A user is a Principal and a Principal name is considered to be unique throughout the MetaMatrix system across all Membership domains. The WILDCARD cannot be used here.
Returns:
The Collection of Roles
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
ServerSecurityAdmin.getRolesForUser(java.lang.String)

getGroupsForUser

public java.util.Collection getGroupsForUser(java.lang.String userIdentifier)
                                      throws AdminException
Description copied from interface: ServerSecurityAdmin
Get the group memberships for the given user.

Specified by:
getGroupsForUser in interface ServerSecurityAdmin
Specified by:
getGroupsForUser in interface SecurityAdmin
Parameters:
userIdentifier - The unique identifier for the user. This is generally a user name. A user is a Principal and a Principal name is considered to be unique throughout the MetaMatrix system across all Membership domains. The WILDCARD cannot be used here.
Returns:
The collection of groups in which the given user has membership.
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
com.metamatrix.admin.api.server.ServerSecurityAdmin#getGroupsForUser(java.lang.String, boolean)

getGroups

public java.util.Collection<Group> getGroups(java.lang.String groupIdentifier)
                                      throws AdminException
Description copied from interface: ServerSecurityAdmin
Get the group denoted by the given groupIdentifier.

Specified by:
getGroups in interface ServerSecurityAdmin
Specified by:
getGroups in interface SecurityAdmin
Parameters:
groupIdentifier - The unique identifier for the Group. This is generally a group name. A group is a Principal and a Principal name is considered to be unique throughout the MetaMatrix system across all Membership domains.
Note that by supplying the WILDCARD identifier, all all users in the system will retrieved.
Returns:
The Collection of groups.
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
ServerSecurityAdmin.getGroups(java.lang.String)

getRolesForGroup

public java.util.Collection getRolesForGroup(java.lang.String groupIdentifier)
                                      throws AdminException
Description copied from interface: ServerSecurityAdmin
Get the Collection of administrative role names possessed by the given group, if any.

Specified by:
getRolesForGroup in interface ServerSecurityAdmin
Specified by:
getRolesForGroup in interface SecurityAdmin
Parameters:
groupIdentifier - The unique identifier for the Group. This is group name. A user is a Principal and a Principal name is considered to be unique throughout the MetaMatrix system across all Membership domains. The WILDCARD cannot be used here.
Returns:
The Collection of Roles.
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
ServerSecurityAdmin.getRolesForGroup(java.lang.String)

importDataRoles

public java.lang.String importDataRoles(java.lang.String vdbName,
                                        java.lang.String vdbVersion,
                                        char[] xmlContents,
                                        AdminOptions options)
                                 throws AdminException
Description copied from interface: ServerSecurityAdmin
Import the data Roles for given vdb and version into the connected server

Specified by:
importDataRoles in interface ServerSecurityAdmin
Specified by:
importDataRoles in interface SecurityAdmin
Parameters:
vdbName - - target name of the VDB, the roles to be imported under
vdbVersion - - target version of the vdb, the roles to be imported under
xmlContents - - character data array containing the XML file which defines the roles
options - - options to overwrite in case the matching roles already exist.
Returns:
a report of the import
Throws:
AdminException
See Also:
ServerSecurityAdmin.importDataRoles(java.lang.String, java.lang.String, char[], org.teiid.adminapi.AdminOptions)

exportDataRoles

public char[] exportDataRoles(java.lang.String vdbName,
                              java.lang.String vdbVersion)
                       throws AdminException
Description copied from interface: ServerSecurityAdmin
Export the data roles defined for the given vdb from the current system

Specified by:
exportDataRoles in interface ServerSecurityAdmin
Specified by:
exportDataRoles in interface SecurityAdmin
Parameters:
vdbName - - Name of the vdb
vdbVersion - - version of the vdb
Returns:
- char[] stream containing the XML contents of the roles.
Throws:
AdminException
See Also:
ServerSecurityAdmin.exportDataRoles(java.lang.String, java.lang.String)

getDomainNames

public java.util.List<java.lang.String> getDomainNames()
                                                throws AdminException
Description copied from interface: ServerSecurityAdmin
Returns the active authorization provider domain names, in authentication order.

Specified by:
getDomainNames in interface ServerSecurityAdmin
Specified by:
getDomainNames in interface SecurityAdmin
Returns:
List
Throws:
AdminException

getGroupsForDomain

public java.util.Collection<Group> getGroupsForDomain(java.lang.String domainName)
                                               throws AdminException
Description copied from interface: ServerSecurityAdmin
Return the Groups for a given domain. The domain name must be an specified exactly. See #getActiveDomainNames() for possible domain names.

Specified by:
getGroupsForDomain in interface ServerSecurityAdmin
Specified by:
getGroupsForDomain in interface SecurityAdmin
Returns:
Throws:
AdminException


Copyright © 2009. All Rights Reserved.