Skip to content
Snippets Groups Projects
Verified Commit dcc297bd authored by Christian Heusel's avatar Christian Heusel :rocket:
Browse files

hedgedoc: limit secret acccess to root

So far every user on the system was able to read the secrets from the
world-readable config.json. Move these secret into the systemd service
file and limit its read rights to root.

fixes: archlinux/infrastructure#562



Co-authored-by: default avatarJakub Klinkovský <lahwaacz@archlinux.org>
Signed-off-by: default avatarChristian Heusel <christian@heusel.eu>
parent ae0abd2f
No related branches found
No related tags found
No related merge requests found
Pipeline #88810 passed
......@@ -31,7 +31,7 @@
file: state=directory path=/etc/systemd/system/hedgedoc.service.d owner=root group=root mode=0755
- name: Install hedgedoc.service snippet for configuration
template: src=hedgedoc.service.d.j2 dest=/etc/systemd/system/hedgedoc.service.d/local.conf owner=root group=root mode=0644
template: src=hedgedoc.service.d.j2 dest=/etc/systemd/system/hedgedoc.service.d/local.conf owner=root group=root mode=0640
- name: Install hedgedoc config file
template: src=config.json.j2 dest=/etc/webapps/hedgedoc/config.json owner=root group=root mode=0644
......
{
"production": {
"sessionSecret": "{{ vault_hedgedoc_session_secret }}",
"email": false,
"domain": "{{ hedgedoc_domain }}",
"loglevel": "info",
......@@ -30,7 +29,6 @@
"db": {
"dialect": "postgres",
"username": "hedgedoc",
"password": "{{ vault_postgres_users.hedgedoc }}",
"database": "hedgedoc",
"host": "localhost",
"port": "5432"
......
......@@ -16,3 +16,5 @@ Environment=CMD_PROTOCOL_USESSL=true
Environment=CMD_URL_ADDPORT=false
Environment=CMD_ALLOW_FREEURL=true
Environment=CMD_REQUIRE_FREEURL_AUTHENTICATION=true
Environment=CMD_SESSION_SECRET={{ vault_hedgedoc_session_secret }}
Environment=CMD_DB_PASSWORD={{ vault_postgres_users.hedgedoc }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment