S
S
Stanislav2019-11-19 19:30:27
Continuous Integration
Stanislav, 2019-11-19 19:30:27

Is there some secret variable generator in nature for Docker or just for some projects?

From the title, it's probably not too clear what I mean, so I'll explain.
Situation:
There are a number of services running in production in Docker, each separately. They need some environment variables, on the basis of which some cryptography will occur in them. Let it be 1 variable, let's call it APP_SECRET. It can be generated in two ways: manually, periodically updating a certain conditional .env file (or writing it somewhere else, from where the code can later find it) in each project, and automatically, also in each project.
The variable must be constant, known within only one project (that is, it is not some kind of shared secret), and repeatable for the same CI / CD build of the project. Well, that is, tied to the update date of a certain lock file inside the project, for example.
Manually - the cons are clear. Obviously, it will be generated less often, it is not clear how, it is not clear where and when and how it can leak.
Automatic - here the advantages are clear. Generation can be tied to each assembly in CI/CD. The algorithm will be known, and if it is chosen correctly, then the values ​​it generates are safe.
Question:
Are there any tools, both for Docker and just for some projects (but only in PHP), that are capable of generating the described above variable, and then write it to .env, for example?
PS: it is clear that you can write this yourself, in a dozen different ways, but if there are already ready-made tools, then I would prefer to at least study them first.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Karasik, 2019-11-19
@vitaly_il1

Look at https://www.vaultproject.io/.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question