Class PresignedUrlRedactionUtils

java.lang.Object
software.amazon.awssdk.services.s3.internal.presignedurl.PresignedUrlRedactionUtils

@SdkInternalApi public final class PresignedUrlRedactionUtils extends Object
Renders a presigned URL for logs and exception messages.
  • Method Details

    • redactQueryString

      public static String redactQueryString(URL url)
      Renders only the non-secret components of a presigned URL: protocol, host, port and path. The query string of a presigned URL carries the signature, the credential scope and (for session credentials) the security token, so it is replaced with a placeholder. The user-info and fragment components are dropped.
      Parameters:
      url - the presigned URL, may be null
      Returns:
      the rendered URL, or null if url is null