StyleBook を使用して証明書ストアから SSL 証明書を管理する
パラメータ
certkey をサポートしています。このパラメータタイプを使用して、NetScaler Console 証明書ストアから SSL 証明書を再利用します。
parameters:
-
name: certificate
label: Certificate
description: "Certificate to be bound to this virtual load balanced application"
type: certkey
required: true
certkey パラメータについて次のプロパティを参照できます。
-
certkeyname– インスタンスで構成する SSL 証明書キーの名前。 -
cert_filename– SSL 証明書のファイル名。 -
password– 必要に応じて、SSL 証明書にアクセスするために必要なパスワード。 -
key_filename– SSL 証明書キーのファイル名。 -
keyfile_contents– SSL 証明書のファイルの内容。 -
subject– SSL 証明書に記載されているサブジェクト。 -
issuer– SSL 証明書を発行した機関を指します。 -
certchain_certkeyname– サーバー証明書は複数の階層的な認証局 (CA) によって署名されることがあり、これは証明書がチェーンを形成することを意味します。証明書ストアに証明書チェーンがある場合、このプロパティを使用します。これにより、証明書を参照して結合できます。構成パックを作成すると、証明書チェーンがリストとして表示されます。
コンポーネント
type: certkey パラメーターがある場合、StyleBook ユーザーは NetScaler Console 証明書ストアからこのパラメーターの証明書を提供できます。このワークフローでは、NetScaler Console 証明書ストアから証明書を表示および選択するだけでなく、ユーザーは次のこともできます。
-
新しい証明書をアップロードします。
-
既存の証明書を更新します。たとえば、期限切れの証明書などです。
-
証明書を削除します。
-
NetScaler Console SSL ダッシュボードを使用して、NetScaler Console 証明書ストア内の証明書を管理することもできます。
-
NetScaler Console 証明書ストアで SSL 証明書が更新されると、その SSL 証明書に関連付けられている構成パックは自動的に更新されます。
StyleBook を構築する
name: lb-with-cert-from-certstore
namespace: com.example.stylebooks
version: "1.0"
display-name: Application using a CertStore certificate
description: This StyleBook defines a simple SSL Vserver.
schema-version: "1.0"
import-stylebooks:
-
namespace: netscaler.nitro.config
version: "13.0"
prefix: ns
parameters:
-
name: name
type: string
label: Application Name
description: Give a name to the application configuration.
required: true
-
name: ip
type: ipaddress
label: Application Virtual IP (VIP)
description: The Application VIP that clients access
required: true
-
name: certificate
label: Application Certificate
description: Certificate chain and key to be bound to this application
type: certkey
required: true
components:
-
name: pem-cert-files-comp
type: ns::systemfile
description: This component uploads the PEM certificate file onto the NetScaler
condition: $parameters.certificate
properties:
filename: $parameters.certificate.cert_filename
filelocation: /nsconfig/ssl
filecontent: base64($parameters.certificate.certfile_contents)
fileencoding: BASE64
-
name: pem-KEY-files-comp
type: ns::systemfile
description: This component uploads the PEM key file onto the NetScaler.
condition: $parameters.certificate
properties:
filename: $parameters.certificate.key_filename
filelocation: /nsconfig/ssl
filecontent: base64($parameters.certificate.keyfile_contents)
fileencoding: BASE64
-
name: cert-files-comp
type: ns::sslcertkey
description: This component creates the certkey on the NetScaler using the uploaded files.
condition: $parameters.certificate
properties:
certkey: $parameters.certificate.certkeyname
cert: $parameters.certificate.cert_filename
key: $parameters.certificate.key_filename
-
name: lbvserver-comp
type: ns::lbvserver
description: This component creates the lbvserver of the application.
properties:
name: $parameters.name + "-lbvserver"
servicetype: SSL
ipv46: $parameters.ip
port: 443
lbmethod: ROUNDROBIN
components:
-
name: sslvserver-comp
type: ns::sslvserver
description: This component configures SSL settings on the vserver
properties:
vservername: $parent.properties.name
ssl3?: ENABLED
tls1?: ENABLED
tls11?: ENABLED
-
name: cert-bindings-adv-comp
type: ns::sslvserver_sslcertkey_binding
description: This component binds the certkey to the vserver
condition: $parameters.certificate
properties:
vservername: $parent.properties.name
certkeyname: $parameters.certificate.certkeyname