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

[Feature request]: Enable using docker secrets #311

Closed
crunchiersa opened this issue Aug 19, 2024 · 0 comments · Fixed by #340
Closed

[Feature request]: Enable using docker secrets #311

crunchiersa opened this issue Aug 19, 2024 · 0 comments · Fixed by #340
Labels
enhancement New feature or request

Comments

@crunchiersa
Copy link

I'm in the process of replacing all sensitive data in my .env-files using docker secrets. Using docker secrets does not seem to work with your container unfortunately.
My current docker-compose.yaml:

services:
  opengist:
    image: ghcr.io/thomiceli/opengist:1
    container_name: opengist
    restart: unless-stopped
    ports:
      - 127.0.0.1:6157:6157 # HTTP port
      - 10.10.120.5:2222:2222 #SSH port, can be removed if you don't use SSH
    volumes:
      - /path/to/gist:/opengist
    environment:
      - UID=1500
      - GID=120
      # I tried the following variants (only using one variant per attempt... ;)) 
      - OG_OIDC_CLIENT_KEY=${OG_OIDC_CLIENT_KEY} <--- works - if OG_OIDC_CLIENT_KEY is defined in .env
      - OG_OIDC_CLIENT_KEY_FILE=/run/secrest/gist_oidc-client <--- does not work
      - OG_OIDC_CLIENT_KEY=file:///run/secrets/gist_oidc-client <--- does not work
      - OG_OIDC_SECRET=${OG_OIDC_SECRET} <--- works - if OG_OIDC_SECRET is defined in .env
      - OG_OIDC_SECRET_FILE=/run/secrest/gist_oidc-secret <--- does not work
      - OG_OIDC_SECRET=file:///run/secrets/gist_oidc-secret <--- does not work
      - OG_OIDC_DISCOVERY_URL=${OG_OIDC_DISCOVERY_URL}
    secrets:
      - gist_oidc-client
      - gist_oidc-secret
    networks:
      - proxy_frontend
networks:
  proxy_frontend:
    external: true
secrets:
  gist_oidc-client:
    file: /path/to/secrets/gist/gist_oidc-client
  gist_oidc-secret:
    file: /path/to/secrets/gist/gist_oidc-secret`

I want to replace the OG_OIDC_CLIENT_KEY and OG_OIDC_SECRET with secrets. I have defined the secrets, attached them to the container - however using OG_OIDC_CLIENT_KEY_FILE/OG_OIDC_SECRET_FILE instead of the above environmental variables does not work - neither does defining the existing variables as "file:///run/secrets/gist_oidc-client". 

Could you add a feature to read the OIDC-Client-Key/Secret from a file?
@thomiceli thomiceli added the enhancement New feature or request label Aug 28, 2024
@thomiceli thomiceli moved this to Backlog in Opengist Sep 10, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Opengist Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants