mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-22 19:21:09 +01:00
* license: update headers to IBM Corp. * `make proto` * update offset because source file changed Signed-off-by: Ryan Cragun <me@ryan.ec> Co-authored-by: Ryan Cragun <me@ryan.ec>
30 lines
752 B
Go
30 lines
752 B
Go
// Copyright IBM Corp. 2016, 2025
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
//go:build !enterprise
|
|
|
|
package aws
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/hashicorp/vault/sdk/framework"
|
|
)
|
|
|
|
// AddStaticAssumeRoleFieldsEnt is a no-op for community edition
|
|
func AddStaticAssumeRoleFieldsEnt(fields map[string]*framework.FieldSchema) {
|
|
// no-op
|
|
}
|
|
|
|
func validateAssumeRoleFields(data *framework.FieldData, config *staticRoleEntry) error {
|
|
_, hasAssumeRoleARN := data.GetOk(paramAssumeRoleARN)
|
|
_, hasRoleSessionName := data.GetOk(paramRoleSessionName)
|
|
_, hasExternalID := data.GetOk(paramExternalID)
|
|
|
|
if hasAssumeRoleARN || hasRoleSessionName || hasExternalID {
|
|
return fmt.Errorf("cross-account static roles are only supported in Vault Enterprise")
|
|
}
|
|
|
|
return nil
|
|
}
|