duongkame commented on code in PR #4417:
URL: https://github.com/apache/ozone/pull/4417#discussion_r1149947784
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -1038,15 +1033,19 @@ public void startSecretManager() {
LOG.error("Unable to read key pair for OM.", e);
throw new UncheckedIOException(e);
}
+
if (secConfig.isBlockTokenEnabled() && blockTokenMgr != null) {
+ LOG.info("Starting secret key client.");
try {
- LOG.info("Starting OM block token secret manager");
- blockTokenMgr.start(certClient);
+ secretKeyClient.start(configuration);
} catch (IOException e) {
- // Unable to start secret manager.
- LOG.error("Error starting block token secret manager.", e);
+ LOG.error("Unable to initialize secret key.", e);
throw new UncheckedIOException(e);
}
+ // A backdoor for integration-tests to inject a custom secretKeyClient.
+ // This allows testing token in integration test without fully setting
+ // up a working secure cluster.
+ blockTokenMgr.setSecretKeyClient(secretKeyClient);
Review Comment:
Good one. Updated.
--
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]