[Component Metadata Schema] Adds Common/Shared Authentication Profiles for AWS (#2958)

Signed-off-by: Roberto Rojas <robertojrojas@gmail.com>
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
This commit is contained in:
Roberto Rojas 2023-07-11 11:21:29 -04:00 committed by GitHub
parent 651834e9de
commit 836e373b38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 28 additions and 0 deletions

View File

@ -20,6 +20,34 @@ import (
// ParseBuiltinAuthenticationProfile returns an AuthenticationProfile(s) from a given BuiltinAuthenticationProfile.
func ParseBuiltinAuthenticationProfile(bi BuiltinAuthenticationProfile) ([]AuthenticationProfile, error) {
switch bi.Name {
case "aws":
return []AuthenticationProfile{
{
Title: "AWS: Access Key ID and Secret Access Key",
Description: "Authenticate using an Access Key ID and Secret Access Key included in the metadata",
Metadata: []Metadata{
{
Name: "accessKey",
Required: true,
Sensitive: true,
Description: "AWS access key associated with an IAM account",
Example: `"AKIAIOSFODNN7EXAMPLE"`,
},
{
Name: "secretKey",
Required: true,
Sensitive: true,
Description: "The secret key associated with the access key",
Example: `"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"`,
},
},
},
{
Title: "AWS: Credentials from Environment Variables",
Description: "Use AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from the environment",
Metadata: []Metadata{},
},
}, nil
case "azuread":
azureEnvironmentMetadata := Metadata{
Name: "azureEnvironment",