apiVersion: broker.amq.io/v1alpha1
kind: ActiveMQArtemisSecurity
metadata:
  name: amq-broker-security
spec:
  applyToCrNames:
    - "*"
  loginModules:
    propertiesLoginModules:
      - name: "prop-module"
        users:
          - name: bob
            password: mysecret
            roles:
              - userRole
          - name: alice
            password: mysecret
            roles:
              - userRole
  securityDomains:
    brokerDomain:
      name: "activemq"
      loginModules:
        - name: "prop-module"
          flag: "sufficient"
  securitySettings:
    broker:
      - match: "#"
        permissions:
          - operationType: "createNonDurableQueue"
            roles:
              - admin
          - operationType: "deleteNonDurableQueue"
            roles:
              - admin
          - operationType: "createDurableQueue"
            roles:
              - admin
          - operationType: "deleteDurableQueue"
            roles:
              - admin
          - operationType: "createAddress"
            roles:
              - admin
          - operationType: "deleteAddress"
            roles:
              - admin
          - operationType: "consume"
            roles:
              - admin
              - userRole
          - operationType: "browse"
            roles:
              - admin
              - userRole
          - operationType: "send"
            roles:
              - admin
              - userRole
          - operationType: "manage"
            roles:
              - admin
              - userRole
