vault/builtin/logical/aws/path_static_roles_ce.go
Vault Automation 0c6c13dd38
license: update headers to IBM Corp. (#10229) (#10233)
* 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>
2025-10-21 15:20:20 -06:00

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
}