From d84be4756fb2732d8ca9dbb122d2b609a6f24b72 Mon Sep 17 00:00:00 2001 From: mosiac Date: Wed, 23 Apr 2025 17:14:16 +0100 Subject: [PATCH] Log emulated access key instead of secret key Unsure if this was instead for the initial development phases but we shouldn't be logging this now --- .../java/io/trino/aws/proxy/glue/rest/TrinoGlueResource.java | 2 +- .../java/io/trino/aws/proxy/server/rest/TrinoS3Resource.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/trino-aws-proxy-glue/src/main/java/io/trino/aws/proxy/glue/rest/TrinoGlueResource.java b/trino-aws-proxy-glue/src/main/java/io/trino/aws/proxy/glue/rest/TrinoGlueResource.java index 30f7c781..337ca9a1 100644 --- a/trino-aws-proxy-glue/src/main/java/io/trino/aws/proxy/glue/rest/TrinoGlueResource.java +++ b/trino-aws-proxy-glue/src/main/java/io/trino/aws/proxy/glue/rest/TrinoGlueResource.java @@ -59,7 +59,7 @@ public TrinoGlueResource(ObjectMapper objectMapper, GlueRequestHandler requestHa @Produces(MediaType.APPLICATION_JSON) public Response gluePost(@Context Request request, @Context SigningMetadata signingMetadata, @Context RequestLoggingSession requestLoggingSession) { - requestLoggingSession.logProperty("request.glue.emulated.key", signingMetadata.credential().secretKey()); + requestLoggingSession.logProperty("request.glue.emulated.access-key", signingMetadata.credential().accessKey()); String target = request.requestHeaders().unmodifiedHeaders().getFirst("x-amz-target") .orElseThrow(() -> InvalidInputException.builder().statusCode(BAD_REQUEST.getStatusCode()).build()); diff --git a/trino-aws-proxy/src/main/java/io/trino/aws/proxy/server/rest/TrinoS3Resource.java b/trino-aws-proxy/src/main/java/io/trino/aws/proxy/server/rest/TrinoS3Resource.java index e4556a03..ca9d2c4a 100644 --- a/trino-aws-proxy/src/main/java/io/trino/aws/proxy/server/rest/TrinoS3Resource.java +++ b/trino-aws-proxy/src/main/java/io/trino/aws/proxy/server/rest/TrinoS3Resource.java @@ -135,7 +135,7 @@ private void handler(Request request, Optional identity, SigningMetada requestLoggingSession.logProperty("request.parsed.bucket", parsedS3Request.bucketName()); requestLoggingSession.logProperty("request.parsed.key", parsedS3Request.keyInBucket()); - requestLoggingSession.logProperty("request.emulated.key", signingMetadata.credential().secretKey()); + requestLoggingSession.logProperty("request.emulated.access-key", signingMetadata.credential().accessKey()); proxyClient.proxyRequest(identity, signingMetadata, parsedS3Request, asyncResponse, requestLoggingSession); }