Giter VIP home page Giter VIP logo

Comments (8)

jandelgado avatar jandelgado commented on June 8, 2024

When using mTLS, it is not possible to also specify credentials in the RabbitMQ connection string (admin:secret). You can test rabtap with mTLS locally with the provided integration test:

First create keys and certificates:

$ cd inttest/pki
$ ./mkcerts.sh

Then start RabbitMQ with mTLS configured:

$ cd ../rabbitmq
$ docker-compose up

In a second terminal no try the following:

$ cd inttest/pki/certs
$ echo hello | rabtap --uri amqps://localhost:5671 pub --exchange amq.fanout \
                                  --tls-key-file testuser.key \
                                  --tls-cert-file testuser.crt \
                                  --tls-ca-file ca.crt  

from rabtap.

jandelgado avatar jandelgado commented on June 8, 2024

@uqix could you try connecting as desribed?

from rabtap.

uqix avatar uqix commented on June 8, 2024

We need mTLS(not EXTERNAL auth mechanism) and username/password(PLAIN) at the same time

from rabtap.

jandelgado avatar jandelgado commented on June 8, 2024

Ok, I can reproduce the problem. In order to get the error, the RabbitMQ configuration needs to something like

auth_mechanisms.1 = PLAIN       <======
#auth_mechanisms.2 = EXTERNAL

listeners.ssl.default = 5671
ssl_options.cacertfile = /certs/ca.crt
ssl_options.certfile   = /certs/server.crt
ssl_options.keyfile    = /certs/server.key
ssl_options.verify     = verify_peer   <====
ssl_options.fail_if_no_peer_cert = true   <====

I'll see how to fix that

from rabtap.

jandelgado avatar jandelgado commented on June 8, 2024

@uqix I've change authentication so that explicitly provided credentials will always be used with PLAIN auth. You can install the version with (will be installed in $GOPATH/bin/go):

$ go install github.com/jandelgado/rabtap/cmd/rabtap@998ec440860d8daf21c7656ae94c443bb50ca358

Does it solve your problen?

from rabtap.

uqix avatar uqix commented on June 8, 2024

I'm not a go developer, help needed here:

brew install go 
go install github.com/jandelgado/rabtap/cmd/rabtap@998ec440860d8daf21c7656ae94c443bb50ca358

error log:

go: downloading github.com/jandelgado/rabtap v0.0.0-20220605192011-998ec440860d
go: downloading github.com/Knetic/govaluate v0.0.0-20171022003610-9aa49832a739
go: downloading github.com/fatih/color v1.7.0
go: downloading github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
go: downloading github.com/mattn/go-colorable v0.1.1
go: downloading github.com/rabbitmq/amqp091-go v1.3.4
go: downloading github.com/sirupsen/logrus v1.3.0
go: downloading golang.org/x/sync v0.0.0-20190423024810-112230192c58
go: downloading github.com/google/uuid v1.1.1
go: downloading golang.org/x/net v0.0.0-20190620200207-3b0461eec859
go: downloading gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637
go: downloading github.com/mattn/go-isatty v0.0.6
go: downloading golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
go: downloading golang.org/x/sys v0.0.0-20190412213103-97732733099d
# golang.org/x/sys/unix
go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:28:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:43:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:59:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:75:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:90:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:105:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:121:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:136:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:151:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:166:3: //go:linkname must refer to declared function or variable
go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:166:3: too many errors

from rabtap.

jandelgado avatar jandelgado commented on June 8, 2024

@uqix you can try to download a snapshot-binary here: https://github.com/jandelgado/rabtap/suites/6832720947/artifacts/263278437

from rabtap.

uqix avatar uqix commented on June 8, 2024

Tested and fixed, thanks

from rabtap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.