리포지토리 메타데이터

리포지토리 메타데이터에 서명하려면 사용자 정의 GPG 키가 필요합니다.

To access a shell inside the Server container run mgrctl term on the container host.

Procedure: Generating a custom GPG key
  1. As the root user, use the gpg command to generate a new key:

    mgrctl exec -it -- gpg --full-generate-key
  2. At the prompts, select RSA as the key type, with a size of 2048 bits, and select an appropriate expiry date for your key. Check the details for your new key, and type y to confirm.

  3. 프롬프트에서 키와 연결할 이름 및 이메일 주소를 입력합니다. You can also add a comment to help you identify the key, if desired. When you are happy with the user identity, type O to confirm.

  4. 프롬프트에서 키를 보호하기 위한 비밀번호를 입력합니다.

  5. 키는 자동으로 키링에 추가되어야 합니다. 키링에 키를 나열하여 확인합니다.

    mgrctl exec -- gpg --list-keys
  6. Add the password for your keyring to the /etc/rhn/signing.conf configuration file, by opening the file in your text editor and adding this line:

    GPGPASS="password"

GPG 키 갱신에 대한 자세한 내용은 문제 해결 동기화에서 확인할 수 있습니다.

You can manage metadata signing on the command line using the mgr-sign-metadata-ctl command.

Procedure: Enabling metadata signing
  1. 사용할 키의 짧은 식별자를 알아야 합니다. 사용할 수 있는 짧은 형식의 공용 키를 나열할 수 있습니다.

    mgrctl exec -- gpg --keyid-format short --list-keys
    ...
    pub   rsa4096/3E7BFE0A 2019-04-02 [SC] [expires: 2029-04-01]
          A43F9EC645ED838ED3014B035CFA51BF3E7BFE0A
    uid         [ultimate] SUSE Manager
    sub   rsa4096/118DE7FF 2019-04-02 [E] [expires: 2029-04-01]
  2. Enable metadata signing with the mgr-sign-metadata-ctl command:

    mgrctl exec -- mgr-sign-metadata-ctl enable 3E7BFE0A
    OK. Found key 3E7BFE0A in keyring.
    DONE. Set key 3E7BFE0A in /etc/rhn/signing.conf.
    DONE. Enabled metadata signing in /etc/rhn/rhn.conf.
    DONE. Exported key 3E7BFE0A to /srv/susemanager/salt/gpg/mgr-keyring.gpg.
    DONE. Exported key 3E7BFE0A to /var/spacewalk/gpg/<KEY_NAME>.key.
    NOTE. For the changes to become effective run:
       mgr-sign-metadata-ctl regen-metadata
  3. 다음 명령으로 구성이 올바른지 확인합니다.

    mgrctl exec -- mgr-sign-metadata-ctl check-config
  4. Restart the container for the configuration changes to be detected.

    mgradm restart
  5. Schedule metadata regeneration to replace all metadata with new signed versions.

    mgrctl exec -- mgr-sign-metadata-ctl regen-metadata

You can also use the mgr-sign-metadata-ctl command to perform other tasks. Use mgr-sign-metadata-ctl --help to see the complete list.

리포지토리 메타데이터 서명은 전역 옵션입니다. 활성화되면 서버의 모든 소프트웨어 채널에서 활성화됩니다. 이는 서버에 연결된 모든 클라이언트가 패키지를 설치하거나 업데이트하려면 새 GPG 키를 신뢰해야 함을 의미합니다.

Procedure: Importing GPG keys on clients
  1. 클라이언트에 GPG 키를 배포하면 Salt 상태 작업을 수행할 수 있습니다.

  2. SUSE Multi-Linux Manager Web UI를 사용하여 highstate를 적용합니다.

GPG 키 문제 해결에 대한 자세한 내용은 문제 해결 동기화에서 확인할 수 있습니다.