Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support DefaultCredentialProvider in the AWS Kamelets - AWS S3 Sink #743

Merged
merged 4 commits into from
Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 15 additions & 5 deletions kamelets/aws-s3-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ spec:
definition:
title: "AWS S3 Sink"
description: |-
Upload data to AWS S3.
Upload data to AWS S3 Bucket.

Access Key/Secret Key are the basic method for authenticating to the AWS S3 Service. These parameters are optional, because the Kamelet provide also the 'useDefaultCredentialsProvider'.

When using a default Credentials Provider the S3 client will load the credentials through this provider and won't use the static credential. This is reason for not having the access key and secret key as mandatory parameter for this Kamelet.

The Kamelet expects the following headers to be set:

Expand All @@ -40,8 +44,6 @@ spec:
If the header won't be set the exchange ID will be used as file name.
required:
- bucketNameOrArn
- accessKey
- secretKey
- region
type: object
properties:
Expand Down Expand Up @@ -77,6 +79,13 @@ spec:
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
useDefaultCredentialsProvider:
title: Default Credentials Provider
description: Set whether the S3 client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in.
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
dependencies:
- "camel:aws2-s3"
- "camel:kamelet"
Expand Down Expand Up @@ -104,7 +113,8 @@ spec:
- to:
uri: "aws2-s3:{{bucketNameOrArn}}"
parameters:
secretKey: "{{secretKey}}"
accessKey: "{{accessKey}}"
secretKey: "{{?secretKey}}"
accessKey: "{{?accessKey}}"
region: "{{region}}"
autoCreateBucket: "{{autoCreateBucket}}"
useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ spec:
definition:
title: "AWS S3 Sink"
description: |-
Upload data to AWS S3.
Upload data to AWS S3 Bucket.

Access Key/Secret Key are the basic method for authenticating to the AWS S3 Service. These parameters are optional, because the Kamelet provide also the 'useDefaultCredentialsProvider'.

When using a default Credentials Provider the S3 client will load the credentials through this provider and won't use the static credential. This is reason for not having the access key and secret key as mandatory parameter for this Kamelet.

The Kamelet expects the following headers to be set:

Expand All @@ -40,8 +44,6 @@ spec:
If the header won't be set the exchange ID will be used as file name.
required:
- bucketNameOrArn
- accessKey
- secretKey
- region
type: object
properties:
Expand Down Expand Up @@ -77,6 +79,13 @@ spec:
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
useDefaultCredentialsProvider:
title: Default Credentials Provider
description: Set whether the S3 client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in.
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
dependencies:
- "camel:aws2-s3"
- "camel:kamelet"
Expand Down Expand Up @@ -104,7 +113,8 @@ spec:
- to:
uri: "aws2-s3:{{bucketNameOrArn}}"
parameters:
secretKey: "{{secretKey}}"
accessKey: "{{accessKey}}"
secretKey: "{{?secretKey}}"
accessKey: "{{?accessKey}}"
region: "{{region}}"
autoCreateBucket: "{{autoCreateBucket}}"
useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"