ssl_external_kms_info 
==========================================

ssl_external_kms_info 配置项用于记录 OceanBase 数据库 SSL 功能运行依赖的一些信息，通过 json 字符串方式记录不同 SSL 使用方式下依赖的相关配置，json 中至少包含类型 ssl_mode 字段。


|        属性        |  描述  |
|------------------|------|
| 参数类型             | 字符串  |
| 默认值              | 空字符串 |
| 取值范围             | 无    |
| 是否重启 OBServer 生效 | 否    |



使用说明：

* 该配置项的默认值为空字符串。当 SSL 开关打开后，SSL 使用密钥将取值默认路径下的默认文件。

  

* 该配置项取值必须为有效 json，否则配置项设置会检查失败。

  

* 该配置项当前仅 ssl_mode 的取值有两种：file 和 bkmi。

  * 指定为 file 时， json 字符串中不需要其他内容。

    
  
  * 指定为 bkmi 时，运行时向 bkmi 获取 SSL 文件，本地不持久化存储。同时，json 字符串还需要提供完整的应用名、bkmi url、bkmi 根证书、身份秘钥、身份秘钥口令、SSL 私钥名称、SSL 私钥版本号、SSL 证书名称等。并且这些信息确实有效可用，即能通过这些从 bkmi 中获取私钥和证书，否则会报响应错误码。

    
  

  




为了支持外部其他各自的证书颁发体系，ssl_external_kms_info 还可以定制扩展为其他内容 json 串。

示例如下：

```sql
obclient> ALTER SYSTEM SET external_ssl_info = '
{
"ssl_mode":"file"
}';

obclient> ALTER SYSTEM SET external_ssl_info = '
{
"ssl_mode":"bkmi",
"kms_host":"http://bkmi.test.alipay.net/bkmi/api", 
"root_cert": 
"-----BEGIN CERTIFICATE-----
MIIDqTCCApGgAwIBAgIHBXbH+VUEQTANBgkqhkiG9w0BAQsFADBaMSwwKgYDVQQD
DCNBbnQgRmluYW5hY2lhbCBJbnRyYW5ldCBDQSBSb290IFJTQTEXMBUGA1UECgwO
QW50IEZpbmFuYWNpYWwxETAPBgNVBAsMCEludHJhbmV0MB4XDTE4MDkyNjE1MzUz
N1oXDTQ4MDkyNjE1MzUzN1owWjEsMCoGA1UEAwwjQW50IEZpbmFuYWNpYWwgSW50
cmFuZXQgQ0EgUm9vdCBSU0ExFzAVBgNVBAoMD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snsUig5UMNIW/g7Q9hnVFzUjOKRwLff+sGKhXwmNHKpJVGaWNaESJ0YAAe
ESMMOrEW5kiqRqIbZx52NVwb85rb6ozkm8vR4ApLNNqQ/ylAd4H3zA3bByXn3uTx
7tfksErzsD8seL3yvQV5hkbB8PkQIXCTyL+zbp4+bNk8v3zj9/7BRqpQl0eMJ4oS
0vjkYgzkhBsQY3tvRH3PkodUy1yhc+1ZOjOcmX4lAMW1+vP5XsESM+GESDp3Czp6
DlfiHbAlGBouWisY63hQtxVQtOboLzWmXwBGv2ENCf5NdW8tT2rWdxVcWOCW/1YE
dZ3/Q43GK0rqQw/j6MN4xOY7JuiBftZiBkLv57UIxUH1owIMR501QLnhq7Olgz+V
Edli5gWpO6OFNGYFhHc8B4FmTq+UUX4bdya/ajbVL/JWH6fjBJsvculQaJGV+Po6
0Ythfdurd/V0H/s9IkA3XGGckN+XacKpsgr+25kAG5SrdnnZkTVeg1+O/VHiupQw
OkKlD717/MrLYCZvy2D30oCTDF33VUOxSusc9zeJP29ye+WuNG3gX9CVaYbx1I2d
-----END RSA PRIVATE KEY-----",
"PRIVATE_KEY_PHRASE":"123456",
"SCENE":"ANT",
"CALLER":"ob_ssl_crypt",
"CERT_NAME":"ob_yanhua_test",
"PRIVATE_KEY_NAME":"ob_yanhua_test-app-id-authn-RSA-2048-private",
"KEY_VERSION":"1"
}';
```


