unseal

admin unseal 允许管理员在提供达到门限数量授权密钥分片(unseal key)的情况下,解封处于 Unauthorized 状态的 CA 服务,使 CA 达到可用状态,即 Authorized。一般来说,在集群部署的情况下,如果集群内有处于 Authorized 状态的节点,可设置配置项 caurl 指向 Authorized 节点,CA 启动后自动解封,无需使用此命令手工操作。

命令用法

以下是admin unseal命令的参数列表

命令参数

示例

下面以 Admin1, Admin2, Admin3 三名管理员(即 key-shares 为 3),其中任意两名管理员提供授权密钥分片可 unseal(即 key-threshold 为 2)为例,讲解如何使用admin unseal命令,假设选中的两名管理员是 Admin1 和 Admin3

1、Admin1 执行以下命令,启动解封任务,并根据提示输入 Unseal Key:

$ cacli admin unseal --init
Please input your unseal key(Input will be hidden, and type Enter to confirm input. The nonce of the current operation is '2ab3eb11-fe15-4eb3-997b-57bd8c6b2870'): <Admin1 input his/her unseal key and enter>

CA Unseal Operation Nonce: 2ab3eb11-fe15-4eb3-997b-57bd8c6b2870
Unseal Progress: 1/2
Unseal Result: unfinished

The nonce can only be sent to other admins.

输出说明如下:

2、Admin3 执行以下命令,其中nonce值请向 Admin1 索要,并根据提示输入 Unseal Key

$ cacli admin unseal --nonce=2ab3eb11-fe15-4eb3-997b-57bd8c6b2870 --input
Please input your unseal key(Input will be hidden, and type Enter to confirm input. The nonce of the current operation is '2ab3eb11-fe15-4eb3-997b-57bd8c6b2870'): <Admin3 input his/her unseal key and enter>

CA Unseal Operation Nonce: 2ab3eb11-fe15-4eb3-997b-57bd8c6b2870
Unseal Progress: 2/2
Unseal Result: true

The nonce can only be sent to other admins.

Unseal Resulttrue时,表明 Admin1,Admin3 均已完成 unseal 操作并成功解封了 CA,至此,代表 unseal 操作已经完成,即 CA 可向其他 TEE 应用提供自动授权服务。