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

RabbitMQMailQueue should not require administrative rights #4133

Open
2 tasks
chibenwa opened this issue Dec 11, 2020 · 4 comments
Open
2 tasks

RabbitMQMailQueue should not require administrative rights #4133

chibenwa opened this issue Dec 11, 2020 · 4 comments
Labels

Comments

@chibenwa
Copy link
Member

Why

Today, James requires management API rights to list mail queues.

Why?

  • List of mailqueues can be heterogeneous across the cluster (especially in case of specialized instances)
  • AMQP client do not support listing mail queues
  • Thus we ended up relying on the management plugin.

This, of course, is a security violation, as it might lead to right escalation, and might affect other tenants co-hosted on RabbitMQ.

20201211_115241.jpg

Definition of Done

  • James no longer require administrative rights
  • An ADR needs to be written about this

How

As deleting a mail queue is not a supporting implementation, we can rely on a Set<String> cassandra table containing the names of the mail queues in use.

James nodes can then rely on this to know if a mail queue is used or not.

Eventual consistency will be achieved between this cassandra view and the actual rabbitMQ content:

  • Register a created queue in Cassandra first, then create it in Rabbit.
  • Given a cassandra registered queue, not existing in rabbit, a james node restart configured with that queue will create the queue in rabbit.

20201211_115802.jpg

@chibenwa chibenwa added this to the into-production-kanban milestone Dec 11, 2020
@chibenwa
Copy link
Member Author

@Arsnael
Copy link
Member

Arsnael commented Dec 11, 2020

I'm not sure to understand theway to migrate with this... when you restart James with those changes, the queues in Cassandra will not exist yet.

Is it checking at the startup, adding them to Cassandra, then creating them in Rabbit if necessary then?

@rouazana
Copy link

should you provide a tool to automatically remove removed queues?

@chibenwa
Copy link
Member Author

should you provide a tool to automatically remove removed queues?

I checked, James itself never removes queues. Thus imo this is pointless.

@chibenwa chibenwa added the Epic label Dec 18, 2020
@chibenwa chibenwa removed this from the Sprint 4 milestone Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants