Skip to content

10.1.2.4 Host Certificate

A host certificate should be requested by someone with administrative responsibility for the host; the applicant's account email is written into the SAN and stored as owner/requester metadata. The procedure is identical to a user certificate (see 10.1.2.1) except for the Edit Subject page, where you enter the host names. A host certificate needs the primary DNS name, all additional DNS names, the host purpose and the responsible person; do not enter IP addresses, URLs, ports, https:// prefixes, wildcards like *.ihep.ac.cn, or a comma-separated list of names into a single hostname field:

Host certificate: enter Hostname and Additional Hostnames

  • Hostname: must be the primary FQDN of the host, e.g. host01.ihep.ac.cn; do not enter the short name host01.
  • Additional hostname: other DNS names may be added; each field takes one complete FQDN only, no wildcards; add multiple names one by one with the page control.
  • DNS names are issued in lowercase, so confirm DNS resolution and site responsibility before submitting.
  • The email SAN always comes from the logged-in user's account email; do not enter someone else's email to bypass review.
  • The Comment should describe the service purpose, the site and the ticket, e.g. DIRAC Storage Element, IHEP CC, ticket #12345.

The remaining steps follow the user certificate procedure: review and submit the request, handle any duplicate-request prompt, complete account email verification, then set the private key password and wait for RA review. Email verification is mandatory for WebUI host certificate applications; the code is sent to the current applicant's account email address.

Once issued, open the certificate in My Certificates, click Download private key/keystore (PKCS12/PKCS8/Java) in the Action area and choose PKCS12; see 10.1.3 Download and Use Certificates. The WebUI always generates an RSA 4096 private key encrypted with AES-256; there is no key type or length choice, and no CSR upload.

Install the WebUI-issued host certificate on the target host

  1. Transfer the downloaded .p12 to the target host through a controlled channel; avoid email, public cloud drives or shared temporary directories.
  2. Create the key directory and restrict permissions:

    sudo install -d -m 0750 /etc/grid-security
    sudo install -m 0600 -o root -g root /path/to/host01.p12 /root/host01.p12
    
  3. Export the end-entity certificate and private key (the Export Password, i.e. the export password set when downloading the .p12, will be requested):

    sudo openssl pkcs12 -in /root/host01.p12 -clcerts -nokeys \
      -out /etc/grid-security/hostcert.pem
    sudo openssl pkcs12 -in /root/host01.p12 -nocerts -nodes \
      -out /etc/grid-security/hostkey.pem
    sudo chmod 0444 /etc/grid-security/hostcert.pem
    sudo chmod 0400 /etc/grid-security/hostkey.pem
    
  4. Verify that the certificate and key match, and check the DNS/email SAN:

    test "$(sudo openssl x509 -in /etc/grid-security/hostcert.pem -noout -modulus | openssl sha256)" = \
         "$(sudo openssl rsa -in /etc/grid-security/hostkey.pem -noout -modulus | openssl sha256)" \
      && echo 'certificate and key match'
    sudo openssl x509 -in /etc/grid-security/hostcert.pem -noout \
      -subject -issuer -dates -ext subjectAltName -ext extendedKeyUsage
    
  5. If the service runs under a dedicated account (e.g. dirac), set a controlled owner, group and permissions only when the service truly needs to read the key; the private key must never be world-readable.

  6. Verify the service configuration, reload the service, then delete /root/host01.p12. Keep a securely protected offline backup; do not keep multiple plaintext keys on the host.

Do not mix

This procedure applies only to WebUI-issued Host certificates. The EST auto-renewal in 10.1.5 and the IHEP-2013 Host migration still generate a new private key and CSR on the target host; the encrypted private key exported from a WebUI .p12 must not be fed to the EST scripts.

FAQ

See FAQ.

🤖 AI 助手
💬 快速提问 ×

有问题?输入后跳转到对话页继续交流