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

Bug - can't configure MQ console to use OIDC, webuser.xml.tpl isn't rendered. #532

Open
CLIN42 opened this issue Sep 6, 2023 · 0 comments

Comments

@CLIN42
Copy link

CLIN42 commented Sep 6, 2023

version: 9.3.3.1
platform: Azure Kubernetes Service

Description

We're trying to configure OIDC for MQ console as per the template at here . The configurations are added as environment variable as below as part of StatefulSet

env:
- name: MQ_BETA_ENABLE_SSO
  value: "1"
- name: MQ_OIDC_CLIENT_ID
  value: "our client id on Azure AD"
- name: MQ_OIDC_CLIENT_SECRET
  value: "client secret on Azure AD
- name: MQ_OIDC_UNIQUE_USER_IDENTIFIER
  value: "unique_name"
- name: MQ_OIDC_AUTHORIZATION_ENDPOINT
  value: "https://login.microsoftonline.com/{our tenant}/oauth2/v2.0/authorize"
- name: MQ_OIDC_TOKEN_ENDPOINT
  value: "https://login.microsoftonline.com/{our tenant}/oauth2/v2.0/token"
- name: MQ_OIDC_JWK_ENDPOINT
  value: "https://login.microsoftonline.com/{our tenant}/discovery/v2.0/keys"
- name: MQ_OIDC_ISSUER_IDENTIFIER
  value: "Microsoft issuer"

What happened

The injected environment variables never take effect. After the Pod is started, checking at /etc/mqm/web/installations/Installation1/servers/mqweb, I see the tpl isn't rendered. variables in mqwebuser.xml are not replaced with the injected envs

what do I expect to happen

mqwebuser.xml.tpl should be rendered, adding the OIDC environment variables.

Troubleshooting

mqwebuser.xml.tpl is being rendered at here

 err = mqtemplate.ProcessTemplateFile(mqwebDir+"/mqwebuser.xml.tpl", mqwebDir+"/mqwebuser.xml", map[string][]string{"AdminUser": adminUsers}, log)

But the environment variables defined earlier are not being passed to mqtemplate.ProcessTemplateFile

JEFFLUFC pushed a commit that referenced this issue Dec 13, 2023
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