RocketChat / RocketChat/Rocket.Chat

Custom Oauth Settings are not Overwritten

Open
#25,157 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

We are installing Rocketchat via Helm Chart. To configure Keycloak the first time we can set the required variables using environment variables. After Deploying Keycloak all Settings are created.
We are managing the client id and secret through Kubernetes Secrets.
If we need to change these it has no effect to Rocketchat.

- name: 'OVERWRITE_SETTING_Accounts_OAuth_Custom_Keycloak_id' valueFrom: secretKeyRef: name: oauth-secret key: client_id - name: 'OVERWRITE_SETTING_Accounts_OAuth_Custom_Keycloak_secret' valueFrom: secretKeyRef: name: oauth-secret key: client_secret
I can see the secret correctly resolved in the Environment Variables of the Container but it does not change the settings.

Steps to reproduce:
  1. Clone https://github.com/kubernetes/charts/tree/master/stable/rocketchat, and add the following to values.yaml:
extraEnv: |
  ...
   - name: 'OVERWRITE_SETTING_Accounts_OAuth_Custom_Keycloak_id'
      valueFrom:
        secretKeyRef:
          name: oauth-secret
          key: client_id
    - name: 'OVERWRITE_SETTING_Accounts_OAuth_Custom_Keycloak_secret'
      valueFrom:
        secretKeyRef:
          name: oauth-secret
          key: client_secret
  1. Install with Helm
  2. Verify that Keycloak is correctly configured.
  3. Update the client Secret.
  4. Update with Helm
  5. Verify that the the client_id and secret have been updated with new credentials
Expected behavior:

Rocket.Chat should update the client_id and secret after changing the Settings

Actual behavior:

The Settings are not updated

Server Setup Information:

Rocket.Chat Version: 4.1.2
Operating System: Kubernetes
Deployment: Helm
Number of running Instances: 1
DB Replicaset Oplog: true
Node Version: v12.22.1
MongoDB: 4.4.6 / unknown (oplog Enabled)

Client Setup Information
  • Browser Version: Chrome

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Helm chart's values.yaml and the OVERWRITE_SETTING_Accounts_OAuth_Custom_Keycloak_id and secret environment variables described in the report. Trace how updated Kubernetes Secret values reach Rocket.Chat settings, then verify that a Helm update changes both credentials as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes
Domain
authentication, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.