2.8.3.2. 整合性シールド保護の有効化
Red Hat Advanced Cluster Management マネージドクラスターで整合性シールドを有効にするには、以下の手順を実行します。
ハブクラスターに整合性シールド用の namespace を作成します。以下のコマンドを実行します。
oc create ns your-integrity-shield-ns
oc create ns your-integrity-shield-nsCopy to Clipboard Copied! Toggle word wrap Toggle overflow 検証キーを Red Hat Advanced Cluster Management マネージドクラスターにデプロイします。なお、署名キーおよび検証キーを作成する必要があります。ハブクラスターで
acm-verification-key-setup.shを実行して検証キーを設定します。以下のコマンドを実行します。curl -s https://raw.githubusercontent.com/stolostron/integrity-shield/master/scripts/ACM/acm-verification-key-setup.sh | bash -s \ --namespace integrity-shield-operator-system \ --secret keyring-secret \ --path /tmp/pubring.gpg \ --label environment=dev | oc apply -f -curl -s https://raw.githubusercontent.com/stolostron/integrity-shield/master/scripts/ACM/acm-verification-key-setup.sh | bash -s \ --namespace integrity-shield-operator-system \ --secret keyring-secret \ --path /tmp/pubring.gpg \ --label environment=dev | oc apply -f -Copy to Clipboard Copied! Toggle word wrap Toggle overflow 検証キーを削除するには、以下のコマンドを実行します。
curl -s https://raw.githubusercontent.com/stolostron/integrity-shield/master/scripts/ACM/acm-verification-key-setup.sh | bash -s - \ --namespace integrity-shield-operator-system \ --secret keyring-secret \ --path /tmp/pubring.gpg \ --label environment=dev | oc delete -f -curl -s https://raw.githubusercontent.com/stolostron/integrity-shield/master/scripts/ACM/acm-verification-key-setup.sh | bash -s - \ --namespace integrity-shield-operator-system \ --secret keyring-secret \ --path /tmp/pubring.gpg \ --label environment=dev | oc delete -f -Copy to Clipboard Copied! Toggle word wrap Toggle overflow ハブクラスターに
policy-integrity-shieldという名前の Red Hat Advanced Cluster Management ポリシーを作成します。-
policy-collectionリポジトリーからpolicy-integrity-shieldポリシーを取得します。リポジトリーをフォークしてください。 -
remediationActionパラメーターの値をinformからenforceに更新して、Red Hat Advanced Cluster Management マネージドクラスターに整合性シールドをデプロイするように namespace を設定します。 -
signerConfigセクションを更新して、署名および検証キーのメールを設定します。 -
整合性シールドをデプロイする Red Hat Advanced Cluster Management マネージドクラスターを決定する
PlacementRuleを設定します。 以下のコマンドを実行して、
policy-integrity-shield.yamlを署名します。curl -s https://raw.githubusercontent.com/stolostron/integrity-shield/master/scripts/gpg-annotation-sign.sh | bash -s \ signer@enterprise.com \ policy-integrity-shield.yamlcurl -s https://raw.githubusercontent.com/stolostron/integrity-shield/master/scripts/gpg-annotation-sign.sh | bash -s \ signer@enterprise.com \ policy-integrity-shield.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow 注記: ポリシーを変更し、他のクラスターに適用する場合は、常に新規署名を作成する必要があります。そうでない場合は、変更はブロックされ、適用されません。
-
サンプルについては、policy-integrity-shield ポリシーを参照してください。