Removing authorization data by using the wsadmin tool
Use these commands to remove authorization data for the default roles, or for a destination or a foreign bus.
如果要執行這些指令,請使用 wsadmin Scripting 用戶端的 AdminTask 物件。 每個指令都在單一作業中處理多個物件。 這些指令可供您以一致的方式來進行最常需要的更新類型,其中直接修改基礎物件很容易造成錯誤。
wsadmin Scripting 用戶端是從 Qshell 執行.
如需相關資訊,請參閱利用 wsadmin Script 配置 Qshell 來執行 WebSphere Script.
服務整合匯流排指令有指令行說明:
- 如需 Jython 中可用的服務整合匯流排安全指令清單,以及每個指令的簡要說明,請在 wsadmin 提示下,輸入下列指令:
print AdminTask.help('SIBAdminBusSecurityCommands')
- 如需給定指令的概觀說明,請在 wsadmin 提示下,輸入下列指令:
print AdminTask.help('command_name')
使用指令之後,請利用下列指令,儲存對主要配置所做的變更:
AdminConfig.save()
Commands
- Removing authorization data for the defaults
- To remove all users and groups from every role (sender, receiver and so
on) in the defaults, use the following command:
- Using Jython:
AdminTask.removeDefaultRoles("-bus busname")
- Using Jacl:
$AdminTask removeDefaultRoles {-bus busname}
- Using Jython:
- Removing all authorization data for a destination
- To delete all authorization data for a destination, use the following
command:
- Using Jython:
AdminTask.removeDestinationRoles("-type destinationType -bus busname -foreignBus foreignBusName -destination destinationName")
- Using Jacl:
AdminTask.removeDestinationRoles("-type destinationType -bus busname -foreignBus foreignBusName -destination destinationName")
Notes:- This command deletes all authorization data for the specified destination. If the destination is a topic space, the command removes all authorization data for the virtual root and for the topics within the topic space, as well as for the topic space itself.
- You can use this command if you are deleting the destination and want to remove all associated authorization permissions, or if you want to block all access to a destination by removing all authorization permissions for it. In this second case a user might still be able to access the destination if they have been granted default authorization permissions. If you have specified default authorization permissions and you want to block all access to the destination, you must stop the destination inheriting the default permissions by using the command setInheritDefaultsForDestinations (see Defining destination defaults inheritance by using the wsadmin tool). You should use the removeDestinationRoles command first, followed by the setInheritDefaultsForDestinations command.
- Using Jython:
- Removing all authorization data for a foreign bus
- To delete all authorization data for the specified foreign bus, use the
following command:
- Using Jython:
AdminTask.removeForeignBusRoles("-bus busname -foreignBus foreignBusName")
- Using Jacl:
$AdminTask removeForeignBusRoles {-bus busname -foreignBus foreignBusName}
- Using Jython:
使用這些指令之後,請將變更儲存到主要配置;例如,使用以下的指令:
AdminConfig.save()