You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/05/12 20:53:59 UTC

[GitHub] [ozone] xiaoyuyao commented on a change in pull request #2191: HDDS-5155. Add revokeCertificate to SCMSecurityProtocolServer.

xiaoyuyao commented on a change in pull request #2191:
URL: https://github.com/apache/ozone/pull/2191#discussion_r631392175



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMSecurityProtocolServer.java
##########
@@ -333,6 +341,30 @@ public long getLatestCrlId() {
     return scmCertificateServer.getLatestCrlId();
   }
 
+  @Override
+  public long revokeCertificates(List<Long> certIds, int reason,
+      long revocationTime) throws IOException {
+    String remoteUser = getRpcRemoteUsername();
+    storageContainerManager.checkAdminAccess(remoteUser);
+
+    Future<Optional<Long>> revoked = scmCertificateServer.revokeCertificates(
+        certIds.stream().map(id -> BigInteger.valueOf(id))
+            .collect(Collectors.toList()),

Review comment:
       Good question. Most of the caller and existing APIs use String for certid and convert it to BigInteger when talking to the store layer. We can follow that and covert it only once (String->BigInteger) when talking to the store layer. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org