From 0955e8ec18ef0c28518106cd9ed519c72abce180 Mon Sep 17 00:00:00 2001 From: Roberto Rojas Date: Mon, 24 Jul 2023 14:48:33 -0400 Subject: [PATCH] updates as pr review Signed-off-by: Roberto Rojas --- .build-tools/builtin-authentication-profiles.yaml | 8 ++++++++ bindings/aws/s3/metadata.yaml | 8 -------- bindings/aws/s3/s3.go | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.build-tools/builtin-authentication-profiles.yaml b/.build-tools/builtin-authentication-profiles.yaml index 81e07c3635..548fbf5352 100644 --- a/.build-tools/builtin-authentication-profiles.yaml +++ b/.build-tools/builtin-authentication-profiles.yaml @@ -13,6 +13,14 @@ aws: required: true sensitive: true example: '"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"' + - name: sessionToken + required: false + sensitive: true + description: | + AWS session token to use. A session token is only required if you are using + temporary security credentials. + example: '"TOKEN"' + type: string - title: "AWS: Credentials from Environment Variables" description: Use AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from the environment diff --git a/bindings/aws/s3/metadata.yaml b/bindings/aws/s3/metadata.yaml index 18b38fe760..dd573c5466 100644 --- a/bindings/aws/s3/metadata.yaml +++ b/bindings/aws/s3/metadata.yaml @@ -42,14 +42,6 @@ metadata: Do not use this when running against production AWS. example: '"http://localhost:4566"' type: string - - name: sessionToken - required: false - sensitive: true - description: | - AWS session token to use. A session token is only required if you are using - temporary security credentials. - example: '"TOKEN"' - type: string - name: forcePathStyle description: | Currently Amazon S3 SDK supports virtual-hosted-style and path-style access. diff --git a/bindings/aws/s3/s3.go b/bindings/aws/s3/s3.go index 2201aaa86a..19fb60af70 100644 --- a/bindings/aws/s3/s3.go +++ b/bindings/aws/s3/s3.go @@ -63,12 +63,12 @@ type AWSS3 struct { type s3Metadata struct { // Ignored by metadata parser because included in built-in authentication profile - AccessKey string `json:"accessKey" mapstructure:"accessKey" mdignore:"true"` - SecretKey string `json:"secretKey" mapstructure:"secretKey" mdignore:"true"` + AccessKey string `json:"accessKey" mapstructure:"accessKey" mdignore:"true"` + SecretKey string `json:"secretKey" mapstructure:"secretKey" mdignore:"true"` + SessionToken string `json:"sessionToken" mapstructure:"sessionToken" mdignore:"true"` Region string `json:"region" mapstructure:"region"` Endpoint string `json:"endpoint" mapstructure:"endpoint"` - SessionToken string `json:"sessionToken" mapstructure:"sessionToken"` Bucket string `json:"bucket" mapstructure:"bucket"` DecodeBase64 bool `json:"decodeBase64,string" mapstructure:"decodeBase64"` EncodeBase64 bool `json:"encodeBase64,string" mapstructure:"encodeBase64"`