Adds ldap secrets to plugin registry and updates to v0.9.0 (#17152)
* Adds ldap secrets to plugin registry and updates to v0.9.0 * adds changelog * fix test
This commit is contained in:
parent
b136a7ecd8
commit
c1f51417b0
4
changelog/17152.txt
Normal file
4
changelog/17152.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
```release-note:feature
|
||||||
|
**LDAP Secrets Engine**: Adds the `ldap` secrets engine with service account check-out
|
||||||
|
functionality for all supported schemas.
|
||||||
|
```
|
|
@ -12,9 +12,10 @@ import (
|
||||||
"github.com/mitchellh/cli"
|
"github.com/mitchellh/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
// logicalBackendAdjustmentFactor is set to 1 for the database backend
|
// logicalBackendAdjustmentFactor is set to plus 1 for the database backend
|
||||||
// which is a plugin but not found in go.mod files
|
// which is a plugin but not found in go.mod files, and minus 1 for the ldap
|
||||||
var logicalBackendAdjustmentFactor = 1
|
// and openldap secret backends which have the same underlying plugin.
|
||||||
|
var logicalBackendAdjustmentFactor = 1 - 1
|
||||||
|
|
||||||
func testSecretsEnableCommand(tb testing.TB) (*cli.MockUi, *SecretsEnableCommand) {
|
func testSecretsEnableCommand(tb testing.TB) (*cli.MockUi, *SecretsEnableCommand) {
|
||||||
tb.Helper()
|
tb.Helper()
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -128,7 +128,7 @@ require (
|
||||||
github.com/hashicorp/vault-plugin-secrets-kubernetes v0.1.1
|
github.com/hashicorp/vault-plugin-secrets-kubernetes v0.1.1
|
||||||
github.com/hashicorp/vault-plugin-secrets-kv v0.12.1
|
github.com/hashicorp/vault-plugin-secrets-kv v0.12.1
|
||||||
github.com/hashicorp/vault-plugin-secrets-mongodbatlas v0.7.0
|
github.com/hashicorp/vault-plugin-secrets-mongodbatlas v0.7.0
|
||||||
github.com/hashicorp/vault-plugin-secrets-openldap v0.8.0
|
github.com/hashicorp/vault-plugin-secrets-openldap v0.9.0
|
||||||
github.com/hashicorp/vault-plugin-secrets-terraform v0.5.0
|
github.com/hashicorp/vault-plugin-secrets-terraform v0.5.0
|
||||||
github.com/hashicorp/vault-testing-stepwise v0.1.2
|
github.com/hashicorp/vault-testing-stepwise v0.1.2
|
||||||
github.com/hashicorp/vault/api v1.7.2
|
github.com/hashicorp/vault/api v1.7.2
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -1153,8 +1153,8 @@ github.com/hashicorp/vault-plugin-secrets-kv v0.12.1 h1:Nef6kmnCQQRRdYzA52diUnx4
|
||||||
github.com/hashicorp/vault-plugin-secrets-kv v0.12.1/go.mod h1:9V2Ecim3m/qw+YAQelUeFADqZ1GVo8xwoLqfKsqh9pI=
|
github.com/hashicorp/vault-plugin-secrets-kv v0.12.1/go.mod h1:9V2Ecim3m/qw+YAQelUeFADqZ1GVo8xwoLqfKsqh9pI=
|
||||||
github.com/hashicorp/vault-plugin-secrets-mongodbatlas v0.7.0 h1:EDyX/utLxEKGETeGAyWe4QNoKwIfCw6VpEzKLb8zudc=
|
github.com/hashicorp/vault-plugin-secrets-mongodbatlas v0.7.0 h1:EDyX/utLxEKGETeGAyWe4QNoKwIfCw6VpEzKLb8zudc=
|
||||||
github.com/hashicorp/vault-plugin-secrets-mongodbatlas v0.7.0/go.mod h1:PLx2vxXukfsKsDRo/PlG4fxmJ1d+H2h82wT3vf4buuI=
|
github.com/hashicorp/vault-plugin-secrets-mongodbatlas v0.7.0/go.mod h1:PLx2vxXukfsKsDRo/PlG4fxmJ1d+H2h82wT3vf4buuI=
|
||||||
github.com/hashicorp/vault-plugin-secrets-openldap v0.8.0 h1:WJk5wRg861RlTd8xN6To/sRw3SnEUzqXpWml98GPZks=
|
github.com/hashicorp/vault-plugin-secrets-openldap v0.9.0 h1:/6FQzNB4zjep7O14pkVOapwRJvnQ4gINGAc1Ss1IYg8=
|
||||||
github.com/hashicorp/vault-plugin-secrets-openldap v0.8.0/go.mod h1:XC7R76jZiuD50ENel+I1/Poz5phaEQg9d6Dko8DF3Ts=
|
github.com/hashicorp/vault-plugin-secrets-openldap v0.9.0/go.mod h1:o7mF9tWgDkAD5OvvXWM3bOCqN+n/cCpaMm1CrEUZkHc=
|
||||||
github.com/hashicorp/vault-plugin-secrets-terraform v0.5.0 h1:NbQW1Z2+oIn8v4jjqLBbxDas0Uw0bzV74da4BQsdRow=
|
github.com/hashicorp/vault-plugin-secrets-terraform v0.5.0 h1:NbQW1Z2+oIn8v4jjqLBbxDas0Uw0bzV74da4BQsdRow=
|
||||||
github.com/hashicorp/vault-plugin-secrets-terraform v0.5.0/go.mod h1:GzYAJYytgbNNyT3S7rspz1cLE53E1oajFbEtaDUlVGU=
|
github.com/hashicorp/vault-plugin-secrets-terraform v0.5.0/go.mod h1:GzYAJYytgbNNyT3S7rspz1cLE53E1oajFbEtaDUlVGU=
|
||||||
github.com/hashicorp/vault-testing-stepwise v0.1.1/go.mod h1:3vUYn6D0ZadvstNO3YQQlIcp7u1a19MdoOC0NQ0yaOE=
|
github.com/hashicorp/vault-testing-stepwise v0.1.1/go.mod h1:3vUYn6D0ZadvstNO3YQQlIcp7u1a19MdoOC0NQ0yaOE=
|
||||||
|
|
|
@ -24,7 +24,7 @@ import (
|
||||||
logicalKube "github.com/hashicorp/vault-plugin-secrets-kubernetes"
|
logicalKube "github.com/hashicorp/vault-plugin-secrets-kubernetes"
|
||||||
logicalKv "github.com/hashicorp/vault-plugin-secrets-kv"
|
logicalKv "github.com/hashicorp/vault-plugin-secrets-kv"
|
||||||
logicalMongoAtlas "github.com/hashicorp/vault-plugin-secrets-mongodbatlas"
|
logicalMongoAtlas "github.com/hashicorp/vault-plugin-secrets-mongodbatlas"
|
||||||
logicalOpenLDAP "github.com/hashicorp/vault-plugin-secrets-openldap"
|
logicalLDAP "github.com/hashicorp/vault-plugin-secrets-openldap"
|
||||||
logicalTerraform "github.com/hashicorp/vault-plugin-secrets-terraform"
|
logicalTerraform "github.com/hashicorp/vault-plugin-secrets-terraform"
|
||||||
credAppId "github.com/hashicorp/vault/builtin/credential/app-id"
|
credAppId "github.com/hashicorp/vault/builtin/credential/app-id"
|
||||||
credAppRole "github.com/hashicorp/vault/builtin/credential/approle"
|
credAppRole "github.com/hashicorp/vault/builtin/credential/approle"
|
||||||
|
@ -166,7 +166,8 @@ func newRegistry() *registry {
|
||||||
DeprecationStatus: consts.PendingRemoval,
|
DeprecationStatus: consts.PendingRemoval,
|
||||||
},
|
},
|
||||||
"nomad": {Factory: logicalNomad.Factory},
|
"nomad": {Factory: logicalNomad.Factory},
|
||||||
"openldap": {Factory: logicalOpenLDAP.Factory},
|
"openldap": {Factory: logicalLDAP.Factory},
|
||||||
|
"ldap": {Factory: logicalLDAP.Factory},
|
||||||
"pki": {Factory: logicalPki.Factory},
|
"pki": {Factory: logicalPki.Factory},
|
||||||
"postgresql": {
|
"postgresql": {
|
||||||
Factory: logicalPostgres.Factory,
|
Factory: logicalPostgres.Factory,
|
||||||
|
|
|
@ -91,7 +91,7 @@ func Test_RegistryKeyCounts(t *testing.T) {
|
||||||
{
|
{
|
||||||
name: "number of secrets plugins",
|
name: "number of secrets plugins",
|
||||||
pluginType: consts.PluginTypeSecrets,
|
pluginType: consts.PluginTypeSecrets,
|
||||||
want: 23,
|
want: 24,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
|
|
Loading…
Reference in a new issue