Skip to content

Commit

Permalink
update for sdk changes (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpcraig authored Feb 26, 2025
1 parent 2ee1253 commit 6430558
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ package openldap
import (
"context"
"errors"
"github.com/hashicorp/vault/sdk/helper/automatedrotationutil"
"time"

"github.com/hashicorp/vault/sdk/helper/automatedrotationutil"

"github.com/hashicorp/vault/sdk/rotation"

"github.com/go-ldap/ldif"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.9
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2
github.com/hashicorp/vault/api v1.16.0
github.com/hashicorp/vault/sdk v0.15.0
github.com/hashicorp/vault/sdk v0.15.2
github.com/mitchellh/mapstructure v1.5.0
github.com/ory/dockertest/v3 v3.11.0
github.com/stretchr/testify v1.10.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ github.com/hashicorp/hcl v1.0.1-vault-5 h1:kI3hhbbyzr4dldA8UdTb7ZlVVlI2DACdCfz31
github.com/hashicorp/hcl v1.0.1-vault-5/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM=
github.com/hashicorp/vault/api v1.16.0 h1:nbEYGJiAPGzT9U4oWgaaB0g+Rj8E59QuHKyA5LhwQN4=
github.com/hashicorp/vault/api v1.16.0/go.mod h1:KhuUhzOD8lDSk29AtzNjgAu2kxRA9jL9NAbkFlqvkBA=
github.com/hashicorp/vault/sdk v0.15.0 h1:xNo1lL2shm0yE4coXNZkTV/6++2GfEh+/cCAfBjzEnA=
github.com/hashicorp/vault/sdk v0.15.0/go.mod h1:2Wj2tHIgfz0gNWgEPWBbCXFIiPrq96E8FTjPNV9J1Bc=
github.com/hashicorp/vault/sdk v0.15.2 h1:Rp5Yp4lyBhlWgq24ZVb2n/YN47RKOAvmx/jlMfS9ku4=
github.com/hashicorp/vault/sdk v0.15.2/go.mod h1:2Wj2tHIgfz0gNWgEPWBbCXFIiPrq96E8FTjPNV9J1Bc=
github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE=
github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8=
Expand Down
4 changes: 2 additions & 2 deletions path_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func (b *backend) configCreateUpdateOperation(ctx context.Context, req *logical.
// set up rotation after everything is fine
var rotOp string
if conf.ShouldDeregisterRotationJob() {
rotOp = "deregistration"
rotOp = rotation.PerformedDeregistration
deregisterReq := &rotation.RotationJobDeregisterRequest{
MountPoint: req.MountPoint,
ReqPath: req.Path,
Expand All @@ -214,7 +214,7 @@ func (b *backend) configCreateUpdateOperation(ctx context.Context, req *logical.
return logical.ErrorResponse("error de-registering rotation job: %s", err), nil
}
} else if conf.ShouldRegisterRotationJob() {
rotOp = "registration"
rotOp = rotation.PerformedRegistration
req := &rotation.RotationJobConfigureRequest{
Name: rootRotationJobName,
MountPoint: req.MountPoint,
Expand Down
4 changes: 2 additions & 2 deletions path_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,9 @@ func ldapResponseData(vals ...interface{}) map[string]interface{} {
"userdn": "",
"userfilter": "({{.UserAttr}}={{.Username}})",
"username_as_alias": false,
"rotation_period": 0,
"rotation_period": float64(0),
"rotation_schedule": "",
"rotation_window": 0,
"rotation_window": float64(0),
"disable_automated_rotation": false,
"enable_samaccountname_login": false,
}
Expand Down

0 comments on commit 6430558

Please sign in to comment.