Skip to content

Commit

Permalink
Use logback parameterized logging
Browse files Browse the repository at this point in the history
  • Loading branch information
cYKatherine committed Feb 5, 2025
1 parent 40c518e commit 9f806e6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void attest(byte[] attestationRequest, byte[] publicKey, Handler<AsyncRes
try {
var tokenString = new String(attestationRequest, StandardCharsets.US_ASCII);

log.debug("Attesting for " + azureCcProtocol + " operator...");
log.debug("Attesting for {} operator...", azureCcProtocol);
log.debug("Validating signature...");
var tokenPayload = tokenSignatureValidator.validate(tokenString, azureCcProtocol);

Expand All @@ -53,10 +53,10 @@ public void attest(byte[] attestationRequest, byte[] publicKey, Handler<AsyncRes
var enclaveId = policyValidator.validate(tokenPayload, encodedPublicKey);

if (allowedEnclaveIds.contains(enclaveId)) {
log.info(String.format("Successfully attested %s against registered enclaves, enclave id: %s", azureCcProtocol, enclaveId));
log.info("Successfully attested {} against registered enclaves, enclave id: {}", azureCcProtocol, enclaveId);
handler.handle(Future.succeededFuture(new AttestationResult(publicKey, enclaveId)));
} else {
log.info(String.format("Got unsupported %s enclave id: %s", azureCcProtocol, enclaveId));
log.warn("Got unsupported {} enclave id: {}", azureCcProtocol, enclaveId);
handler.handle(Future.succeededFuture(new AttestationResult(AttestationFailure.FORBIDDEN_ENCLAVE)));
}
}
Expand All @@ -67,7 +67,7 @@ public void attest(byte[] attestationRequest, byte[] publicKey, Handler<AsyncRes
} catch (Exception ex) {
handler.handle(Future.failedFuture(new AttestationException(ex)));
}
};
}

@Override
public void registerEnclave(String encodedIdentifier) throws AttestationException {
Expand Down

0 comments on commit 9f806e6

Please sign in to comment.