Skip to content

Commit

Permalink
Adds ldap secrets to plugin registry and updates to v0.9.0 (#17152)
Browse files Browse the repository at this point in the history
* Adds ldap secrets to plugin registry and updates to v0.9.0

* adds changelog

* fix test
  • Loading branch information
austingebauer authored Sep 16, 2022
1 parent 70278c2 commit e1d6783
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
4 changes: 4 additions & 0 deletions changelog/17152.txt
Original file line number Diff line number Diff line change
@@ -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.
```
7 changes: 4 additions & 3 deletions command/secrets_enable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import (
"github.com/mitchellh/cli"
)

// logicalBackendAdjustmentFactor is set to 1 for the database backend
// which is a plugin but not found in go.mod files
var logicalBackendAdjustmentFactor = 1
// logicalBackendAdjustmentFactor is set to plus 1 for the database backend
// which is a plugin but not found in go.mod files, and minus 1 for the ldap
// and openldap secret backends which have the same underlying plugin.
var logicalBackendAdjustmentFactor = 1 - 1

func testSecretsEnableCommand(tb testing.TB) (*cli.MockUi, *SecretsEnableCommand) {
tb.Helper()
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ require (
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-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-testing-stepwise v0.1.2
github.com/hashicorp/vault/api v1.7.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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-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-openldap v0.8.0 h1:WJk5wRg861RlTd8xN6To/sRw3SnEUzqXpWml98GPZks=
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 h1:/6FQzNB4zjep7O14pkVOapwRJvnQ4gINGAc1Ss1IYg8=
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/go.mod h1:GzYAJYytgbNNyT3S7rspz1cLE53E1oajFbEtaDUlVGU=
github.com/hashicorp/vault-testing-stepwise v0.1.1/go.mod h1:3vUYn6D0ZadvstNO3YQQlIcp7u1a19MdoOC0NQ0yaOE=
Expand Down
5 changes: 3 additions & 2 deletions helper/builtinplugins/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
logicalKube "github.com/hashicorp/vault-plugin-secrets-kubernetes"
logicalKv "github.com/hashicorp/vault-plugin-secrets-kv"
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"
credAppId "github.com/hashicorp/vault/builtin/credential/app-id"
credAppRole "github.com/hashicorp/vault/builtin/credential/approle"
Expand Down Expand Up @@ -166,7 +166,8 @@ func newRegistry() *registry {
DeprecationStatus: consts.PendingRemoval,
},
"nomad": {Factory: logicalNomad.Factory},
"openldap": {Factory: logicalOpenLDAP.Factory},
"openldap": {Factory: logicalLDAP.Factory},
"ldap": {Factory: logicalLDAP.Factory},
"pki": {Factory: logicalPki.Factory},
"postgresql": {
Factory: logicalPostgres.Factory,
Expand Down
2 changes: 1 addition & 1 deletion helper/builtinplugins/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func Test_RegistryKeyCounts(t *testing.T) {
{
name: "number of secrets plugins",
pluginType: consts.PluginTypeSecrets,
want: 23,
want: 24,
},
}
for _, tt := range tests {
Expand Down

0 comments on commit e1d6783

Please sign in to comment.