Skip to content

feature #37002 [Amqp] Add amqps support #37518

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

Closed
wants to merge 1 commit into from
Closed

feature #37002 [Amqp] Add amqps support #37518

wants to merge 1 commit into from

Conversation

vasilvestre
Copy link

@vasilvestre vasilvestre commented Jul 7, 2020

Q A
Branch? master
Bug fix? no
New feature? yes
Deprecations? no
Tickets Fix #37002
License MIT
Doc PR symfony/symfony-docs#... TODO

Actually ttl parameter seem to be used to initialize amqp secured exception, but DSN seems to do not support amqps alone. Would like to add ca_cert cert and pem files parameter through dsn.

@vasilvestre vasilvestre requested a review from sroze as a code owner July 7, 2020 19:41
@vasilvestre vasilvestre marked this pull request as draft July 7, 2020 19:41
@nicolas-grekas nicolas-grekas added this to the next milestone Jul 8, 2020
@fabpot
Copy link
Member

fabpot commented Aug 17, 2020

@vasilvestre Is it still a draft?

@vasilvestre
Copy link
Author

@vasilvestre Is it still a draft?

Yeah totally, I had no time to work on it and I'm definitly not sure I'm on the good way. I do not really know the AMQP protocol that well and I do not even talk about AMQPS.. Anyone could open another PR or continue this one.

@fabpot
Copy link
Member

fabpot commented Aug 20, 2020

Thanks for the fast reply. I'm going to close then as we don't keep draft PR around. If someone wants to take over, it will still be referenced in the ticket.

@fabpot fabpot closed this Aug 20, 2020
@vasilvestre
Copy link
Author

vasilvestre commented Aug 24, 2020

Thanks for the fast reply. I'm going to close then as we don't keep draft PR around. If someone wants to take over, it will still be referenced in the ticket.

Out of this, which direction should this PR take?
I stopped working on this because I didn't know how to work on this PR. I will try to be as clear as possible by keeping updated on this.

Cases (to cover)

Case 1 (simple):
I want to set up my app with a locally installed amqp broker supporting SSL. No auth is needed, no vhost, only SSL files located in /etc/ssl/{cafile,cert.pem,private_key.pem}.

Case 2 (complex):
I use a special port, special files locations for SSL. I wan't to pass it through DSN. eg : 'amqps://cacert=/tpm/ssl/cafile&cert=/tmp/ssl/cert.pem&key=/tmp/ssl/private_key.pem

Questions (I have to anyone able to answer that !)

  1. Actually AmqpTransportFactory use supports function to see if 'amqp://' is contained in dsn string and accept cacert + cert + key argument to use SSL
    How are we supposed to cover AMQPS's case in your opinion?

Here's my opinion on this so far, I've decided to use default value for SSL if nothing is passed, the first goal is to cover the case 1 (the most simple).

Observations

I think this PR should aim on :

  • Having correct defaults ssl values in case of 'amqps://' eg : case 1
  • Being able to pass ca_cert, cert and key file paths and verify argument. eg : case 2
  • Test

@vasilvestre vasilvestre mentioned this pull request Aug 31, 2020
6 tasks
@nicolas-grekas nicolas-grekas modified the milestones: next, 5.2 Oct 5, 2020
@ajcerqueti
Copy link

ajcerqueti commented Sep 20, 2021

Are there any plans on backporting the changes done here: #38007 to Symfony 4.4? Is that something I can create a PR for if no-one is currently planning on doing so? 4.4 still has a relatively long life ahead of it, and there's currently no way of getting AMQPS working as far as I can tell. Happy to take this on, seems perfectly transferable to the existing classes?

@vasilvestre
Copy link
Author

Are there any plans on backporting the changes done here: #38007 to Symfony 4.4? Is that something I can create a PR for if no-one is currently planning on doing so? 4.4 still has a relatively long life ahead of it, and there's currently no way of getting AMQPS working as far as I can tell. Happy to take this on, seems perfectly transferable to the existing classes?

AFAIK, no backport is supported in Symfony. But as the classes aren't final, you can override them and use your own implementation that supports AMQPS IMO

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

Successfully merging this pull request may close these issues.

Add (amqp) ssl capacity to messenger DSN
5 participants