@@ -236,7 +236,7 @@ Fabric CA server's configuration file format
236
236
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
237
237
238
238
A configuration file can be provided to the server using the ``-c `` or ``--config ``
239
- option. If the config option is used and the specified file doesn't exist,
239
+ option. If the `` -- config`` option is used and the specified file doesn't exist,
240
240
a default configuration file (like the one shown below) will be created in the
241
241
specified location. However, if no config option was used, it will be created in
242
242
the server's home directory (see `Fabric CA Server <#server >`__ section more info).
@@ -371,7 +371,7 @@ the server's home directory (see `Fabric CA Server <#server>`__ section more inf
371
371
cn: fabric-ca-server
372
372
names:
373
373
- C: US
374
- ST: " North Carolina"
374
+ ST: North Carolina
375
375
L:
376
376
O: Hyperledger
377
377
OU: Fabric
@@ -434,7 +434,7 @@ the client's home directory (see `Fabric CA Client <#client>`__ section more inf
434
434
cn: <<<ENROLLMENT_ID>>>
435
435
names:
436
436
- C: US
437
- ST: " North Carolina"
437
+ ST: North Carolina
438
438
L:
439
439
O: Hyperledger
440
440
OU: Fabric
@@ -452,7 +452,7 @@ the client's home directory (see `Fabric CA Client <#client>`__ section more inf
452
452
name:
453
453
type:
454
454
affiliation:
455
- attributes :
455
+ attrs :
456
456
- name:
457
457
value:
458
458
@@ -1022,7 +1022,7 @@ file contains the following:
1022
1022
name:
1023
1023
type: user
1024
1024
affiliation: org1.department1
1025
- attributes :
1025
+ attrs :
1026
1026
- name: hf.Revoker
1027
1027
value: true
1028
1028
- name: anotherAttrName
@@ -1111,51 +1111,63 @@ You can issue the reenroll command to renew your enrollment certificate as follo
1111
1111
1112
1112
Revoking a certificate or identity
1113
1113
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1114
+ An identity or a certificate can be revoked. Revoking an identity will revoke all
1115
+ the certificates owned by the identity and will also prevent the identity from getting
1116
+ any new certificates. Revoking a certificate will invalidate a single certificate.
1114
1117
1115
- In order to revoke a certificate or user , the calling identity must have
1116
- the ``hf.Revoker `` attribute. The revoking identity can only revoke a
1117
- certificate or user that has an affiliation that is equal to or prefixed
1118
- by the revoking identity's affiliation.
1118
+ In order to revoke a certificate or an identity , the calling identity must have
1119
+ the ``hf.Revoker `` attribute. The revoking identity can only revoke a certificate
1120
+ or an identity that has an affiliation that is equal to or prefixed by the revoking
1121
+ identity's affiliation.
1119
1122
1120
- For example, a revoker with affiliation bank.bank\_ 1 can revoke user
1121
- with bank.bank1.dep1 but can't revoke bank.bank2.
1123
+ For example, a revoker with affiliation **orgs.org1 ** can revoke an identity
1124
+ affiliated with **orgs.org1 ** or **orgs.org1.department1 ** but can't revoke an
1125
+ identity affiliated with **orgs.org2 **.
1122
1126
1123
- You may revoke a specific certificate by specifying its AKI (Authority
1124
- Key Identifier) and its serial number as follows:
1127
+ The following command disables an identity and revokes all of the certificates
1128
+ associated with the identity. All future requests received by the fabric-ca-server
1129
+ from this identity will be rejected.
1125
1130
1126
1131
::
1127
1132
1128
- fabric-ca-client revoke -a xxx -s yyy -r <reason>
1133
+ fabric-ca-client revoke -e <enrollment_id> -r <reason>
1129
1134
1130
- The following command disables a user's identity and also revokes all of
1131
- the certificates associated with the identity. All future requests
1132
- received by the fabric-ca-server from this identity will be rejected.
1135
+ The following are the supported reasons that can be specified using ``-r `` flag:
1136
+
1137
+ 1. unspecified
1138
+ 2. keycompromise
1139
+ 3. cacompromise
1140
+ 4. affiliationchange
1141
+ 5. superseded
1142
+ 6. cessationofoperation
1143
+ 7. certificatehold
1144
+ 8. removefromcrl
1145
+ 9. privilegewithdrawn
1146
+ 10. aacompromise
1147
+
1148
+ For example, the bootstrap admin who is associated with root of the affiliation tree
1149
+ can revoke **peer1 **'s identity as follows:
1133
1150
1134
1151
::
1135
1152
1136
- fabric-ca-client revoke -e <enrollment_id> -r <reason>
1153
+ # export FABRIC_CA_CLIENT_HOME=$HOME/fabric-ca/clients/admin
1154
+ # fabric-ca-client revoke -e peer1
1137
1155
1138
- The following are the supported reasons for revoking that can be
1139
- specified using `` -r `` flag.
1156
+ An enrollment certificate that belongs to an identity can be revoked by
1157
+ specifying its AKI (Authority Key Identifier) and serial number as follows:
1140
1158
1141
- | **Reasons:**
1142
- | - unspecified
1143
- | - keycompromise
1144
- | - cacompromise
1145
- | - affiliationchange
1146
- | - superseded
1147
- | - cessationofoperation
1148
- | - certificatehold
1149
- | - removefromcrl
1150
- | - privilegewithdrawn
1151
- | - aacompromise
1159
+ ::
1152
1160
1153
- The bootstrap admin can revoke **peer1 **'s identity as follows:
1161
+ fabric-ca-client revoke -a xxx -s yyy -r <reason>
1162
+
1163
+ For example, you can get the AKI and the serial number of a certificate using the openssl command
1164
+ and pass them to the ``revoke `` command to revoke the said certificate as follows:
1154
1165
1155
1166
::
1156
1167
1157
- # export FABRIC_CA_CLIENT_HOME=$HOME/fabric-ca/clients/admin
1158
- # fabric-ca-client revoke -e peer1
1168
+ serial=$(openssl x509 -in userecert.pem -serial -noout | cut -d "=" -f 2)
1169
+ aki=$(openssl x509 -in userecert.pem -text | awk '/keyid/ {gsub(/ *keyid:|:/,"",$1);print tolower($0)}')
1170
+ fabric-ca-client revoke -s $serial -a $aki -r affiliationchange
1159
1171
1160
1172
Enabling TLS
1161
1173
~~~~~~~~~~~~
0 commit comments