tanvipenumudy commented on code in PR #4747:
URL: https://github.com/apache/ozone/pull/4747#discussion_r1238377226
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/protocol/SecretKeyProtocolServerSideTranslatorPB.java:
##########
@@ -102,6 +104,21 @@ public SCMSecretKeyResponse
processRequest(SCMSecretKeyRequest request)
.setSecretKeysListResponseProto(getAllSecretKeys())
.build();
+ case GetCheckAndRotate:
+ try {
+ return scmSecurityResponse
+ .setCheckAndRotateResponseProto(
+
checkAndRotate(request.getCheckAndRotateRequest().getForce()))
+ .build();
+ } catch (TimeoutException e) {
Review Comment:
Thanks @duongkame, made the required changes!
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/protocol/SecretKeyProtocolScm.java:
##########
@@ -28,4 +31,14 @@
clientPrincipal = HDDS_SCM_KERBEROS_PRINCIPAL_KEY
)
public interface SecretKeyProtocolScm extends SecretKeyProtocol {
+
+ /**
+ * Force generates new secret keys (rotate).
+ *
+ * @param force boolean flag that forcefully rotates the key on demand
+ * @return key rotation status
+ * @throws TimeoutException
+ * @throws IOException
+ */
+ boolean checkAndRotate(boolean force) throws TimeoutException, IOException;
Review Comment:
Understood, thanks @duongkame, made the required changes!
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]