Class WebhookHmacAuthConfiguration

java.lang.Object
software.amazon.awssdk.services.eventbridgev2.model.WebhookHmacAuthConfiguration
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<WebhookHmacAuthConfiguration.Builder,WebhookHmacAuthConfiguration>

@Generated("software.amazon.awssdk:codegen") public final class WebhookHmacAuthConfiguration extends Object implements SdkPojo, Serializable, ToCopyableBuilder<WebhookHmacAuthConfiguration.Builder,WebhookHmacAuthConfiguration>

The provider signs each request with a hash-based message authentication code (HMAC) of the secret. Amazon EventBridge accepts the request if any signature in SignatureHttpHeader matches.

See Also:
  • Method Details

    • algorithm

      public final WebhookHmacAlgorithm algorithm()

      The hash algorithm the provider uses to compute the signature.

      If the service returns an enum value that is not available in the current SDK version, algorithm will return WebhookHmacAlgorithm.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from algorithmAsString().

      Returns:
      The hash algorithm the provider uses to compute the signature.
      See Also:
    • algorithmAsString

      public final String algorithmAsString()

      The hash algorithm the provider uses to compute the signature.

      If the service returns an enum value that is not available in the current SDK version, algorithm will return WebhookHmacAlgorithm.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from algorithmAsString().

      Returns:
      The hash algorithm the provider uses to compute the signature.
      See Also:
    • encoding

      public final WebhookHmacEncoding encoding()

      How the provider encodes the signature in the header.

      If the service returns an enum value that is not available in the current SDK version, encoding will return WebhookHmacEncoding.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from encodingAsString().

      Returns:
      How the provider encodes the signature in the header.
      See Also:
    • encodingAsString

      public final String encodingAsString()

      How the provider encodes the signature in the header.

      If the service returns an enum value that is not available in the current SDK version, encoding will return WebhookHmacEncoding.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from encodingAsString().

      Returns:
      How the provider encodes the signature in the header.
      See Also:
    • signatureHttpHeader

      public final String signatureHttpHeader()

      The name of the header that carries the signature, for example X-Hub-Signature-256. When TimestampHttpHeader names the same header, Delimiter, SignaturePrefix and TimestampPrefix are all required. Reserved names are rejected, as described on StaticTokenAuthConfiguration's TokenHttpHeader.

      Returns:
      The name of the header that carries the signature, for example X-Hub-Signature-256. When TimestampHttpHeader names the same header, Delimiter, SignaturePrefix and TimestampPrefix are all required. Reserved names are rejected, as described on StaticTokenAuthConfiguration's TokenHttpHeader.
    • signaturePrefix

      public final String signaturePrefix()

      The text that precedes the signature in the header value, for example sha256=. Required when TimestampHttpHeader is the same header as SignatureHttpHeader.

      Returns:
      The text that precedes the signature in the header value, for example sha256=. Required when TimestampHttpHeader is the same header as SignatureHttpHeader.
    • delimiter

      public final String delimiter()

      The separator between parts of the signature header value, for example a comma for a header value of t=1727816400,v1=<signature>, or a space when the header carries several signatures. Required when TimestampHttpHeader is the same header as SignatureHttpHeader.

      Returns:
      The separator between parts of the signature header value, for example a comma for a header value of t=1727816400,v1=<signature>, or a space when the header carries several signatures. Required when TimestampHttpHeader is the same header as SignatureHttpHeader.
    • timestampHttpHeader

      public final String timestampHttpHeader()

      The name of the header that carries the request timestamp. Required when SignedMessageComposition is TIMESTAMP_DOT_BODY or MESSAGE_ID_DOT_TIMESTAMP_DOT_BODY, or when TimestampToleranceInSeconds is set. Not allowed when SignedMessageComposition is BODY, because BODY does not sign the timestamp. Reserved names are rejected, as described on StaticTokenAuthConfiguration's TokenHttpHeader.

      Returns:
      The name of the header that carries the request timestamp. Required when SignedMessageComposition is TIMESTAMP_DOT_BODY or MESSAGE_ID_DOT_TIMESTAMP_DOT_BODY, or when TimestampToleranceInSeconds is set. Not allowed when SignedMessageComposition is BODY, because BODY does not sign the timestamp. Reserved names are rejected, as described on StaticTokenAuthConfiguration's TokenHttpHeader.
    • timestampPrefix

      public final String timestampPrefix()

      The text that precedes the timestamp in the header value, for example t=. Required when TimestampHttpHeader is the same header as SignatureHttpHeader.

      Returns:
      The text that precedes the timestamp in the header value, for example t=. Required when TimestampHttpHeader is the same header as SignatureHttpHeader.
    • timestampToleranceInSeconds

      public final Integer timestampToleranceInSeconds()

      The maximum difference, in seconds, allowed between the request timestamp and the time EventBridge receives the request. Requests outside this window are rejected. The default is 300 seconds. Requires TimestampHttpHeader. Not allowed when SignedMessageComposition is BODY, because BODY does not sign the timestamp.

      Returns:
      The maximum difference, in seconds, allowed between the request timestamp and the time EventBridge receives the request. Requests outside this window are rejected. The default is 300 seconds. Requires TimestampHttpHeader. Not allowed when SignedMessageComposition is BODY, because BODY does not sign the timestamp.
    • messageIdHttpHeader

      public final String messageIdHttpHeader()

      The name of the header that carries the message ID. Required when SignedMessageComposition is MESSAGE_ID_DOT_TIMESTAMP_DOT_BODY. Requests whose message ID contains a period (.) are rejected. Reserved names are rejected, as described on StaticTokenAuthConfiguration's TokenHttpHeader.

      Returns:
      The name of the header that carries the message ID. Required when SignedMessageComposition is MESSAGE_ID_DOT_TIMESTAMP_DOT_BODY. Requests whose message ID contains a period (.) are rejected. Reserved names are rejected, as described on StaticTokenAuthConfiguration's TokenHttpHeader.
    • signedMessageComposition

      public final WebhookSignedMessageComposition signedMessageComposition()

      How the provider assembles the message it signs from the request.

      • BODY - The request body alone. BODY provides no replay protection.

      • TIMESTAMP_DOT_BODY - <timestamp>.<body>. Requires TimestampHttpHeader.

      • MESSAGE_ID_DOT_TIMESTAMP_DOT_BODY - <messageId>.<timestamp>.<body>, as in the Standard Webhooks specification. Requires TimestampHttpHeader and MessageIdHttpHeader.

      If the service returns an enum value that is not available in the current SDK version, signedMessageComposition will return WebhookSignedMessageComposition.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from signedMessageCompositionAsString().

      Returns:
      How the provider assembles the message it signs from the request.

      • BODY - The request body alone. BODY provides no replay protection.

      • TIMESTAMP_DOT_BODY - <timestamp>.<body>. Requires TimestampHttpHeader.

      • MESSAGE_ID_DOT_TIMESTAMP_DOT_BODY - <messageId>.<timestamp>.<body>, as in the Standard Webhooks specification. Requires TimestampHttpHeader and MessageIdHttpHeader.

      See Also:
    • signedMessageCompositionAsString

      public final String signedMessageCompositionAsString()

      How the provider assembles the message it signs from the request.

      • BODY - The request body alone. BODY provides no replay protection.

      • TIMESTAMP_DOT_BODY - <timestamp>.<body>. Requires TimestampHttpHeader.

      • MESSAGE_ID_DOT_TIMESTAMP_DOT_BODY - <messageId>.<timestamp>.<body>, as in the Standard Webhooks specification. Requires TimestampHttpHeader and MessageIdHttpHeader.

      If the service returns an enum value that is not available in the current SDK version, signedMessageComposition will return WebhookSignedMessageComposition.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from signedMessageCompositionAsString().

      Returns:
      How the provider assembles the message it signs from the request.

      • BODY - The request body alone. BODY provides no replay protection.

      • TIMESTAMP_DOT_BODY - <timestamp>.<body>. Requires TimestampHttpHeader.

      • MESSAGE_ID_DOT_TIMESTAMP_DOT_BODY - <messageId>.<timestamp>.<body>, as in the Standard Webhooks specification. Requires TimestampHttpHeader and MessageIdHttpHeader.

      See Also:
    • secretValue

      public final String secretValue()

      The signing key shared with the provider. If you omit it, EventBridge generates one. EventBridge stores the key only in AWS Secrets Manager and never returns it, including from DescribeEventSource. The key must be 16 to 512 bytes; with BASE64 SecretEncoding, this is measured after decoding.

      Returns:
      The signing key shared with the provider. If you omit it, EventBridge generates one. EventBridge stores the key only in AWS Secrets Manager and never returns it, including from DescribeEventSource. The key must be 16 to 512 bytes; with BASE64 SecretEncoding, this is measured after decoding.
    • secretEncoding

      public final WebhookSecretEncoding secretEncoding()

      How the secret is encoded. RAW uses the secret's characters as the signing key. BASE64 decodes the secret first, as providers that follow the Standard Webhooks specification require. The default is RAW.

      If the service returns an enum value that is not available in the current SDK version, secretEncoding will return WebhookSecretEncoding.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from secretEncodingAsString().

      Returns:
      How the secret is encoded. RAW uses the secret's characters as the signing key. BASE64 decodes the secret first, as providers that follow the Standard Webhooks specification require. The default is RAW.
      See Also:
    • secretEncodingAsString

      public final String secretEncodingAsString()

      How the secret is encoded. RAW uses the secret's characters as the signing key. BASE64 decodes the secret first, as providers that follow the Standard Webhooks specification require. The default is RAW.

      If the service returns an enum value that is not available in the current SDK version, secretEncoding will return WebhookSecretEncoding.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from secretEncodingAsString().

      Returns:
      How the secret is encoded. RAW uses the secret's characters as the signing key. BASE64 decodes the secret first, as providers that follow the Standard Webhooks specification require. The default is RAW.
      See Also:
    • toBuilder

      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<WebhookHmacAuthConfiguration.Builder,WebhookHmacAuthConfiguration>
      Returns:
      a builder for type T
    • builder

      public static WebhookHmacAuthConfiguration.Builder builder()
    • serializableBuilderClass

      public static Class<? extends WebhookHmacAuthConfiguration.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.