Camel Spring Boot

AWS Security Token Service (STS)

Get temporary AWS credentials from AWS Security Token Service (STS) by assuming an IAM role or with a session or federation token.

What’s inside

Please refer to the above links for usage and configuration details.

Maven coordinates

<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-aws2-sts-starter</artifactId>
</dependency>

Spring Boot Auto-Configuration

The starter supports 19 options, which are listed below.

Name Description Default Type

camel.component.aws2-sts.access-key

The access key ID of the AWS credentials, used together with the secretKey option. It is not used when useDefaultCredentialsProvider or useProfileCredentialsProvider is true; otherwise, unless the stsClient option is set, both keys are required.

String

camel.component.aws2-sts.autowired-enabled

Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.

true

Boolean

camel.component.aws2-sts.configuration

The configuration that the endpoints of the component start from. Each endpoint uses a copy of it, with the options of the endpoint URI applied. The option is a org.apache.camel.component.aws2.sts.STS2Configuration type.

STS2Configuration

camel.component.aws2-sts.enabled

Whether to enable auto configuration of the aws2-sts component. This is enabled by default.

Boolean

camel.component.aws2-sts.lazy-start-producer

Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing.

false

Boolean

camel.component.aws2-sts.operation

The operation that the producer performs: assumeRole, getSessionToken or getFederationToken. The CamelAwsStsOperation header replaces this option. STS accepts getSessionToken and getFederationToken only with the long-term credentials of an IAM user, not with temporary credentials such as those of an assumed role.

assumerole

STS2Operations

camel.component.aws2-sts.override-endpoint

Whether to send the requests to the URI of the uriEndpointOverride option instead of the endpoint of the region. It has no effect when uriEndpointOverride is not set.

false

Boolean

camel.component.aws2-sts.pojo-request

Whether the body is the request object of the AWS SDK for the operation, such as an AssumeRoleRequest, which the producer sends as it is. The headers that give the input of the operation are then not used, the producer sets no headers from the response, and an empty body or a body of another type fails the exchange.

false

Boolean

camel.component.aws2-sts.profile-credentials-name

The name of the profile in the AWS shared credentials and config files, used when useProfileCredentialsProvider is true. If not set, the AWS SDK uses its default profile, which the AWS_PROFILE environment variable can change.

String

camel.component.aws2-sts.proxy-host

The host name of the proxy that the HTTP client of STS connects through. The proxy is used only when the proxyPort option is set too.

String

camel.component.aws2-sts.proxy-port

The port of the proxy that the HTTP client of STS connects through. The proxy is used only when the proxyHost option is set too.

Integer

camel.component.aws2-sts.proxy-protocol

The protocol that the HTTP client of STS uses to connect to the proxy. It is used only when the proxyHost and proxyPort options are set.

https

Protocol

camel.component.aws2-sts.region

The AWS region of the STS client, as a region ID such as eu-west-1, which is the value of Region.EU_WEST_1.id(). The default aws-global sends the requests to the global endpoint sts.amazonaws.com, and another region ID to the regional endpoint of STS in that region, such as sts.eu-west-1.amazonaws.com. For the China and AWS GovCloud (US) partitions, use a region such as cn-north-1 or us-gov-west-1: the AWS SDK has no valid STS endpoint for aws-cn-global and aws-us-gov-global.

aws-global

String

camel.component.aws2-sts.secret-key

The secret access key of the AWS credentials, used together with the accessKey option. It is not used when useDefaultCredentialsProvider or useProfileCredentialsProvider is true; otherwise, unless the stsClient option is set, both keys are required.

String

camel.component.aws2-sts.sts-client

To use a custom software.amazon.awssdk.services.sts.StsClient. When this option is set or autowired, the credentials, region, proxy, endpoint override and trustAllCertificates options are not used to build a client. The Camel endpoint does not close a client that is set or autowired. The option is a software.amazon.awssdk.services.sts.StsClient type.

StsClient

camel.component.aws2-sts.trust-all-certificates

Whether the HTTP client of STS trusts every TLS certificate without checking it. It applies to any endpoint, not only to an overridden one, so use it only for testing, for example against a local emulator.

false

Boolean

camel.component.aws2-sts.uri-endpoint-override

The URI of the endpoint to use instead of the endpoint of the region, for example http://localhost:4566 for a local emulator. It is used only when overrideEndpoint is true.

String

camel.component.aws2-sts.use-default-credentials-provider

Whether to load the credentials with the default credentials provider chain of the AWS SDK, which looks in system properties, environment variables, the shared credentials and config files, and the container or instance role. It takes precedence over the other credentials options.

false

Boolean

camel.component.aws2-sts.use-profile-credentials-provider

Whether to load the credentials from a profile of the AWS shared credentials and config files, the one of the profileCredentialsName option. It is not used when useDefaultCredentialsProvider is true, and it takes precedence over the accessKey and secretKey options.

false

Boolean