nextcloud / nextcloud/whiteboard

Use Docker secrets for the JWT token

Open
#394 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
215
Forks
39
Avg merge
1d 3h
Merged PRs (30d)
32

Description

I use Docker Compose to run Whiteboard, and currently I define the JWT token using the JWT_SECRET_KEY environment variable like this:

version: '3.7'
services:
  nextcloud-whiteboard-server:
    image: ghcr.io/nextcloud-releases/whiteboard:release
    ports:
      - 3002:3002
    environment:
      - NEXTCLOUD_URL=https://nextcloud.local
      - JWT_SECRET_KEY=some-random-key

I would like to define the JWT token using Docker Secrets like this:

version: '3.7'
secrets:
  whiteboard_jwt_token:
    file: whiteboard_jwt_token
services:
  nextcloud-whiteboard-server:
    image: ghcr.io/nextcloud-releases/whiteboard:release
    ports:
      - 3002:3002
    secrets:
      - whiteboard_jwt_token
    environment:
      - NEXTCLOUD_URL=https://nextcloud.local
      - JWT_SECRET_KEY_FILE=/run/secrets/whiteboard_jwt_token

Would it be possible to implement this feature?

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 by locating where the server reads JWT_SECRET_KEY and reviewing the Docker Compose deployment configuration. Check how a JWT_SECRET_KEY_FILE value could be handled alongside the existing environment variable, then verify that a mounted Docker secret is accepted without breaking the current configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, javascript
Domain
devops, security
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.