title: Unable to Revoke a certificate or enrollment id with fabric node sdk
body: <p>I have tried to use the Fabric CA client Node.js SDK to revoke either</p>
  
  <ol>
  <li>an enrollment certificate </li>
  <li>an enrollment ID (and all it's
  certificates)</li>
  </ol>
  
  <p>I have followed the samples on the ca tests (<a href="https://github.com/hyperledger/fabric-sdk-node/blob/release/test/integration/fabric-ca-services-tests.js" rel="nofollow noreferrer">https://github.com/hyperledger/fabric-sdk-node/blob/release/test/integration/fabric-ca-services-tests.js</a>)</p>
  
  <p>After the revoke function is called I can see that the response given is </p>
  
  <pre><code>{
      "success": true,
      "result": {},
      "errors": [],
      "messages": []
  }
  </code></pre>
  
  <p>Also, I can see that on the CA logs that revokes are successful</p>
  
  <p>Revoke of certificate:</p>
  
  <pre><code>Authorization:      LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUI4RENDQVplZ0F3SUJBZ0lVYzV3Y3M2U0xGczYxYzBDS3dHUlRVVTBXN3dFd0NnWUlLb1pJemowRUF3SXcKY3pFTE1Ba0dBMVVFQmhNQ1ZWTXhFekFSQmdOVkJBZ1RDa05oYkdsbWIzSnVhV0V4RmpBVUJnTlZCQWNURFZOaApiaUJHY21GdVkybHpZMjh4R1RBWEJnTlZCQW9URUc5eVp6RXVaWGhoYlhCc1pTNWpiMjB4SERBYUJnTlZCQU1UCkUyTmhMbTl5WnpFdVpYaGhiWEJzWlM1amIyMHdIaGNOTVRjd09USTFNVEF5TnpBd1doY05NVGd3T1RJMU1UQXkKTnpBd1dqQVFNUTR3REFZRFZRUURFd1ZoWkcxcGJqQlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQQpCSmljVE1Td0hDclRBcWRGYjcwVHo2TXpKSHp1YmRqZE92ZDN5RC8yR3puNThCaFpKV243MHUxRHhxWFB6THVvClZ2KytrSjVFL1NoU1Z0bUwySVg2UEtpamJEQnFNQTRHQTFVZER3RUIvd1FFQXdJSGdEQU1CZ05WSFJNQkFmOEUKQWpBQU1CMEdBMVVkRGdRV0JCU0lFVTQzcWw0MENwU2tMZi9NT3U4b0s4QVVjREFyQmdOVkhTTUVKREFpZ0NCQwpPYW9OelhiYTdyaTZETnB3R0ZIUlJRVFRHcTBiTGQzYnJHcFhObDVKZkRBS0JnZ3Foa2pPUFFRREFnTkhBREJFCkFpQllmZWZjdzc5eTAyWVNGZzJuUCtSdklMOWVxTWh1M0Y1WWp4R2pPc0dzZlFJZ2JtZmtUTENXRisveHpEZC8KTFEwUWQzZ2hsaXBuWk1xSENVRFBDa0RKbmhRPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==.MEUCIQDlkBPmew/acbHt0o0Nm8HL9nKlo9EqCzW+REUP6Vh+SQIgcBt73ycUhYe6AT/S0aZNUCzErgsk7PNCsLo/E5La5QM=
  {"aki":"4239AA0DCD76DAEEB8BA0CDA701851D14504D31AAD1B2DDDDBAC6A57365E497C","serial":"1A8C250C11C33E36752FFB4161D7E6C39AEF4F56","reason":null,"caName":"ca.example.com"}
  2017/09/25 15:25:33 [DEBUG] Directing traffic to CA ca.example.com
  2017/09/25 15:25:33 [DEBUG] Checking for revocation/expiration of certificate owned by 'admin'
  2017/09/25 15:25:33 [DEBUG] DB: Get certificate by serial (739c1cb3a48b16ceb573408ac06453514d16ef01) and aki (4239aa0dcd76daeeb8ba0cda701851d14504d31aad1b2ddddbac6a57365e497c)
  2017/09/25 15:25:33 [DEBUG] Successful authentication of 'admin'
  2017/09/25 15:25:33 [DEBUG] Revoke request received
  2017/09/25 15:25:33 [DEBUG] Revoke request: {RevocationRequest:{Name: Serial:1A8C250C11C33E36752FFB4161D7E6C39AEF4F56 AKI:4239AA0DCD76DAEEB8BA0CDA701851D14504D31AAD1B2DDDDBAC6A57365E497C Reason: CAName:ca.example.com}}
  2017/09/25 15:25:33 [DEBUG] getUserAttrValue identity=admin, attr=hf.Revoker
  2017/09/25 15:25:33 [DEBUG] DB: Getting identity admin
  2017/09/25 15:25:33 [DEBUG] getUserAttrValue identity=admin, name=hf.Revoker, value=1
  2017/09/25 15:25:33 [DEBUG] DB: Get certificate by serial (1a8c250c11c33e36752ffb4161d7e6c39aef4f56) and aki (4239aa0dcd76daeeb8ba0cda701851d14504d31aad1b2ddddbac6a57365e497c)
  2017/09/25 15:25:33 [DEBUG] DB: Getting information for identity devorgId1-appId1
  2017/09/25 15:25:33 [DEBUG] Check to see if revoker admin has affiliations to revoke: devorgId1-appId1
  2017/09/25 15:25:33 [DEBUG] getUserAffilliation identity=admin
  2017/09/25 15:25:33 [DEBUG] DB: Getting information for identity admin
  2017/09/25 15:25:33 [DEBUG] getUserAffiliation identity=admin, aff=
  2017/09/25 15:25:33 [DEBUG] Affiliation of revoker: , affiliation of identity being revoked: org1
  2017/09/25 15:25:33 [DEBUG] Identity with root affiliation revoking
  2017/09/25 15:25:33 [DEBUG] DB: Revoke certificate by serial (1a8c250c11c33e36752ffb4161d7e6c39aef4f56) and aki (4239aa0dcd76daeeb8ba0cda701851d14504d31aad1b2ddddbac6a57365e497c)
  2017/09/25 15:25:33 [DEBUG] Revoke was successful: {RevocationRequest:{Name: Serial:1a8c250c11c33e36752ffb4161d7e6c39aef4f56 AKI:4239aa0dcd76daeeb8ba0cda701851d14504d31aad1b2ddddbac6a57365e497c Reason: CAName:ca.example.com}}
  </code></pre>
  
  <p>Revoke enrollment id:</p>
  
  <pre><code> 2017/09/25 16:39:19 [DEBUG] Successful authentication of 'admin'
      2017/09/25 16:39:19 [DEBUG] Revoke request received
      2017/09/25 16:39:19 [DEBUG] Revoke request: {RevocationRequest:    {Name:devorgId1-appId1 Serial: AKI: Reason: CAName:ca.example.com}}
      2017/09/25 16:39:19 [DEBUG] getUserAttrValue identity=admin, attr=hf.Revoker
      2017/09/25 16:39:19 [DEBUG] DB: Getting identity admin
      2017/09/25 16:39:19 [DEBUG] getUserAttrValue identity=admin, name=hf.Revoker, value=1
      2017/09/25 16:39:19 [DEBUG] DB: Getting identity devorgId1-appId1
      2017/09/25 16:39:19 [DEBUG] DB: Getting information for identity devorgId1-appId1
      2017/09/25 16:39:19 [DEBUG] Check to see if revoker admin has affiliations to revoke: devorgId1-appId1
      2017/09/25 16:39:19 [DEBUG] getUserAffilliation identity=admin
      2017/09/25 16:39:19 [DEBUG] DB: Getting information for identity admin
      2017/09/25 16:39:19 [DEBUG] getUserAffiliation identity=admin, aff=
      2017/09/25 16:39:19 [DEBUG] Affiliation of revoker: , affiliation of identity being revoked: org1
      2017/09/25 16:39:19 [DEBUG] Identity with root affiliation revoking
      2017/09/25 16:39:19 [DEBUG] DB: Update identity devorgId1-appId1
      2017/09/25 16:39:19 [DEBUG] DB: Revoke certificate by ID (devorgId1-appId1)
      2017/09/25 16:39:19 [WARNING] No certificates were revoked for 'devorgId1-appId1' but the ID was disabled
      2017/09/25 16:39:19 [DEBUG] Revoked the following certificates owned by 'devorgId1-appId1': []
      2017/09/25 16:39:19 [DEBUG] Revoke was successful: {RevocationRequest:{Name:devorgId1-appId1 Serial: AKI: Reason: CAName:ca.example.com}}
  </code></pre>
  
  <p>However, after the revoke (whether just a certificate or the enrollment id) I am still able to perform invokes using the enrollment ID via the node.js SDK (using getUserContext and performing transactions).
  Is this by design? I was expecting revoked enrollment id or certificates would no longer be able to perform invokes.</p>
  
  <p>More info:
  Using the fabcar start script to spin up a fabric v1 network:
  <a href="https://github.com/hyperledger/fabric-samples/tree/release/fabcar" rel="nofollow noreferrer">https://github.com/hyperledger/fabric-samples/tree/release/fabcar</a></p>