Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VAULT-3008] Update RabbitMQ dependency and fix regression in UserInfo.Tags in v3.9 #12877

Merged
merged 2 commits into from Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion builtin/logical/rabbitmq/backend.go
Expand Up @@ -8,7 +8,7 @@ import (
cleanhttp "github.com/hashicorp/go-cleanhttp"
"github.com/hashicorp/vault/sdk/framework"
"github.com/hashicorp/vault/sdk/logical"
rabbithole "github.com/michaelklishin/rabbit-hole"
rabbithole "github.com/michaelklishin/rabbit-hole/v2"
)

// Factory creates and configures the backend
Expand Down
4 changes: 2 additions & 2 deletions builtin/logical/rabbitmq/backend_test.go
Expand Up @@ -12,7 +12,7 @@ import (
logicaltest "github.com/hashicorp/vault/helper/testhelpers/logical"
"github.com/hashicorp/vault/sdk/helper/jsonutil"
"github.com/hashicorp/vault/sdk/logical"
rabbithole "github.com/michaelklishin/rabbit-hole"
rabbithole "github.com/michaelklishin/rabbit-hole/v2"
"github.com/mitchellh/mapstructure"
)

Expand All @@ -37,7 +37,7 @@ func prepareRabbitMQTestContainer(t *testing.T) (func(), string) {

runner, err := docker.NewServiceRunner(docker.RunOptions{
ImageRepo: "rabbitmq",
ImageTag: "3.8-management",
ImageTag: "3-management",
ContainerName: "rabbitmq",
Ports: []string{"15672/tcp"},
})
Expand Down
2 changes: 1 addition & 1 deletion builtin/logical/rabbitmq/path_config_connection.go
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/hashicorp/vault/sdk/framework"
"github.com/hashicorp/vault/sdk/helper/template"
"github.com/hashicorp/vault/sdk/logical"
rabbithole "github.com/michaelklishin/rabbit-hole"
rabbithole "github.com/michaelklishin/rabbit-hole/v2"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions builtin/logical/rabbitmq/path_role_create.go
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/hashicorp/vault/sdk/framework"
"github.com/hashicorp/vault/sdk/helper/template"
"github.com/hashicorp/vault/sdk/logical"
rabbithole "github.com/michaelklishin/rabbit-hole"
rabbithole "github.com/michaelklishin/rabbit-hole/v2"
)

const (
Expand Down Expand Up @@ -93,7 +93,7 @@ func (b *backend) pathCredsRead(ctx context.Context, req *logical.Request, d *fr
// Register the generated credentials in the backend, with the RabbitMQ server
resp, err := client.PutUser(username, rabbithole.UserSettings{
Password: password,
Tags: role.Tags,
Tags: []string{role.Tags},
})
if err != nil {
return nil, fmt.Errorf("failed to create a new user with the generated credentials")
Expand Down
3 changes: 3 additions & 0 deletions changelog/12877.txt
@@ -0,0 +1,3 @@
```release-note:improvement
secrets/rabbitmq: Update dependency github.com/michaelklishin/rabbit-hole to v2 and resolve UserInfo.tags regression from RabbitMQ v3.9
```
3 changes: 1 addition & 2 deletions go.mod
Expand Up @@ -132,7 +132,7 @@ require (
github.com/lib/pq v1.10.3
github.com/mattn/go-colorable v0.1.11
github.com/mholt/archiver v3.1.1+incompatible
github.com/michaelklishin/rabbit-hole v0.0.0-20191008194146-93d9988f0cd5
github.com/michaelklishin/rabbit-hole/v2 v2.11.0
github.com/miekg/dns v1.1.40 // indirect
github.com/mitchellh/cli v1.1.2
github.com/mitchellh/copystructure v1.0.0
Expand Down Expand Up @@ -167,7 +167,6 @@ require (
github.com/sethvargo/go-limiter v0.7.1
github.com/shirou/gopsutil v3.21.5+incompatible
github.com/smartystreets/goconvey v1.6.4 // indirect
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271 // indirect
github.com/stretchr/testify v1.7.0
github.com/tidwall/pretty v1.0.1 // indirect
github.com/tklauser/go-sysconf v0.3.6 // indirect
Expand Down
47 changes: 28 additions & 19 deletions go.sum

Large diffs are not rendered by default.