Coder Social home page Coder Social logo

Comments (6)

SolomonHD avatar SolomonHD commented on June 16, 2024 5

Yes this would greatly facilitate saving the config file in git.

from homepage.

jameswynn avatar jameswynn commented on June 16, 2024 3

@JazzFisch @shamoon I'm considering a simple substitution of environment variables into the configs as they are loaded, but for security reasons, limiting it to environment variables that start with "HOMEPAGE_". For example:

- Media:
  - Jellyfin:
      icon: jellyfin.png
      href: https://jellyfin.mydomain.tld
      description: Static Video Entertainment
      app: jellyfin
      namespace: media
      widget:
        type: jellyfin
        url: https://jellyfin.int.wynning.tech
        key: {{HOMEPAGE_JELLYFIN_APIKEY}}

Then the HOMEPAGE_JELLYFIN_APIKEY env var could be set either directly as an environment variable, or populated from a Kubernetes secret. I don't love the simple string replacement approach, but the only practical alternatives I saw were to use a full templating library and that feels like gross overkill for the need.

from homepage.

jameswynn avatar jameswynn commented on June 16, 2024 1

With this approach, no. Perhaps I could expand the solution with an additional prefix for file-based secrets. We could support the "HOMEPAGE_" prefix for direct values and "HOMEPAGEFILE_" prefix for secrets stored in files. So at runtime it would read the file contents from the specified file and substitute it in just as it would for normal variables.

from homepage.

benphelps avatar benphelps commented on June 16, 2024

I believe something like this could work, and would tie into the other feature request for configuration via labels. I'll add this to the list of future enhancements.

from homepage.

mlametta avatar mlametta commented on June 16, 2024

Just to clarify, currently docker secrets cannot be used in the yaml config files?

I attempted using docker secrets and it appears that the container reads the secret correctly but I cannot get it working with the config files. Hiding passwords and api keys from plain-text would be a much appreciated addition to this project. Thank you!

from homepage.

jameswynn avatar jameswynn commented on June 16, 2024

An alternative could be to extend the variables themselves. For instance, the widgets' "key" field could also have "key-var" and "key-file" which would map to an environment variable and a file respectively. We would need to do the same for credentials in other locations as well. This would be a less flexible approach, but would address the primary concern of storing credentials more securely.

from homepage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.