Vendor OpenLDAP v0.4.0 (#10996)

This commit is contained in:
Michael Golowka 2021-02-25 13:00:00 -07:00 committed by GitHub
parent eb891db72d
commit 00c1acf0e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 8 deletions

3
changelog/10996.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:feature
secrets/openldap: Added dynamic roles to OpenLDAP similar to the combined database engine
```

2
go.mod
View File

@ -95,7 +95,7 @@ require (
github.com/hashicorp/vault-plugin-secrets-gcpkms v0.7.0 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-kv v0.7.0
github.com/hashicorp/vault-plugin-secrets-mongodbatlas v0.2.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-plugin-secrets-terraform v0.1.0
github.com/hashicorp/vault/api v1.0.5-0.20210210214158-405eced08457 github.com/hashicorp/vault/api v1.0.5-0.20210210214158-405eced08457
github.com/hashicorp/vault/sdk v0.1.14-0.20210204230556-cf85a862b7c6 github.com/hashicorp/vault/sdk v0.1.14-0.20210204230556-cf85a862b7c6

4
go.sum
View File

@ -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-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 h1:uTtKxt5qfwTj6PqwnwPdU0fg1lIaaoqTtauuNpI2Epc=
github.com/hashicorp/vault-plugin-secrets-mongodbatlas v0.2.0/go.mod h1:JOqn2mWJJbTp9NaC0CSCc3q5HQA99LfeSqgpC3YS+oA= 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.4.0 h1:av7AhykZLA/lSQpxStGP+bGdNNuAEhAejZdBVrzw3p0=
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/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 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/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= github.com/hashicorp/vic v1.5.1-0.20190403131502-bbfe86ec9443 h1:O/pT5C1Q3mVXMyuqg7yuAWUg/jMZR1/0QTzTRdNR6Uw=

View File

@ -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)) merr := multierror.Append(fmt.Errorf("failed to create user: %w", err))
_, err = b.executeLDIF(config.LDAP, dRole.RollbackLDIF, templateData, true) _, err = b.executeLDIF(config.LDAP, dRole.RollbackLDIF, templateData, true)
if err != nil { 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 return nil, merr
} }

View File

@ -19,7 +19,7 @@ const (
secretCredsType = "creds" secretCredsType = "creds"
dynamicRolePath = "role/" dynamicRolePath = "role/"
dynamicCredPath = "cred/" dynamicCredPath = "creds/"
) )
func (b *backend) pathDynamicRoles() []*framework.Path { func (b *backend) pathDynamicRoles() []*framework.Path {

View File

@ -3,7 +3,6 @@ package openldap
import ( import (
"context" "context"
"fmt" "fmt"
"path"
"time" "time"
"github.com/hashicorp/vault/sdk/framework" "github.com/hashicorp/vault/sdk/framework"
@ -19,7 +18,7 @@ const (
func (b *backend) pathListStaticRoles() []*framework.Path { func (b *backend) pathListStaticRoles() []*framework.Path {
return []*framework.Path{ return []*framework.Path{
{ {
Pattern: path.Join(staticRolePath, framework.OptionalParamRegex("prefix")), Pattern: staticRolePath + "?$",
Operations: map[logical.Operation]framework.OperationHandler{ Operations: map[logical.Operation]framework.OperationHandler{
logical.ListOperation: &framework.PathOperation{ logical.ListOperation: &framework.PathOperation{
Callback: b.pathStaticRoleList, Callback: b.pathStaticRoleList,

2
vendor/modules.txt vendored
View File

@ -591,7 +591,7 @@ github.com/hashicorp/vault-plugin-secrets-gcpkms
github.com/hashicorp/vault-plugin-secrets-kv github.com/hashicorp/vault-plugin-secrets-kv
# github.com/hashicorp/vault-plugin-secrets-mongodbatlas v0.2.0 # github.com/hashicorp/vault-plugin-secrets-mongodbatlas v0.2.0
github.com/hashicorp/vault-plugin-secrets-mongodbatlas 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
github.com/hashicorp/vault-plugin-secrets-openldap/client github.com/hashicorp/vault-plugin-secrets-openldap/client
# github.com/hashicorp/vault-plugin-secrets-terraform v0.1.0 # github.com/hashicorp/vault-plugin-secrets-terraform v0.1.0