AdminTask 对象的 FIPSCommands 命令组
可以使用 Jython 或 Jacl 脚本编制语言来通过 wsadmin 工具配置联邦信息处理标准 (FIPS)。
AdminTask 对象的 FIPSCommands 命令组包括以下命令:
enableFips
enableFips 命令启用或禁用指定的安全性级别。目标对象
无。
必需参数
- -enableFips
- 如果将此标志设置为
true
,那么将在其他参数指定的安全性级别上启用 FIPS。 如果将此标志设置为false
,那么将禁用 FIPS 并且忽略其他参数。 此参数的值将设置为 com.ibm.security.useFIPS 安全性定制属性。 (布尔值,必需)
可选参数
- -fipsLevel
- 指定要使用的安全性标准的级别。 (字符串,可选)。 无缺省值。 有效值包括:
- FIPS140-2
- 如果设置此值,那么系统将配置为符合 FIPS 140-2 方式。
- 转换
- 如果设置此值,那么系统将配置为符合 SP800-131 转换方式。
- SP800-131
- 如果设置此值,那么系统将配置为符合 SP800-131 严格方式。
提供的值在 com.ibm.websphere.security.FIPSLevel 安全性定制属性上设置。
必须指定 fipsLevel 或 suiteBLevel 中的任何一个。
- -suiteBLevel
- 指定 suiteBLevel 的级别。 无缺省值。 提供的值在 com.ibm.websphere.security.suiteb 安全性定制属性上设置。 (字符串,可选)有效值为:
- 128 - 如果设置此值,那么系统将配置为符合 Suite B 128。
- 192 - 如果设置此值,那么系统将配置为符合 Suite B 192。
- -protocol
- 设置安全套接字层 (SSL) 配置的协议。 仅当 -fipsLevel 标志设置为transition. 对于其他 fipsLevels , SSL 协议已由规范定义。 转换的有效值为:TLS、TLSv1.1 和 TLSv1.2。 请注意,管理控制台仅将 TLS 和 TLSv1.2 显示为有效值。 可以在命令行上指定 TLS1.1。 (字符串,可选)
返回值:
True
(成功)或 false
(失败)。 如果为 false,那么 System.Out.log 中将记录失败的原因。示例
- 使用 Jacl 字符串:
$AdminTask enableFips {-enableFips true -fipsLevel transition } true
getFipsInfo
getFipsInfo 命令返回带有 FIPS 设置的 attributeList。 这些设置为 fipsEnabled、fipsLevel 和 suiteBLevel。
目标对象
无。必需参数
无。
返回值:
getFipsInfo 命令返回带有 FIPS 设置的 attributeList。 例如:如果已禁用 FIPS,那么 fipsLevel 和 suiteBLevel 为空字符串。 例如:安全性方式 | 来自 getFipsInfo 的返回值 |
---|---|
未启用 FIPS | fipsEnabled = false
fipsLevel = (空字符串) suiteBLevel = (空字符串) |
FIPS140-2 | ipsEnabled = true
fipsLevel=FIPS140-2 suiteBLevel = (空字符串) |
SP800-131 - 转换 | fipsEnabled = true
fipsLevel = 转换 suiteBLevel = (空字符串) |
SP800-131 - 严格 | fipsEnabled = true
fipsLevel=SP800-131 suiteBLevel = (空字符串) |
Suite B 128 | fipsEnabled = true
fipsLevel = (空字符串) suiteBLevel=128 |
Suite B 192 | fipsEnabled = true
fipsLevel = (空字符串) suiteBLevel=192 |
示例
- 使用 Jacl:
$AdminTask getFipsInfo {fipsEnabled true} {fipsLevel SP800-131} {suiteBLevel {}}
listCertStatusForSecurityStandard
listCertStatusForSecurityStandard 命令将返回由 SSL 配置和插件使用的所有证书,并说明它们是否符合所要求的安全性级别。
目标对象
无。必需参数
无。可选参数
- -suiteBLevel
- 启用或禁用 FIPS。 无缺省值。 将该标志设置为
true
时,com.ibm.security.useFips 安全性定制属性将设置为 true。 如果将该标志设置为false
,那么 com.ibm.security.useFips 安全性定制属性将设置为 false,并将忽略其他标志。 (字符串,可选) - -fipsLevel
- 指定要使用的安全性标准的级别。 (字符串,可选)。 无缺省值。 有效值包括:
- FIPS140-2
- 如果设置此值,那么系统将配置为符合 FIPS 140-2 方式。
- 转换
- 如果设置此值,那么系统将配置为符合 SP800-131 转换方式。
- SP800-131
- 如果设置此值,那么系统将配置为符合 SP800-131 严格方式。
提供的值在 com.ibm.websphere.security.FIPSLevel 安全性定制属性上设置。
必须指定 fipsLevel 或 suiteBLevel 中的任何一个。
- -suiteBLevel
- 指定 suiteBLevel 的级别。 无缺省值。 提供的值在 com.ibm.websphere.security.suiteb 安全性定制属性上设置。 (字符串,可选)有效值为:
- 128 - 如果设置此值,那么系统将配置为符合 Suite B 128。
- 192 - 如果设置此值,那么系统将配置为符合 Suite B 192。
返回值:
具有以下三个关键字的 attributeList 列表:CAN_NOT_CONVERT、CAN_CONVERT 和 MEET_SECURITY_LEVEL。 对于每个关键字,将返回一个 attributeList 列表。 一个 attributeList 包含证书信息:密钥库、管理作用域、别名和原因。 例如:{conversionStatus=CAN_NOT_CONVERT
certificateInfo = { keystore = <keystore name>
managementScope = <managementScope>
alias = <certificate alias>
reason = <reason why certificate can not be converted>
} ...
{conversionStatus= CAN_CONVERT
certificateInfo = { keystore = <keystore name>
managementScope = <managementScope>
alias = <certificate alias>
reason = empty when certificate can be converted
} ...
{conversionStatus=MEET_SECURITY_LEVEL
certificateInfo = { keystore = <keystore name>
managementScope = <managementScope>
alias = <certificate alias>
reason = empty when certificate already meets security level
示例
- 使用 Jython:
wsadmin>$AdminTask listCertStatusForSecurityStandard {-fipsLevel SP800-131 -suiteBLevel 128 } {CAN_CONVERT {{keystore NodeDefaultKeyStore} {managementScope (cell):testNode 01Cell:(node):testNode01} {alias default} {reason {Current SignatureAlgorithm is SHA256withRSA. SignatureAlgorithm needs to be one of [SHA256withECDSA] to be compliant with SP 800-131 - Suite B 128. }} {keystore NodeDefaultRootStore} {managementScope (cell):testNode01Cell:(node) :testNode01} {alias root} {reason {Current SignatureAlgorithm is SHA256withRS A. SignatureAlgorithm needs to be one of [SHA256withECDSA] to be compliant with SP 800-131 - Suite B 128. }} }} {CAN_NOT_CONVERT {}} {MEET_SECURITY_STANDARD {}}
convertCertForSecurityStandard
convertCertForSecurityStandard 命令将转换由 SSL 配置和插件使用的所有证书。
目标对象
无。必需参数
无。可选参数
- -fipsLevel
- 指定要使用的安全性标准的级别。 (字符串,可选)。 无缺省值。 有效值包括:
- FIPS140-2
- 如果设置此值,那么系统将配置为符合 FIPS 140-2 方式。
- 转换
- 如果设置此值,那么系统将配置为符合 SP800-131 转换方式。
- SP800-131
- 如果设置此值,那么系统将配置为符合 SP800-131 严格方式。
提供的值在 com.ibm.websphere.security.FIPSLevel 安全性定制属性上设置。
必须指定 fipsLevel 或 suiteBLevel 中的任何一个。
- -suiteBLevel
- 指定 suiteBLevel 的级别。 无缺省值。 提供的值在 com.ibm.websphere.security.suiteb 安全性定制属性上设置。 (字符串,可选)有效值为:
- 128 - 如果设置此值,那么系统将配置为符合 Suite B 128。
- 192 - 如果设置此值,那么系统将配置为符合 Suite B 192。
- -signatureAlgorithem
- 检查 signatureAlgorithm 是否与 FipsLevel 和 suiteB 一致。 如果一致,请使用 signatureAlgorithm 来转换证书。 如果不一致,请使用一致的 signatureAlgorithm。 (字符串,必需)
- -keySize
- 检查 keySize 是否与 FipsLevel 和 suiteB 一致。 如果一致,请使用 keySize 来转换证书。 如果不一致,请使用 signatureAlgorithm 的最小值。
返回值:
{conversionStatus=CAN_NOT_CONVERT
certificateInfo = {keystore = <keystore name>
managementScope = <managementScope>
alias = <certificate alias>
reason = <reason why certificate can not be converted>
} ...
{conversionStatus=MEET_SECURITY_STANDARD
certificateInfo = {keystore = <keystore name>
managementScope = <managementScope>
alias = <certificate alias>
reason = empty when certificate meets security standard.
} ...
示例
- 使用 Jacl:
wsadmin> $AdminTask convertCertForSecurityStandard {-fipsLevel FIPS140-2 -signatureAlgorithm SHA256withRSA -keySize 2048 } {CAN_CONVERT {}} {CAN_NOT_CONVERT {}} {MEET_SECURITY_STANDARD {{keystore NodeDef aultRootStore} {managementScope (cell):testNode01Cell:(node):testNode01} { alias root} {reason {}} {keystore NodeDefaultKeyStore} {managementScope (cell):testNode01Cell:(node): testNode01} {alias default} {reason {}} }}