次のリクエストは、ホスト上のすべてのシステム証明書のプロパティーを一覧表示し、default プロパティーの値を一覧表示します。
リクエストの例:
GET /api/setting/v2/certificates/system HTTP/1.1 Host: alice.example.com:215 Authorization: Basic Tm8gcGVla2luZyE= Accept: application/json
結果例:
次の例の最初の証明書は、(ドメインまたは IP アドレスに基づいて) 自動生成された従来の証明書です。2 番目の証明書は、アプライアンスシリアル番号 (ASN) UUID に基づいて自動生成された証明書です。
この結果の最後にある default プロパティーの値は、システムのデフォルト証明書が自動的に選択されることを示しています。
HTTP/1.1 200 OK Date: Sat, 08 May 2021 00:37:21 GMT Content-Type: application/json; charset=utf-8 X-Zfssa-Api-Version: 2.0 X-Zfssa-Setting-Api: 2.0 Content-Length: 1975 { "certificates": [ { "uuid": "system-cert1-uuid", "type": "cert", "data": { "subject": [ { "countryName": "US" }, { "stateOrProvinceName": "CA" }, { "localityName": "Exampleton" }, { "organizationName": "Example Corp, Inc" }, { "commonName": "alice.example.com" } ], "issuer": [ { "countryName": "US" }, { "stateOrProvinceName": "AK" }, { "localityName": "Trustville" }, { "organizationName": "Totally Trustworthy Certificates, Inc" }, { "commonName": "Most Trusted Certificate" } ], "serialNumber": "64", "validity": { "notBefore": "20210520T21:08:27", "notAfter": "20220520T21:08:27" }, "extensions": { "basicConstraints": { "value": [ { "CA": false } ] }, "subjectKeyIdentifier": { "value": "subjectKeyIdentifier" }, "authorityKeyIdentifier": { "value": [ { "keyid": "authorityKeyIdentifier" } ] }, "subjectAltName": { "value": [ { "DNS": "alice.example.com" }, { "IP": "alice.example.com-ipaddr" } ] } } }, "sha1fingerprint": "sha1fingerprint", "href": "/api/setting/v2/certificates/system/system-cert1-uuid" }, { "uuid": "system-cert2-uuid", "type": "cert", "asn": "8bf7f9bc-8b3a-4064-e59f-bf09e3dba275", "data": { "subject": [ { "commonName": "8bf7f9bc-8b3a-4064-e59f-bf09e3dba275" } ], "issuer": [ { "commonName": "8bf7f9bc-8b3a-4064-e59f-bf09e3dba275" } ], "serialNumber": "59:8A:73:7B:00:00:00:07", "validity": { "notBefore": "20060215T18:00:00", "notAfter": "20380119T03:14:07" }, "extensions": { "nsComment": { "value": "Automatically generated" }, "subjectAltName": { "critical": true, "value": [ { "DirName": "8bf7f9bc-8b3a-4064-e59f-bf09e3dba275" } ] } } }, "sha1fingerprint": "sha1fingerprint", "href": "/api/setting/v2/certificates/system/system-cert2-uuid" } ], "default": "auto" }
次のリクエストは、指定された信頼できる証明書 trusted-cert1-uuid のプロパティーを一覧表示します。
リクエストの例:
GET /api/setting/v2/certificates/trusted/trusted-cert1-uuid HTTP/1.1 Host: alice.example.com:215 Authorization: Basic Tm8gcGVla2luZyE= Accept: application/json
結果例:
HTTP/1.1 200 OK Date: Sat, 08 May 2021 00:37:57 GMT Content-Length: 984 Content-Type: application/json; charset=utf-8 X-Zfssa-Setting-Api: 2.0 X-Zfssa-Api-Version: 2.0 { "certificate": { "uuid": "trusted-cert1-uuid", "type": "cert_ca", "data": { "subject": [ { "countryName": "US" }, { "stateOrProvinceName": "AK" }, { "localityName": "Trustville" }, { "organizationName": "Totally Trustworthy Certificates, Inc" }, { "commonName": "Most Trusted Certificate" } ], "issuer": [ { "countryName": "US" }, { "stateOrProvinceName": "AK" }, { "localityName": "Trustville" }, { "organizationName": "Totally Trustworthy Certificates, Inc" }, { "commonName": "Most Trusted Certificate" } ], "serialNumber": "83:F7:79:02:5F:44:4D:60", "validity": { "notBefore": "20210316T17:28:37", "notAfter": "20210415T17:28:37" }, "extensions": { "subjectKeyIdentifier": { "value": "subjectKeyIdentifier" }, "authorityKeyIdentifier": { "value": [ { "keyid": "authorityKeyIdentifier" } ] }, "basicConstraints": { "value": [ { "CA": true } ] } } }, "sha1fingerprint": "sha1fingerprint", "services": [ "ldap", "cloud" ], "href": "/api/setting/v2/certificates/trusted/trusted-cert1-uuid" } }