2018-10-10 17:18:00 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
2018-10-12 21:31:06 +08:00
|
|
|
DEFAULT_USER="boot-admin"
|
|
|
|
DEFAULT_PASS="boot-pass"
|
|
|
|
|
|
|
|
# store the default template for fabric-ca-server-config.yaml
|
|
|
|
CA_SERVER_DEFAULT_CONFIG=""
|
|
|
|
read -r -d '' CA_SERVER_DEFAULT_CONFIG << EOF
|
|
|
|
version: 1.4.0
|
|
|
|
port: 7054
|
|
|
|
debug: false
|
|
|
|
crlsizelimit: 512000
|
|
|
|
|
|
|
|
tls:
|
|
|
|
enabled: false
|
|
|
|
certfile:
|
|
|
|
keyfile:
|
|
|
|
clientauth:
|
|
|
|
type: noclientcert
|
|
|
|
certfiles:
|
|
|
|
|
|
|
|
ca:
|
|
|
|
name:
|
|
|
|
keyfile:
|
|
|
|
certfile:
|
|
|
|
chainfile:
|
|
|
|
|
|
|
|
crl:
|
|
|
|
expiry: 24h
|
|
|
|
|
|
|
|
registry:
|
|
|
|
maxenrollments: -1
|
|
|
|
|
2019-02-28 11:21:41 +08:00
|
|
|
# Contains identity information which is used when LDAP is disabled
|
2018-10-12 21:31:06 +08:00
|
|
|
identities:
|
2019-02-28 11:21:41 +08:00
|
|
|
- name: admin
|
|
|
|
pass: adminpw
|
2018-10-12 21:31:06 +08:00
|
|
|
type: client
|
|
|
|
affiliation: ""
|
|
|
|
attrs:
|
|
|
|
hf.Registrar.Roles: "*"
|
|
|
|
hf.Registrar.DelegateRoles: "*"
|
|
|
|
hf.Revoker: true
|
|
|
|
hf.IntermediateCA: true
|
|
|
|
hf.GenCRL: true
|
|
|
|
hf.Registrar.Attributes: "*"
|
|
|
|
hf.AffiliationMgr: true
|
|
|
|
|
|
|
|
db:
|
|
|
|
type: sqlite3
|
|
|
|
datasource: fabric-ca-server.db
|
|
|
|
tls:
|
|
|
|
enabled: false
|
|
|
|
certfiles:
|
|
|
|
client:
|
|
|
|
certfile:
|
|
|
|
keyfile:
|
|
|
|
|
|
|
|
ldap:
|
|
|
|
enabled: false
|
|
|
|
url: ldap://<adminDN>:<adminPassword>@<host>:<port>/<base>
|
|
|
|
tls:
|
|
|
|
certfiles:
|
|
|
|
client:
|
|
|
|
certfile:
|
|
|
|
keyfile:
|
|
|
|
attribute:
|
|
|
|
names: ['uid','member']
|
|
|
|
converters:
|
|
|
|
- name:
|
|
|
|
value:
|
|
|
|
maps:
|
|
|
|
groups:
|
|
|
|
- name:
|
|
|
|
value:
|
|
|
|
|
|
|
|
affiliations:
|
|
|
|
org1:
|
|
|
|
- department1
|
|
|
|
- department2
|
|
|
|
org2:
|
|
|
|
- department1
|
|
|
|
|
|
|
|
signing:
|
|
|
|
default:
|
|
|
|
usage:
|
|
|
|
- digital signature
|
|
|
|
expiry: 87600h
|
|
|
|
profiles:
|
|
|
|
ca:
|
|
|
|
usage:
|
|
|
|
- cert sign
|
|
|
|
- crl sign
|
|
|
|
expiry: 43800h
|
|
|
|
caconstraint:
|
|
|
|
isca: true
|
|
|
|
maxpathlen: 0
|
|
|
|
tls:
|
|
|
|
usage:
|
|
|
|
- signing
|
|
|
|
- key encipherment
|
|
|
|
- server auth
|
|
|
|
- client auth
|
|
|
|
- key agreement
|
2019-02-28 11:21:41 +08:00
|
|
|
expiry: 8760h
|
2018-10-12 21:31:06 +08:00
|
|
|
|
|
|
|
csr:
|
|
|
|
cn: fabric-ca-server
|
|
|
|
keyrequest:
|
|
|
|
algo: ecdsa
|
|
|
|
size: 256
|
|
|
|
names:
|
|
|
|
- C: US
|
|
|
|
ST: "North Carolina"
|
|
|
|
L:
|
|
|
|
O: Hyperledger
|
|
|
|
OU: Fabric
|
|
|
|
hosts:
|
2019-02-28 11:21:41 +08:00
|
|
|
- 4462096fc0ba
|
2018-10-12 21:31:06 +08:00
|
|
|
- localhost
|
|
|
|
ca:
|
2019-02-28 11:21:41 +08:00
|
|
|
expiry: 131400h
|
2018-10-12 21:31:06 +08:00
|
|
|
pathlength: 1
|
|
|
|
|
|
|
|
idemix:
|
|
|
|
rhpoolsize: 1000
|
|
|
|
nonceexpiration: 15s
|
|
|
|
noncesweepinterval: 15m
|
|
|
|
|
|
|
|
bccsp:
|
|
|
|
default: SW
|
|
|
|
sw:
|
|
|
|
hash: SHA2
|
|
|
|
security: 256
|
|
|
|
filekeystore:
|
2019-02-28 11:21:41 +08:00
|
|
|
# The directory used for the software file-based keystore
|
2018-10-12 21:31:06 +08:00
|
|
|
keystore: msp/keystore
|
|
|
|
|
2019-02-28 11:21:41 +08:00
|
|
|
|
2018-10-12 21:31:06 +08:00
|
|
|
cacount:
|
|
|
|
|
|
|
|
cafiles:
|
|
|
|
|
|
|
|
intermediate:
|
|
|
|
parentserver:
|
|
|
|
url:
|
|
|
|
caname:
|
2019-02-28 11:21:41 +08:00
|
|
|
|
2018-10-12 21:31:06 +08:00
|
|
|
enrollment:
|
|
|
|
hosts:
|
|
|
|
profile:
|
|
|
|
label:
|
2019-02-28 11:21:41 +08:00
|
|
|
|
2018-10-12 21:31:06 +08:00
|
|
|
tls:
|
|
|
|
certfiles:
|
|
|
|
client:
|
|
|
|
certfile:
|
|
|
|
keyfile:
|
2019-02-28 11:21:41 +08:00
|
|
|
|
|
|
|
cfg:
|
|
|
|
identities:
|
|
|
|
passwordattempts: 10
|
2018-10-12 21:31:06 +08:00
|
|
|
EOF
|
|
|
|
|
|
|
|
#echo "${CA_SERVER_DEFAULT_CONFIG}"
|