Go to main content

Oracle® ZFS Storage Appliance RESTful API ガイド、Release OS8.8.x

印刷ビューの終了

更新: 2021 年 8 月
 
 

鍵または証明書のアップロード

署名付き証明書を CA から受信したら、次のコマンドを使用して証明書をアップロードします。次のいずれかの値を Content-Type ヘッダーに指定します:

application/pkix-cert
application/x-x509-ca-cert
application/x-x509-user-cert
application/x-pem-file

リクエストの例:

POST /api/setting/v2/certificates/system HTTP/1.1
Host: alice.example.com:215
Authorization: Basic Tm8gcGVla2luZyE=
Content-Type: application/x-pem-file

-----BEGIN CERTIFICATE-----
MIIDdTCCAl2gAwIBAgICH5cwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCdXMx
...
cgfvd1NUEvSdlb2+cjRBd9uSdtLfv7H5BKTKEdOXikv9+f150MytMEo4ABt0pEyp
/KwtRsdIxmzAjmNqfQPR6eAHVfQ/CGwh6Q==
-----END CERTIFICATE-----

結果例:

HTTP/1.1 200 OK
Date: Tue, 11 May 2021 18:04:22 GMT
Content-Type: application/json; charset=utf-8
X-Zfssa-Api-Version: 2.0
X-Zfssa-Setting-Api: 2.0
Location: /api/setting/v2/certificates/system/system-cert3-uuid
Content-Length: 987

{
    "certificate": {
        "uuid": "system-cert3-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-cert3-uuid"
    }
}