Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-3262

AMQ_CREDENTIAL_SECRET fails to work as expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Major Major
    • None
    • AMQ 7.5.0.GA
    • None
    • None
    • Hide

      1. Create a broker application, based on the template for a basic broker.

      oc new-app --template=amq-broker-75-basic

      Or create the broker using GUI.

      2. Check Applications -> stateful sets -> Environment. It shows randomly created values.

      3. Go to Resources -> Secrets -> amq-credential-secret. It shows incorrect key-value pair.

      Show
      1. Create a broker application, based on the template for a basic broker. oc new-app --template=amq-broker-75-basic Or create the broker using GUI. 2. Check Applications -> stateful sets -> Environment. It shows randomly created values. 3. Go to Resources -> Secrets -> amq-credential-secret. It shows incorrect key-value pair.

      In AMQ 7.5's templates the values of the following environment variables are stored in a secret:

      AMQ_USER
      AMQ_PASSWORD
      AMQ_CLUSTER_USER (clustered broker deployments)
      AMQ_CLUSTER_PASSWORD (clustered broker deployments)
      AMQ_TRUSTSTORE_PASSWORD (SSL-enabled broker deployments)
      AMQ_KEYSTORE_PASSWORD (SSL-enabled broker deployments)
      

      According to template it should use below default value for variables if not defined :

        name: amq-broker-75-persistence-clustered-ssl
      objects:
      - apiVersion: v1
        kind: Secret
        metadata:
          annotations:
            description: Credentials used in broker config. Default values are admin(AMQ_USER and AMQ_PASSWORD), clusteruser(AMQ_CLUSTER_USER), clusterpassword(AMQ_CLUSTER_PASSWORD), password(AMQ_TRUSTORE_PASSWORD and AMQ_KEYSTORE_PASSWORD)
          name: amq-credential-secret
        type: Opaque
        data:
          ${AMQ_USER}: YWRtaW4=
          ${AMQ_PASSWORD}: YWRtaW4=
          ${AMQ_CLUSTER_USER}: Y2x1c3RlcnVzZXI=
          ${AMQ_CLUSTER_PASSWORD}: Y2x1c3RlcnBhc3N3b3Jk
          ${AMQ_TRUSTSTORE_PASSWORD}: cGFzc3dvcmQ=
          ${AMQ_KEYSTORE_PASSWORD}: cGFzc3dvcmQ=
      

      However it creates random value and does not use the default one.

      Also in amq-credential-secret table, the randomly generated value is used as key and its value is used as default values instead of variable name. Please refer attached screenshot to understand the issue.

      According to screenshot WebhRQ8G is key and its value is clusterpassword.

      However in actual case WebhRQ8G is randomly generated value for AMQ_CLUSTER_PASSWORD.

      Similarly rEDXFBf0 is key and admin is value. However AMQ__PASSWORD should be key and admin as value according to template.

      So basically there are two issues :

      1. It does not use default values defined in template.
      2. The amq-credential-secret table shows incorrect key-value pair.

              gaohoward Howard Gao
              rhn-support-vkamble Varsha Kamble
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: