GPGキー
クライアントではGPGキーを使用して、ソフトウェアパッケージをインストールする前にパッケージ認証の確認が行われます。 信頼されているソフトウェアのみクライアントにインストールできます。
ほとんどの場合、クライアントにソフトウェアをインストールできるようにGPG設定を調整する必要はありません。
RPMパッケージに直接署名することはできますが、Debianベースのシステムではメタデータにのみ署名し、チェックサムのチェーンを使用してパッケージを保護します。 RPMベースのほとんどのシステムでは、署名されたパッケージに加え、署名されたメタデータも使用します。
オペレーティング システムは、独自のGPGキーを直接信頼するか、少なくとも最小限のシステムでインストールされて出荷されます。 ただし、別のGPGキーで署名されたサードパーティのパッケージは手動で処理する必要があります。 クライアントは、GPGキーを信頼していなくても正常にブートストラップできます。 ただし、キーが信頼されるまで、新しいクライアントツールパッケージをインストールしたり、更新したりできません。
クライアントは、ソフトウェアチャンネルに入力されたGPGキーの情報を使用して信頼済みのキーを管理するようになります。GPGキーの情報が含まれるソフトウェアチャンネルをクライアントに割り当てると、チャンネルを更新したとき、またはこのチャンネルから最初のパッケージをインストールしたときに、そのキーが信頼されます。
ソフトウェアチャンネルページのGPGキーのURLには、「空白」で区切られた複数のキーのURLを含めることができます。 ファイルURLの場合は、ソフトウェアチャンネルを使用する前に、GPGキーファイルをクライアントに配備する必要があります。
The GPG keys for the Client Tools Channels of Red Hat based clients are deployed on the client into /etc/pki/rpm-gpg/ and can be referenced with file URLs.
SUSE Liberty LinuxクライアントのGPGキーの場合も同様です。
ソフトウェアチャンネルがクライアントに割り当てられている場合にのみ、システムによってインポートされて信頼されます。
|
Debianベースのシステムはメタデータのみに署名するため、単一チャンネルに追加のキーを指定する必要はありません。 リポジトリメタデータの「独自のGPGキーを使用する」で説明されているように、ユーザが独自のGPGキーを設定してメタデータに署名すると、そのキーの配備と信頼が自動的に実行されます。 |
1. ユーザ定義のGPGキー
ユーザは、クライアントに配備するカスタムのGPGキーを定義できます。
いくつかのpillarデータを提供し、SaltファイルシステムにGPGキーファイルを提供することで、自動的にクライアントに配備されます。
These keys are deployed into /etc/pki/rpm-gpg/ on RPM based operating systems and to /usr/share/keyrings/ on Debian systems:
Define the pillar key [literal`custom_gpgkeys` for the client you want to deploy the key to and list the names of the key file.
cat /srv/pillar/mypillar.sls custom_gpgkeys: - my_first_gpg.key - my_second_gpgkey.gpg
Additionally in the Salt filesystem create a directory named gpg and store there the GPG key files with the name specified in the custom_gpgkeys pillar data.
ls -la /srv/salt/gpg/ /srv/salt/gpg/my_first_gpg.key /srv/salt/gpg/my_second_gpgkey.gpg
The keys are deployed to the client at /etc/pki/rpm-gpg/my_first_gpg.key and /etc/pki/rpm-gpg/my_second_gpgkey.gpg.
The last step is to add the URL to the GPG key URL field of the software channel. Navigate to and select the channel you want to modify. Add to GPG key URL the value file:///etc/pki/rpm-gpg/my_first_gpg.key.
2. ブートストラップスクリプトのGPGキー
-
On the SUSE Multi-Linux Manager Server, at the command prompt, check the contents of the
/srv/www/htdocs/pub/directory. This directory contains all available public keys. Take a note of the key that applies to the channel assigned to the client you are registering. -
Open the relevant bootstrap script, locate the
ORG_GPG_KEY=parameter and add the required key. For example:uyuni-gpg-pubkey-0d20833e.key
以前保存したキーを削除する必要はありません。
|
クライアントのセキュリティにとってGPGキーを信頼することは重要です。 必要かつ信頼できるキーを決定するのは管理者のタスクです。 GPGキーが信頼されていない場合、ソフトウェアチャンネルをクライアントに割り当てることはできません。 |