qvest-digital / loginsrv

JWT login microservice with plugable backends such as OAuth2, Google, Github, htpasswd, osiam, ..
MIT License
1.92k stars 150 forks source link

Implement option to provide jwt secret via file #143

Closed kernle32dll closed 4 years ago

kernle32dll commented 4 years ago

This PR implements the possibility to provide the JWT secret not only via a flag or environment variable, but also via a file.

This is especially useful for providing private keys for Elliptic Curve signing (e.g. ES512).

Exemplary use-cases are Docker Swarm Secrets (or file mounts in general), or Kubernetes secrets. See e.g. this documentation for the mysql docker image for an idea.

kernle32dll commented 4 years ago

To be rebased when either https://github.com/tarent/loginsrv/pull/145 or https://github.com/tarent/loginsrv/pull/144 is merged.

b00lduck commented 4 years ago

Please update the README.md accordingly. Please state that the _FILE has precedence over the other option.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.06%) to 91.734% when pulling 4339913d0520a1a940b27f9a455cecf74f13ac4a on kernle32dll:implement-secret-file into 84ee0ad74502592f1cad19518306b71c9f2c9295 on tarent:master.

kernle32dll commented 4 years ago

@J-Rocke @smancke Is it possible to cut a new release (1.4.0?), after this has been merged? :)

I eagerly await this functionality in conjunction with https://github.com/tarent/loginsrv/pull/146