AdminTask 对象的 AuditKeyStoreCommands 命令组

可以使用 Jython 脚本语言,通过 wsadmin 工具来配置安全性审计系统。使用 AuditKeyStoreCommands 组中的命令和参数,在安全性审计系统中配置审计密钥库。

使用以下命令在 audit.xml 配置文件中管理审计密钥库:

createAuditKeyStore

audit.xml 文件中创建密钥库。系统使用此密钥库,对审计记录进行加密。

用户必须具有审计员管理角色才能运行此命令。

目标对象

无。

必需参数

-keyStoreName
指定密钥库的唯一名称。(字符串,必需)
-keyStoreType
指定有效的密钥库类型。缺省密钥库类型为 PKCS12。(字符串,必需)
-keyStoreLocation
指定系统创建密钥库的位置。(字符串,必需)
-keyStorePassword
指定密钥库的密码。(字符串,必需)
-keyStorePasswordVerify
验证密钥库的密码。(字符串,必需)

可选参数

-keyStoreProvider
指定密钥库的提供程序。(字符串,可选)
-keyStoreIsFileBased
指定密钥库是否基于文件。缺省值为 true。(布尔值,可选)
-keyStoreHostList
指定密钥库的主机列表。(字符串,可选)
-keyStoreInitAtStartup
指定系统在启动时是否初始化密钥库。缺省值为 false。(布尔值,可选)
-keyStoreReadOnly
指定密钥库是否为只读。缺省值为 false。(布尔值,可选)
-keyStoreStashFile
指定密钥库是否需要一个存储文件。(布尔值,可选)
-enableCryptoOperations
指定密钥库是否为加速密钥库。缺省值为 false。(布尔值,可选)
-scopeName
指定密钥库的作用域。(字符串,可选)
-keyStoreDescription
指定密钥库的描述。(字符串,可选)

返回值

此命令会返回新密钥库的标识,如以下示例所示:
KeyStore_1173199825578

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.createAuditKeyStore('-keyStoreName mynewkeystore -keyStoreLocation 
    c:\install_root\appserver\profiles\AppSrv01\config\cells -keyStorePassword 
    myPwd -keyStorePasswordVerify myPwd -keyStoreProvider IBMJCE -scopeName (cell):Node04Cell')
  • 使用 Jython 列表:
    AdminTask.createAuditKeyStore(['-keyStoreName', 'mynewkeystore', '-keyStoreLocation', 
    'c:\install_root\appserver\profiles\AppSrv01\config\cells', '-keyStorePassword',
    'myPwd', '-keyStorePasswordVerify', 'myPwd', '-keyStoreProvider', 'IBMJCE', 
    '-scopeName', '(cell):Node04Cell'])

交互方式示例用法

  • 使用 Jython:
    AdminTask.createAuditKeyStore('-interactive')

deleteAuditKeyStore

deleteAuditKeyStore 命令会从 audit.xml 配置文件中除去对审计密钥库的引用。

用户必须具有审计员管理角色才能运行此命令。

目标对象

无。

必需参数

-keyStoreName
指定密钥库的名称。(字符串,必需)

可选参数

-scopeName
指定密钥库的管理作用域。(字符串,可选)
-removeKeyStoreFile
指定是否要从配置中除去密钥库。如果相关密钥库未在使用中,请指定此参数。(布尔值,可选)

返回值

如果系统从 audit.xml 配置文件中成功除去对密钥库的引用,那么此命令会返回值 true

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.deleteAuditKeyStore('-keyStoreName AuditDefaultKeyStore -scopeName 
    (cell):Node04Cell -removeKeyStoreFile false')
  • 使用 Jython 列表:
    AdminTask.deleteAuditKeyStore(['-keyStoreName', 'AuditDefaultKeyStore', '-scopeName',
    '(cell):Node04Cell', '-removeKeyStoreFile', 'false'])

交互方式示例用法

  • 使用 Jython:
    AdminTask.deleteAuditKeyStore('-interactive')

getAuditKeyStoreInfo

getAuditKeyStoreInfo 命令会返回系统用来对审计记录进行加密的密钥库的属性列表。

用户必须具有监视员管理角色才能运行此命令。

目标对象

无。

必需参数

-keyStoreName
指定用于标识密钥库的唯一名称。(字符串,必需)

可选参数

-scopeName
指定密钥库的管理作用域。(字符串,可选)

返回值

此命令会返回密钥库的属性列表,如以下样本输出所示:
{{location ${CONFIG_ROOT}/audittrust.p12}
{password *****}
{_Websphere_Config_Data_Id cells/Node04Cell|audit.xml#KeyStore_1173199825578}
{_Websphere_Config_Data_Version {}}
{useForAcceleration false}
{slot 0}
{type PKCS12}
{additionalKeyStoreAttrs {}}
{fileBased true}
{_Websphere_Config_Data_Type KeyStore}
{customProviderClass {}}
{hostList {}}
{createStashFileForCMS false}
{description {keyStore description}}
{readOnly false}
{initializeAtStartup true}
{managementScope (cells/Node04Cell|audit.xml#ManagementScope_1173199825608)}

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.getAuditKeyStoreInfo('-keyStoreName AuditDefaultKeyStore')
  • 使用 Jython 列表:
    AdminTask.getAuditKeyStoreInfo(['-keyStoreName', 'AuditDefaultKeyStore'])

交互方式示例用法

  • 使用 Jython:
    AdminTask.getAuditKeyStoreInfo('-interactive')

listAuditKeyStores

listAuditKeyStores 命令会列出特定管理作用域中审计密钥库的属性,或所有审计密钥库的属性。

用户必须具有监视员管理角色才能运行此命令。

目标对象

无。

可选参数

-scopeName
指定与相关密钥库相关联的管理作用域。(字符串,可选)
-all
指定是否列出所有密钥库。将 -all 参数设为 true 时,它会覆盖 -scopeName 参数。(布尔值,可选)

返回值

此命令会返回相关作用域的属性列表,如以下样本输出所示:
{{location ${CONFIG_ROOT}/audittrust.p12}
{password *****}
{_Websphere_Config_Data_Id cells/Node04Cell|audit.xml#KeyStore_1173199825578}
{_Websphere_Config_Data_Version {}}
{useForAcceleration false}
{slot 0}
{type PKCS12}
{additionalKeyStoreAttrs {}}
{fileBased true}
{_Websphere_Config_Data_Type KeyStore}
{customProviderClass {}}
{hostList {}}
{keyStoreRef KeyStore_1173199825578}
{createStashFileForCMS false}
{description {keyStore description}}
{managementScope (cells/Node04Cell|audit.xml#ManagementScope_1173199825608)}
{readOnly false}
{initializeAtStartup true}
{usage {}}
{provider IBMJCE}{name AuditDefaultKeyStore}}
{{location c:\install_root\appserver\profiles\AppSrv01\config\cells}
{password *****}
{_Websphere_Config_Data_Id cells/Node04Cell|audit.xml#KeyStore_1184700968484}
{_Websphere_Config_Data_Version {}}
{useForAcceleration false}
{slot 0}
{type PKCS12}
{additionalKeyStoreAttrs {}}
{fileBased true}
{_Websphere_Config_Data_Type KeyStore}
{customProviderClass {}}
{hostList {}}
{keyStoreRef KeyStore_1184700968484}
{createStashFileForCMS false}
{description {}}
{managementScope {}}
{readOnly false}
{initializeAtStartup false}
{usage {}}
{provider IBMJCE}
{name mykeystore}}

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.listAuditKeyStores('-scopeName (cell):Node04Cell')
  • 使用 Jython 列表:
    AdminTask.listAuditKeyStores(['-scopeName', '(cell):Node04Cell'])

交互方式示例用法

  • 使用 Jython:
    AdminTask.listAuditKeyStores('-interactive')

modifyAuditKeyStore

modifyAuditKeyStore 命令会修改 audit.xml 文件中的密钥库引用。此命令会编辑对审计记录进行加密的密钥库。

用户必须具有审计员管理角色才能运行此命令。

目标对象

无。

必需参数

-keyStoreName
指定密钥库的唯一名称。(字符串,必需)

可选参数

-scopeName
指定此密钥库的作用域名称。(字符串,可选)
-keyStoreType
指定有效的密钥库类型。(字符串,可选)
-keyStoreLocation
指定系统创建密钥库的位置。(字符串,可选)
-keyStorePassword
指定此密钥库的密码。(字符串,可选)
-keyStoreIsFileBased
指定密钥库是否基于文件。(布尔值,可选)
-keyStoreInitAtStartup
指定系统在启动时是否应该初始化密钥库。(布尔值,可选)
-keyStoreReadOnly
指定密钥库是只读还是可编辑。(布尔值,可选)
-keyStoreDescription
指定密钥库的描述。(字符串,可选)

返回值

如果系统成功修改密钥库,那么此命令会返回值 true

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.modifyAuditKeyStore('-keyStoreName AuditDefaultKeyStore -scopeName 
    (cell):Node04Cell -keyStoreType PKCS12 -keyStoreLocation
    c:\install_root\appserver\profiles\AppSrv01\config\cells\Node04Cell\audittrust.p12 
    -keyStorePassword myPwd')
  • 使用 Jython 列表:
    AdminTask.modifyAuditKeyStore(['-keyStoreName', 'AuditDefaultKeyStore', '-scopeName',
    '(cell):Node04Cell', '-keyStoreType', 'PKCS12', '-keyStoreLocation',
    'c:\install_root\appserver\profiles\AppSrv01\config\cells\Node04Cell\audittrust.p12', 
    '-keyStorePassword', 'myPwd'])

交互方式示例用法

  • 使用 Jython:
    AdminTask.modifyAuditKeyStore('-interactive')

指示主题类型的图标 参考主题



时间戳记图标 最近一次更新时间: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=rxml_7audit1
文件名:rxml_7audit1.html