第 2 步:创建本地签名配置文件

Edge for Private Cloud v4.19.01

为节点创建本地私钥后,请创建其签名配置文件。每个节点必须具有自己的签名配置文件版本。

以下示例展示了签名配置文件的语法:

[req]
distinguished_name = req_distinguished_name
attributes = req_attributes
prompt = no

[ req_distinguished_name ]
C=COUNTRY_NAME
ST=STATE_NAME
L=CITY_NAME
O=ORG_OR_BUSINESS_NAME
OU=ORG_UNIT
CN=ORG_DEPARTMENT

[ req_attributes ]

[ cert_ext ]
subjectKeyIdentifier=hash
keyUsage=critical,keyEncipherment,dataEncipherment
extendedKeyUsage=serverAuth,clientAuth
subjectAltName=@alt_names

[alt_names]
DNS.1=localhost
DNS.2=ipv4-localhost
DNS.3=ipv6-localhost
DNS.4=cli.dc-1.consul
DNS.5=client.dc-1.consul
DNS.6=server.dc-1.consul
DNS.7=FQDN
# ADDITIONAL definitions, as needed:
DNS.8=ALT_FQDN_1
DNS.9=ALT_FQDN_2

# REQUIRED (at least 1 IP address plus localhost definitions)
IP.1 = IP_ADDRESS
IP.2=0.0.0.0
IP.3=127.0.0.1
IP.4=::1
# ADDITIONAL definitions, as needed:
IP.5=ALT_IP_ADDRESS_1
IP.6=ALT_IP_ADDRESS_2
...

下表介绍了签名配置文件中的属性:

媒体资源 是否必需? 说明
C 运行服务器的国家/地区的双字母代码。
ST 运行服务器所在的州/省级行政区。
L 运行服务器所在的城市。
O 运行服务器的企业的名称。
OU 商家中的下属地区。
CN 商家中的下属地区。
DNS.[1...] Consul 使用的 DNS 服务器。您必须设置 DNS.1DNS.7

针对数据中心使用 dc-1,如以下示例所示:

...
[alt_names]
DNS.1=localhost
DNS.2=ipv4-localhost
DNS.3=ipv6-localhost
DNS.4=cli.dc-1.consul
DNS.5=client.dc-1.consul
DNS.6=server.dc-1.consul
DNS.7=FQDN
...

FQDN 是将使用此证书的网络服务器的完全限定域名。例如 nickdanger.la.corp.example.com

如需在 Linux 服务器上获取 FQDN,请使用以下命令:

hostname --fqdn
IP.[1...]

IP.1 设置为集群的每个成员(包括跨数据中心流量)观察此节点的有效 IPv4 地址

此外,Apigee 要求您添加以下 localhost 定义:

# REQUIRED (at least 1 IP address plus localhost definitions)
IP.1=216.3.128.12
IP.2=0.0.0.0
IP.3=127.0.0.1
IP.4=::1

如果节点使用多个 IP 地址与其他节点通信,请指定其他 IP 地址,每个 IP 地址各占一行;例如:

# REQUIRED (at least 1 IP address plus localhost definitions)
IP.1=216.3.128.12
IP.2=0.0.0.0
IP.3=127.0.0.1
IP.4=::1
# ADDITIONAL definitions, as needed:
IP.5=192.0.2.0
IP.6=192.0.2.1

后续步骤

1 2 下一步:(3) 构建请求 4 5