Skip to content

auth: add new api-key authentication - #86

Open
mvo5 wants to merge 2 commits into
systemd:mainfrom
mvo5:auth-api-keys
Open

mvo5 wants to merge 2 commits into
systemd:mainfrom
mvo5:auth-api-keys

Conversation

@mvo5

@mvo5 mvo5 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

This is the most simple form of authentication. Plain api
keys that can be used trivially with e.g. curl to run
authenticated calls against varlink-httpd.

@mvo5
mvo5 force-pushed the auth-api-keys branch 2 times, most recently from 1b4699e to a06717f Compare August 13, 2026 06:55
@mvo5
mvo5 marked this pull request as ready for review September 10, 2026 15:57
@mvo5
mvo5 requested a review from katexochen September 10, 2026 15:57
Comment thread README.md
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread src/bin/varlink-httpd/auth_api_key.rs Outdated
Comment thread src/bin/varlink-httpd/auth_api_key.rs
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread src/bin/varlinkctl-http/api_key_client.rs
This is the most simple form of authentication. Plain api
keys that can be used trivially with e.g. curl to run
authenticated calls against varlink-httpd.
Some files must not be readable by others, e.g. the client's api-key
file is a bearer secret. Add secret_file::{check,read}_secret_file()
and use them for the api-key file and the generated TLS server key,
replacing the inline mode check.

read_secret_file() checks the mode on the opened handle so the file
that was checked is the file that is read. The api-key file allows
group access so a root-owned copy under /etc can be shared with a
dedicated group; the TLS key stays owner-only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants