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

user roles have to be unique #208

Closed
wants to merge 1 commit into from
Closed

Conversation

4nt01ne
Copy link

@4nt01ne 4nt01ne commented Jan 10, 2025

We have more than 100 roles and about 60 users.
Same roles are allowed on multiple security-setting match.
If one role is configured more than once in the activemq_roles it is duplicated each time in artemis-roles.properties.

This PR is a suggestion to remove duplicate roles.

FYI: this PR is from my private account behind AWD09. We have migrated to GH Enterprise and I am not allowed to open issues or fork repos on my pro account anymore.
We are using the amq_broker playbook.

STEPS TO REPRODUCE
---

- name: reproduce roles generation
  hosts: localhost
  vars:
    amq_broker_users:
      - user: one
        password: abc
        roles: [ role_a ]
      - user: two
        password: abc
        roles: [ role_a, role_b ]
    amq_broker_roles:
      - match: a.queue.*
        name: role_a
        permissions: [ createAddress, createDurableQueue, createNonDurableQueue, deleteAddress, deleteDurableQueue, deleteNonDurableQueue, manage, send ]
      - match: an.other.queue.*
        name: role_b
        permissions: [ createAddress, createDurableQueue, createNonDurableQueue, deleteAddress, deleteDurableQueue, deleteNonDurableQueue, manage, send ]
      - match: a.last.queue.*
        name: role_a
        permissions: [ manage, send ]
  tasks:
    - name: Configure roles
      ansible.builtin.template:
        src: artemis-roles.properties.j2
        dest: artemis-roles.properties

The content of artemis-roles.properties is

role_a=one,two
role_b=two
role_a=one,two

'role_a' is present 2 times

@RanabirChakraborty
Copy link
Member

@4nt01ne is there any reason why you have drafted the PR and otherwise? I'll try to send the PR from my end, and also, a best practice is to fork the repo and send the PR from a different branch.

@4nt01ne
Copy link
Author

4nt01ne commented Mar 1, 2025

Hi @RanabirChakraborty,
I’ve drafted this to reference my issue: #209.

Feel free to send the PR from your end—just make sure to link it to my issue.

@RanabirChakraborty
Copy link
Member

Closed the PR by #217

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 this pull request may close these issues.

2 participants