chore(config): update enum for config item

The tcp listener's peer_cert_as_clientid and peer_cert_as_username can only be set to cn
This commit is contained in:
zhanghongtong 2021-03-17 14:20:34 +08:00 committed by Rory Z
parent 237603cee6
commit 2232bca150
2 changed files with 8 additions and 6 deletions

View File

@ -1087,16 +1087,16 @@ listener.tcp.external.access.1 = allow all
## Enable the option for X.509 certificate based authentication. ## Enable the option for X.509 certificate based authentication.
## EMQX will use the common name of certificate as MQTT username. ## EMQX will use the common name of certificate as MQTT username.
## 'pem' encodes CRT in base64, and md5 is the md5 hash of CRT. ## The proxy-protocol protocol can get the certificate CN through tcp
## ##
## Value: cn | dn | crt | pem | md5 ## Value: cn
## listener.tcp.external.peer_cert_as_username = cn ## listener.tcp.external.peer_cert_as_username = cn
## Enable the option for X.509 certificate based authentication. ## Enable the option for X.509 certificate based authentication.
## EMQX will use the common name of certificate as MQTT clientid. ## EMQX will use the common name of certificate as MQTT clientid.
## 'pem' encodes CRT in base64, and md5 is the md5 hash of CRT. ## The proxy-protocol protocol can get the certificate CN through tcp
## ##
## Value: cn | dn | crt | pem | md5 ## Value: cn
## listener.tcp.external.peer_cert_as_clientid = cn ## listener.tcp.external.peer_cert_as_clientid = cn
## The TCP backlog defines the maximum length that the queue of pending ## The TCP backlog defines the maximum length that the queue of pending

View File

@ -1211,12 +1211,14 @@ end}.
{datatype, {duration, ms}} {datatype, {duration, ms}}
]}. ]}.
%% The proxy-protocol protocol can get the certificate CN through tcp
{mapping, "listener.tcp.$name.peer_cert_as_username", "emqx.listeners", [ {mapping, "listener.tcp.$name.peer_cert_as_username", "emqx.listeners", [
{datatype, {enum, [cn, dn, crt, pem, md5]}} {datatype, {enum, [cn]}}
]}. ]}.
%% The proxy-protocol protocol can get the certificate CN through tcp
{mapping, "listener.tcp.$name.peer_cert_as_clientid", "emqx.listeners", [ {mapping, "listener.tcp.$name.peer_cert_as_clientid", "emqx.listeners", [
{datatype, {enum, [cn, dn, crt, pem, md5]}} {datatype, {enum, [cn]}}
]}. ]}.
{mapping, "listener.tcp.$name.backlog", "emqx.listeners", [ {mapping, "listener.tcp.$name.backlog", "emqx.listeners", [