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

Topic permissions: add non-bulk options #156

Open
abompard opened this issue May 9, 2023 · 0 comments
Open

Topic permissions: add non-bulk options #156

abompard opened this issue May 9, 2023 · 0 comments

Comments

@abompard
Copy link
Contributor

abompard commented May 9, 2023

SUMMARY

Currently, the topic_permissions list of dicts in rabbitmq_user works like the permissions list of dicts: all the permissions must be defined, for all vhosts.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

rabbitmq_user

ADDITIONAL INFORMATION

It would be very practical if we could define the topic_permissions for a particular vhost without touching those defined in other vhosts. At the moment, using topic_permissions with the non-bulk options (vhost, read_priv, write_priv) is confusing because the latter option only apply to the specified vhost, while topic_permissions apply to all vhosts.

- name: access in /vhost1
  rabbitmq_user:
    user: "username"
    vhost: /vhost1
    configure_priv: .*
    read_priv: .*
    write_priv: .*
    topic_permissions:
      - vhost: /vhost1
        read_priv: .*
        write_priv: "^(amq\\.topic)|({username}.*)$"

# This will clear the previously defined topic permissions in /vhost1, although it should only apply to /vhost2
- name: access in /vhost2
  rabbitmq_user:
    user: "username"
    vhost: /vhost2
    configure_priv: .*
    read_priv: .*
    write_priv: .*
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

No branches or pull requests

1 participant