Sonic Management API

com.sonicsw.mf.common.security
Interface IManagementSecurityConfigurator


public interface IManagementSecurityConfigurator

This interface is used by administration clients to enable and configure the management security features:

Creation and use of an instance of this interface is best demonstrated by the sample located at: <installdir>/MQ<version>/samples/Management/mgmtSecurityAPI/java


Method Summary
 com.sonicsw.mf.common.dirconfig.IDirElement getDomainElement(boolean forUpdate)
          Gets the element that contains the domain-wide settings.
 IManagementPermission[][] getManagementPermissions(java.lang.String[] paths, java.lang.String type)
          Return the management permissions for the given paths of the particular type ("configure" or "manage").
 void removeAllManagementPermissions()
          Remove all management permissions.
 void removeManagementPermissions(java.lang.String[] paths, java.lang.String type)
          Remove all manage or configure permissions for each path in paths.
 void removeManagementPermissions(java.lang.String[] paths, java.lang.String type, java.lang.String[][] principals)
          Remove the manage or configure permissions in the corresponding principals array for each path in paths.
 void setDefaultManagementPermissions()
          Set the global default manage and configure permissions for the Administrators group.
 void setDomainElement(com.sonicsw.mf.common.dirconfig.IDeltaDirElement element)
          Applies a modification to the domain-wide settings element.
 void setManagementPermissions(java.lang.String[] paths, java.lang.String type, IManagementPermission[][] permissions)
          Set management permissions.
 

Method Detail

getDomainElement

com.sonicsw.mf.common.dirconfig.IDirElement getDomainElement(boolean forUpdate)
                                                             throws com.sonicsw.mf.common.dirconfig.DirectoryServiceException
Gets the element that contains the domain-wide settings.

Although the configuration element containing domain-wide management security settings is available through this API, it is recommened that users configure the domain-wide settings through the Sonic Management Console or strictly follow the sample located at: <installdir>/MQ<version>/samples/Management/mgmtSecurityAPI/java

Returns:
The domain wide element.
Throws:
com.sonicsw.mf.common.dirconfig.DirectoryServiceException - Thrown if there is a problem accessing the underlying storage.

getManagementPermissions

IManagementPermission[][] getManagementPermissions(java.lang.String[] paths,
                                                   java.lang.String type)
                                                   throws com.sonicsw.mf.common.dirconfig.DirectoryServiceException
Return the management permissions for the given paths of the particular type ("configure" or "manage").

Will throw a runtime ConfigurePermissionDeniedException if the calling user does not have IConfigurePermissionBit.ALLOW_READ permission on any of the paths.

Parameters:
paths - The logical names of folders or configurations (for "configure" permissions) or folders, containers or components for "manage" permissions.
type - "manage" or "configure", for manage or configure permissions.
Returns:
An array of defined permissions for each path in paths.
Throws:
com.sonicsw.mf.common.dirconfig.DirectoryServiceException - Thrown if a path is invalid, or there's a problem getting the permissions information.
See Also:
IManagementPermission, IConfigureScopeBits, IConfigurePermissionBits, IManageScopeBits, IManagePermissionBits

removeAllManagementPermissions

void removeAllManagementPermissions()
                                    throws com.sonicsw.mf.common.dirconfig.DirectoryServiceException
Remove all management permissions.

Throws:
com.sonicsw.mf.common.dirconfig.DirectoryServiceException - Thrown if there's a problem updating the permissions information.

removeManagementPermissions

void removeManagementPermissions(java.lang.String[] paths,
                                 java.lang.String type)
                                 throws com.sonicsw.mf.common.dirconfig.DirectoryServiceException
Remove all manage or configure permissions for each path in paths.

Will throw a ConfigurePermissionDeniedException if the caller does not have IConfigurePermissionBits.ALLOW_SET_PERMISSIONS permission on any of the paths.

Parameters:
paths - The logical names of folders or configurations (for "configure" permissions) or folders, containers or components for "manage" permissions.
type - "manage" or "configure", for manage or configure permissions.
Throws:
com.sonicsw.mf.common.dirconfig.DirectoryServiceException - Thrown if a path is invalid, or there's a problem getting the permissions information.
See Also:
IManagementPermission, IConfigureScopeBits, IConfigurePermissionBits, IManageScopeBits, IManagePermissionBits

removeManagementPermissions

void removeManagementPermissions(java.lang.String[] paths,
                                 java.lang.String type,
                                 java.lang.String[][] principals)
                                 throws com.sonicsw.mf.common.dirconfig.DirectoryServiceException,
                                        InvalidManagementPermissionException
Remove the manage or configure permissions in the corresponding principals array for each path in paths.

Will throw a runtime ConfigurePermissionDeniedException if the caller does not have IConfigurePermissionBits.ALLOW_SET_PERMISSIONS permission on any of the paths.

Parameters:
paths - The logical names of folders or configurations (for "configure" permissions) or folders, containers or components for "manage" permissions.
type - "manage" or "configure", for manage or configure permissions.
principals - An array of array of principals for each path in paths. This method removes the permissions set for each principal.
Throws:
com.sonicsw.mf.common.dirconfig.DirectoryServiceException - Thrown if a path is invalid, or there's a problem getting the permissions information.
InvalidManagementPermissionException - Thrown if a given principal does not have a permission on the associated path.
See Also:
IManagementPermission, IConfigureScopeBits, IConfigurePermissionBits, IManageScopeBits, IManagePermissionBits

setDefaultManagementPermissions

void setDefaultManagementPermissions()
                                     throws com.sonicsw.mf.common.dirconfig.DirectoryServiceException
Set the global default manage and configure permissions for the Administrators group.

Throws:
com.sonicsw.mf.common.dirconfig.DirectoryServiceException - Thrown if there's a problem updating the permissions information.

setDomainElement

void setDomainElement(com.sonicsw.mf.common.dirconfig.IDeltaDirElement element)
                      throws com.sonicsw.mf.common.dirconfig.DirectoryServiceException
Applies a modification to the domain-wide settings element.

Although the configuration element containing domain-wide management security settings is available through this API, it is recommened that users configure the domain-wide settings through the Sonic Management Console or strictly follow the sample located at: <installdir>/MQ<version>/samples/Management/mgmtSecurityAPI/java

Parameters:
element - The delta element to be applied to the DS.
Throws:
com.sonicsw.mf.common.dirconfig.DirectoryServiceException - Thrown if there is a problem accessing the underlying storage or the folder does not exist.

setManagementPermissions

void setManagementPermissions(java.lang.String[] paths,
                              java.lang.String type,
                              IManagementPermission[][] permissions)
                              throws com.sonicsw.mf.common.dirconfig.DirectoryServiceException,
                                     InvalidManagementPermissionException
Set management permissions.

For "manage" permissions, the path of components in containers is specified as /<folder1>/.../<foldern>/<ContainerName>:ID=<ComponentName>

Will throw a runtime ConfigurePermissionDeniedException if the caller does not have IConfigurePermissionBits.ALLOW_SET_PERMISSIONS permission on any of the paths.

Parameters:
paths - The logical names of folders or configurations (for "configure" permissions) or folders, containers or components for "manage" permissions.
type - "manage" or "configure", for manage or configure permissions.
permissions - An array of permissions for each one of the paths.
Throws:
com.sonicsw.mf.common.dirconfig.DirectoryServiceException - Thrown if a path is invalid, or there's a problem getting or modifying the permissions information.
InvalidPermissionException - Thrown if a scope specification is incorrect for the path, or a principal does not exist in the global authentication domain.
InvalidManagementPermissionException
See Also:
IManagementPermission, IConfigureScopeBits, IConfigurePermissionBits, IManageScopeBits, IManagePermissionBits

Sonic Management API

Copyright © 2001-2010 Progress Software Corporation. All Rights Reserved.
HTML formatted on 16-Sep-2010.