Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateAuthToken(ctx context.Context, region string) (string, int64, error)
- func GenerateAuthTokenFromCredentialsProvider(ctx context.Context, region string, ...) (string, int64, error)
- func GenerateAuthTokenFromProfile(ctx context.Context, region string, awsProfile string) (string, int64, error)
- func GenerateAuthTokenFromRole(ctx context.Context, region string, roleArn string, stsSessionName string) (string, int64, error)
Constants ¶
View Source
const ( ActionType = "Action" // ActionType represents the key for the action type in the request. ActionName = "kafka-cluster:Connect" // ActionName represents the specific action name for connecting to a Kafka cluster. SigningName = "kafka-cluster" // SigningName represents the signing name for the Kafka cluster. UserAgentKey = "User-Agent" // UserAgentKey represents the key for the User-Agent parameter in the request. LibName = "aws-msk-iam-sasl-signer-go" // LibName represents the name of the library. ExpiresQueryKey = "X-Amz-Expires" // ExpiresQueryKey represents the key for the expiration time in the query parameters. DefaultSessionName = "MSKSASLDefaultSession" // DefaultSessionName represents the default session name for assuming a role. DefaultExpirySeconds = 900 // DefaultExpirySeconds represents the default expiration time in seconds. )
Variables ¶
View Source
var (
AwsDebugCreds = false // AwsDebugCreds flag indicates whether credentials should be debugged
)
Functions ¶
func GenerateAuthToken ¶
GenerateAuthToken generates base64 encoded signed url as auth token from default credentials. Loads the IAM credentials from default credentials provider chain.
func GenerateAuthTokenFromCredentialsProvider ¶
func GenerateAuthTokenFromCredentialsProvider( ctx context.Context, region string, credentialsProvider aws.CredentialsProvider, ) (string, int64, error)
GenerateAuthTokenFromCredentialsProvider generates base64 encoded signed url as auth token by loading IAM credentials from an aws credentials provider
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.