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

Feature request: Support for external authentication mechanism #109

Closed
tetofonta opened this issue Oct 11, 2023 · 3 comments · Fixed by #110
Closed

Feature request: Support for external authentication mechanism #109

tetofonta opened this issue Oct 11, 2023 · 3 comments · Fixed by #110

Comments

@tetofonta
Copy link
Contributor

Trying to implement mutual tls authentication but there's no way to setup the client to use EXTERNAL as auth mechanism as defined in rabbitmq_auth_mechanism_ssl documentation.

Am I bad in searching inside the documentation or is this feature missing even if TlsAdaptor::with_client_auth does exists?

@gftea
Copy link
Owner

gftea commented Oct 11, 2023

The tls example use self signed Root certificate. Have you read through https://www.rabbitmq.com/ssl.html#peer-verification?
Meanwhile check the guidelines of using openssl for troubleshooting

@tetofonta
Copy link
Contributor Author

Yes i can get tls working and client certificate verification is ok, but the library still tries to authenticate the user with the username and password instead of specifiying EXTERNAL authentication and use rabbitmq_auth_mechanism_ssl.

Looking at the source code, External auth method is commented in the Authentication method struct at https://github.com/gftea/amqprs/blob/92da1bba56b9177876a6d20ecd8d74cbaa2cc9ad/amqprs/src/api/security.rs#L27C12-L27C12

@gftea
Copy link
Owner

gftea commented Oct 13, 2023

@tetofonta , I think it should be trival to change, add EXTERNAL variant, and have an api in SecurityCredentials to support this new auth mechanism
in get_response, just a empty string might work.
you like to create a PR to try out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants