AdminTask 物件的 FIPSCommands 指令群組
您可以使用 Jython 或 Jacl Scripting 語言,以 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 – 如果設定此值,則會配置系統來符合套組 B 128 標準。
- 192 - 如果設定此值,則會配置系統來符合套組 B 192 標準。
- -protocol
- 設定 Secure Sockets Layer (SSL) 配置的通訊協定。 只有在 -fipsLevel 旗標設為transition. 對於其他 fipsLevels , SSL 通訊協定已由規格定義。 transition 的有效值有: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 指令會傳回 attributeList 與 FIPS 設定。 該設定有 fipsEnabled、fipsLevel 和 suiteBLevel。
目標物件
無。必要參數
無。
回覆值:
getFipsInfo 指令會傳回 attributeList 與 FIPS 設定。 例如:如果已停用 FIPS,則 fipsLevel 和 suiteBLevel 是空字串。 例如:| 安全模式 | 來自 getFipsInfo 的回覆值 |
|---|---|
| 未啟用 FIPS | fipsEnabled = false
fipsLevel = (空字串) suiteBLevel = (空字串) |
| FIPS140-2 | ipsEnabled = true
fipsLevel=FIPS140-2 suiteBLevel= (空字串) |
| SP800-131 - Transition | fipsEnabled = true
fipsLevel = transition suiteBLevel = (空字串) |
| SP800-131 - Strict | fipsEnabled = true
fipsLevel=SP800-131 suiteBLevel= (空字串) |
| 套組 B 128 | fipsEnabled = true
fipsLevel = (空字串) suiteBLevel=128 |
| 套組 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 – 如果設定此值,則會配置系統來符合套組 B 128 標準。
- 192 - 如果設定此值,則會配置系統來符合套組 B 192 標準。
回覆值:
屬性清單有三個索引鍵:CAN_NOT_CONVERT、CAN_CONVERT 和 MEET_SECURITY_LEVEL。 針對每一個索引鍵,都會傳回一份 attributeList 清單。 一個 attributeList 包含憑證資訊:金鑰儲存庫、managementScope、別名和原因。 例如:{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 – 如果設定此值,則會配置系統來符合套組 B 128 標準。
- 192 - 如果設定此值,則會配置系統來符合套組 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 {}} }}