You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
487 B
15 lines
487 B
package s3api
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
)
|
|
|
|
// ValidateTrustPolicyForPrincipal validates if a principal is allowed to assume a role
|
|
// Delegates to the IAM integration if available
|
|
func (iam *IdentityAccessManagement) ValidateTrustPolicyForPrincipal(ctx context.Context, roleArn, principalArn string) error {
|
|
if iam.iamIntegration != nil {
|
|
return iam.iamIntegration.ValidateTrustPolicyForPrincipal(ctx, roleArn, principalArn)
|
|
}
|
|
return fmt.Errorf("IAM integration not available")
|
|
}
|