SECURITY_CONFIG_CHECK

返回各种安全相关参数的状态。使用此函数可验证您的 TLS 配置的完整性。

这是元函数。您必须在顶级 SELECT 语句中调用元函数。

行为类型

易变

语法

SECURITY_CONFIG_CHECK( 'db-component' )

参数

db-component
要检查的组件。目前,NETWORK 是唯一受支持的组件。

NETWORK:返回 spread 加密、节点间 TLS 和客户端-服务器 TLS 的状态和参数。

示例

在此示例中,SECURITY_CONFIG_CHECK 显示已禁用 spread 加密和数据通道 TLS,因为 EncryptSpreadComm 已禁用且未配置 data_channel TLS CONFIGURATION。

同样,客户端-服务器 TLS 也被禁用,因为 TLS CONFIGURATION“服务器”具有服务器证书,但其 TLSMODE 被禁用。将 TLSMODE 设置为“Enable”可启用服务器模式客户端-服务器 TLS。有关详细信息,请参阅TLS 协议

=> SELECT SECURITY_CONFIG_CHECK('NETWORK');
                                            SECURITY_CONFIG_CHECK
----------------------------------------------------------------------------------------------------------------------
Spread security details:
* EncryptSpreadComm = []
Spread encryption is disabled
It is NOT safe to set/change other security config parameters while spread is not encrypted!
Please set EncryptSpreadComm to enable spread encryption first

Data Channel security details:
 TLS Configuration 'data_channel' TLSMODE is DISABLE
TLS on the data channel is disabled
Please set EncryptSpreadComm and configure TLS Configuration 'data_channel' to enable TLS on the data channel

Client-Server network security details:
* TLS Configuration 'server' TLSMODE is DISABLE
* TLS Configuration 'server' has a certificate set
Client-Server TLS is disabled
To enable Client-Server TLS set a certificate on TLS Configuration 'server' and/or set the tlsmode to 'ENABLE' or higher

(1 row)

另请参阅