Skip to main content

証明書テンプレート

証明書テンプレートの便利な属性

以下の表では、証明書テンプレートで定義されている便利な属性の概要を示しています。

1. 証明書テンプレートの便利な属性

属性

説明

鍵タイプと署名アルゴリズム

RSA や ECC など、許可される鍵タイプや署名アルゴリズムを署名します。

サブジェクト識別名(DN)フィールド

コモンネーム(CN)、組織上のユニット部(OU)、国名(C)など、サブジェクト DN の必須フィールドを定義します。

有効期限の範囲

証明書の最短有効期限と最長有効期限を設定します。

証明書エクステンション

鍵用途または拡張鍵用途(EKU)など、必須またはオプションのエクステンションを定義します。


証明書テンプレートと証明書プロファイル

証明書テンプレートは、証明書のコア構造と制約を定義するのに対し、証明書プロファイルは、特定のデプロイメントまたはデバイスグループの要件に基づいて、これらの設定をさらにカスタマイズします。テンプレートは基本的なパラメータを設定し、プロファイルは、サブジェクト DN 値やエクステンションなど、個々の証明書リクエストにこれらの設定を適合させます。

JSON 証明書テンプレートの例

次の例では、証明書テンプレートの JSON 構造を示しています。

{
  "key_gen": {
    "enabled": true,
    "key_type": {
      "allowed_types": [
        "ecdsa"
      ],
      "default_key_type": "ecdsa"
    },
    "ecdsa_curve": {
      "allowed_curves": [
        "P-256",
        "P-384",
        "P-521"
      ],
      "default_curve": "P-256"
    }
  },
  "issue_types": [
    "client_authentication"
  ],
  "signature_algorithm": {
    "allowed_algorithms": [
      "sha256WithECDSA",
      "sha384WithECDSA",
      "sha512WithECDSA",
      "match_issuer"
    ],
    "default_algorithm": "match_issuer"
  },
  "subject": {
    "attributes": [
      {
        "type": "common_name",
        "include": "optional",
        "encoding": "auto",
        "allowed_source": [
          "csr",
          "fixed_value",
          "user_supplied"
        ]
      }
    ]
  },
  "extensions": {
    "key_usage": {
      "critical": true,
      "required_usages": {
        "rsa": [
          "digital_signature",
          "key_encipherment"
        ],
        "ecdsa": [
          "digital_signature"
        ]
      },
      "optional_usages": {
        "rsa": [
          "data_encipherment"
        ],
        "ecdsa": [
          "key_agreement"
        ]
      }
    },
    "extended_key_usage": {
      "critical": true,
      "include": "optional",
      "required_usages": [
        {
          "oid": "client_authentication",
          "name": "Client Authentication"
        }
      ]
    }
  },
  "serial_number_size": 20,
  "validity": {
    "min_duration": {
      "value": 1,
      "unit": "DAYS"
    },
    "max_duration": {
      "value": 10,
      "unit": "YEARS"
    },
    "default_duration": {
      "value": 10,
      "unit": "YEARS"
    }
  }
}