Add experiment to enable the KMIP client API (#11981) (#12017)

* Make VAULT_EXPERIMENTS work as feature flags.

Make method IsFlagEnabled treat experiments as feature flags so that they
are accessible to plugins.

* Add experiment kmip.client_api.alpha1.

This experiment enables the KMIP client and template API endpoints.

* Use IsExperimentEnabled rather than ValidExperiments.

* Document TestCore_IsFlagEnabled.

Co-authored-by: Victor Rodriguez <vrizo@hashicorp.com>
This commit is contained in:
Vault Automation 2026-02-13 10:14:36 -05:00 committed by GitHub
parent 83515dc8e2
commit b60d15a07c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,8 +9,10 @@ const (
VaultExperimentCoreAuditEventsAlpha1 = "core.audit.events.alpha1"
VaultExperimentSecretsImport = "secrets.import.alpha1"
// Unused experiments. We keep them so that we don't break users who include them in their
// flags or configs, but they no longer have any effect.
// VaultExperimentKmipClientApi enables the experimental KMIP client
// and template API endpoints. See VAULT-41117.
VaultExperimentKmipClientApi = "kmip.client_api.alpha1"
VaultExperimentEventsAlpha1 = "events.alpha1"
)
@ -18,8 +20,11 @@ var validExperiments = []string{
VaultExperimentEventsAlpha1,
VaultExperimentCoreAuditEventsAlpha1,
VaultExperimentSecretsImport,
VaultExperimentKmipClientApi,
}
// Unused experiments. We keep them so that we don't break users who include them in their
// flags or configs, but they no longer have any effect.
var unusedExperiments = []string{
VaultExperimentEventsAlpha1,
}