login_config:
  - name: {{ gssapi_sasl_login_config_scope }}
    modules:
    - class_name: "com.{{ jvm_vendor_short_name }}.security.auth.module.Krb5LoginModule"
      flag: sufficient
      properties:
      - storeKey: true
      - keyTab: {{ gssapi_broker_keytab_path }}
      - useTicketCache: false
      - debug: true
      - {{ jvm_vendor_gssapi_is_initiator_key | default('isInitiator') }}: {{ jvm_vendor_gssapi_is_initiator_value | default('false') }}
      - useKeyTab: true
      - principal: {{ gssapi_broker_principal }}

  - name: activemq
    modules:
    - class_name: org.apache.activemq.artemis.spi.core.security.jaas.Krb5LoginModule
      flag: optional
      properties:
        - debug: true

    - class_name: org.apache.activemq.artemis.spi.core.security.jaas.PropertiesLoginModule
      flag: sufficient
      properties:
      - debug: true
      - reload: true
      - org.apache.activemq.jaas.properties.user: "artemis-users.properties"
      - org.apache.activemq.jaas.properties.role: "artemis-roles.properties"
