From 00c1acf0e1d942704cfd60ddd0ca8f0ffc7f2682 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Thu, 25 Feb 2021 13:00:00 -0700 Subject: [PATCH] Vendor OpenLDAP v0.4.0 (#10996) --- changelog/10996.txt | 3 +++ go.mod | 2 +- go.sum | 4 ++-- .../vault-plugin-secrets-openldap/path_dynamic_creds.go | 2 +- .../vault-plugin-secrets-openldap/path_dynamic_roles.go | 2 +- .../vault-plugin-secrets-openldap/path_static_roles.go | 3 +-- vendor/modules.txt | 2 +- 7 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 changelog/10996.txt diff --git a/changelog/10996.txt b/changelog/10996.txt new file mode 100644 index 000000000..e79f99b8a --- /dev/null +++ b/changelog/10996.txt @@ -0,0 +1,3 @@ +```release-note:feature +secrets/openldap: Added dynamic roles to OpenLDAP similar to the combined database engine +``` diff --git a/go.mod b/go.mod index 2abcb4f92..7204670fd 100644 --- a/go.mod +++ b/go.mod @@ -95,7 +95,7 @@ require ( github.com/hashicorp/vault-plugin-secrets-gcpkms v0.7.0 github.com/hashicorp/vault-plugin-secrets-kv v0.7.0 github.com/hashicorp/vault-plugin-secrets-mongodbatlas v0.2.0 - github.com/hashicorp/vault-plugin-secrets-openldap v0.1.6-0.20210201204049-4f0f91977798 + github.com/hashicorp/vault-plugin-secrets-openldap v0.4.0 github.com/hashicorp/vault-plugin-secrets-terraform v0.1.0 github.com/hashicorp/vault/api v1.0.5-0.20210210214158-405eced08457 github.com/hashicorp/vault/sdk v0.1.14-0.20210204230556-cf85a862b7c6 diff --git a/go.sum b/go.sum index 0aeb32e3d..b616209f3 100644 --- a/go.sum +++ b/go.sum @@ -685,8 +685,8 @@ github.com/hashicorp/vault-plugin-secrets-kv v0.7.0 h1:Sq5CmKWxQu+MtO6AXYM+STPHG github.com/hashicorp/vault-plugin-secrets-kv v0.7.0/go.mod h1:B/Cybh5aVF7LNAMHwVBxY8t7r2eL0C6HVGgTyP4nKK4= github.com/hashicorp/vault-plugin-secrets-mongodbatlas v0.2.0 h1:uTtKxt5qfwTj6PqwnwPdU0fg1lIaaoqTtauuNpI2Epc= github.com/hashicorp/vault-plugin-secrets-mongodbatlas v0.2.0/go.mod h1:JOqn2mWJJbTp9NaC0CSCc3q5HQA99LfeSqgpC3YS+oA= -github.com/hashicorp/vault-plugin-secrets-openldap v0.1.6-0.20210201204049-4f0f91977798 h1:G3S7rF/zHfQnYZglk+WvjzBuJyjQAnP0xdGL/4i3jzM= -github.com/hashicorp/vault-plugin-secrets-openldap v0.1.6-0.20210201204049-4f0f91977798/go.mod h1:GiFI8Bxwx3+fn0A3SyVp9XdYQhm3cOgN8GzwKxyJ9So= +github.com/hashicorp/vault-plugin-secrets-openldap v0.4.0 h1:av7AhykZLA/lSQpxStGP+bGdNNuAEhAejZdBVrzw3p0= +github.com/hashicorp/vault-plugin-secrets-openldap v0.4.0/go.mod h1:GiFI8Bxwx3+fn0A3SyVp9XdYQhm3cOgN8GzwKxyJ9So= github.com/hashicorp/vault-plugin-secrets-terraform v0.1.0 h1:g+r6TKJsD2aM0kUNWByuL4ffZTbZH/xO/sqDwTltOu0= github.com/hashicorp/vault-plugin-secrets-terraform v0.1.0/go.mod h1:7r/0t51X/ZtSRh/TjBk7gCm1CUMk50aqLAx811OsGQ8= github.com/hashicorp/vic v1.5.1-0.20190403131502-bbfe86ec9443 h1:O/pT5C1Q3mVXMyuqg7yuAWUg/jMZR1/0QTzTRdNR6Uw= diff --git a/vendor/github.com/hashicorp/vault-plugin-secrets-openldap/path_dynamic_creds.go b/vendor/github.com/hashicorp/vault-plugin-secrets-openldap/path_dynamic_creds.go index 2c04e7592..17ba997ad 100644 --- a/vendor/github.com/hashicorp/vault-plugin-secrets-openldap/path_dynamic_creds.go +++ b/vendor/github.com/hashicorp/vault-plugin-secrets-openldap/path_dynamic_creds.go @@ -68,7 +68,7 @@ func (b *backend) pathDynamicCredsRead(ctx context.Context, req *logical.Request merr := multierror.Append(fmt.Errorf("failed to create user: %w", err)) _, err = b.executeLDIF(config.LDAP, dRole.RollbackLDIF, templateData, true) if err != nil { - merr = multierror.Append(fmt.Errorf("failed to roll back user creation: %w", err)) + merr = multierror.Append(merr, fmt.Errorf("failed to roll back user creation: %w", err)) } return nil, merr } diff --git a/vendor/github.com/hashicorp/vault-plugin-secrets-openldap/path_dynamic_roles.go b/vendor/github.com/hashicorp/vault-plugin-secrets-openldap/path_dynamic_roles.go index aec5d4002..fad2b799f 100644 --- a/vendor/github.com/hashicorp/vault-plugin-secrets-openldap/path_dynamic_roles.go +++ b/vendor/github.com/hashicorp/vault-plugin-secrets-openldap/path_dynamic_roles.go @@ -19,7 +19,7 @@ const ( secretCredsType = "creds" dynamicRolePath = "role/" - dynamicCredPath = "cred/" + dynamicCredPath = "creds/" ) func (b *backend) pathDynamicRoles() []*framework.Path { diff --git a/vendor/github.com/hashicorp/vault-plugin-secrets-openldap/path_static_roles.go b/vendor/github.com/hashicorp/vault-plugin-secrets-openldap/path_static_roles.go index 407753e18..4ff93ff22 100644 --- a/vendor/github.com/hashicorp/vault-plugin-secrets-openldap/path_static_roles.go +++ b/vendor/github.com/hashicorp/vault-plugin-secrets-openldap/path_static_roles.go @@ -3,7 +3,6 @@ package openldap import ( "context" "fmt" - "path" "time" "github.com/hashicorp/vault/sdk/framework" @@ -19,7 +18,7 @@ const ( func (b *backend) pathListStaticRoles() []*framework.Path { return []*framework.Path{ { - Pattern: path.Join(staticRolePath, framework.OptionalParamRegex("prefix")), + Pattern: staticRolePath + "?$", Operations: map[logical.Operation]framework.OperationHandler{ logical.ListOperation: &framework.PathOperation{ Callback: b.pathStaticRoleList, diff --git a/vendor/modules.txt b/vendor/modules.txt index fdfc31841..2d210c001 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -591,7 +591,7 @@ github.com/hashicorp/vault-plugin-secrets-gcpkms github.com/hashicorp/vault-plugin-secrets-kv # github.com/hashicorp/vault-plugin-secrets-mongodbatlas v0.2.0 github.com/hashicorp/vault-plugin-secrets-mongodbatlas -# github.com/hashicorp/vault-plugin-secrets-openldap v0.1.6-0.20210201204049-4f0f91977798 +# github.com/hashicorp/vault-plugin-secrets-openldap v0.4.0 github.com/hashicorp/vault-plugin-secrets-openldap github.com/hashicorp/vault-plugin-secrets-openldap/client # github.com/hashicorp/vault-plugin-secrets-terraform v0.1.0