GOTD-SECRETS.CONF(5)

πŸ’– GOTD-SECRETS.CONF(5) πŸ’–

okay bestie, welcome to gotd-secrets.conf(5) β€” this is the File Formats Manual page for gotd-secrets.conf, and yes it's literally the secrets file for gotd. sit down, hydrate, let's get into it 🫢


✨ NAME ✨

gotd-secrets.conf β€” the gotd secrets file, aka where the credentials live πŸ”


🌸 DESCRIPTION 🌸

so gotd-secrets.conf holds the authentication credentials that gotd(8) uses for its notifications. that's it, that's the whole job. πŸ’…

bestie. listen. this file must be owned by the root user and it must not be readable by any other users. not a suggestion, not a vibe, a requirement. 🚨

the format is line-based β€” one entry per line, no nesting, no drama, we love a simple structure.

  • comments can start at the beginning of a line with a hash mark (#), and they run all the way to the end of the line 🌈
  • empty lines are just ignored, they're doing nothing and that's fine πŸ™ˆ

each entry is made of whitespace-separated tokens and defines a set of credentials. if any credential parameter has whitespace in it, wrap it in single or double quotes β€” quotes are the little seatbelt for your strings ✨

every set of credentials needs a label, and that label is how you refer to those credentials over in gotd.conf(5). and here's the rule: that label must be unique among all credentials of the same type. same type only, ok? iykyk πŸ‘‘


πŸ‘‘ the credential types + their params πŸ‘‘

auth label user user password password

the auth type is your HTTP Basic Authentication credentials β€” it's a user and a password, iconic duo, no notes πŸ’™

hmac label secret

the hmac type is shared secrets for use with HMAC signatures of HTTP request bodies. and if you need a suitable secret, you can generate one with openssl(1) like this:

$ openssl rand -base64 32

look at that, a one-liner. slay πŸ”₯


πŸŽ€ FILES πŸŽ€

  • /etc/gotd-secrets.conf β€” this is where the gotd-secrets.conf configuration file lives, that's the location, that's the address, come through 🏠

πŸ¦‹ EXAMPLES πŸ¦‹

here's how you define credentials for HTTP basic authentication AND HMAC signatures at the same time, main character energy fr fr:

# /etc/gotd-secrets.conf
auth mochi user "flan" password "super-strong-password!"
hmac hacker q0tcl8QhjYs7U75MW/2rwB30CpdbAhONkfLGxFHm/+8=

and then you can reference those credentials in gotd.conf(5) like this:

# /etc/gotd.conf
repository "openbsd/src" {
        path "/var/git/src.git"
        permit rw :hackers

        notify {
                url https://example.com/ci/ auth mochi hmac hacker
        }
}

see how auth mochi and hmac hacker just show up in the notify block? the labels doing their job, we love to see it πŸ’–


πŸ’œ SEE ALSO πŸ’œ


and that's the page bestie!! this one came from Debian, version $Mdocdate$, and it's the GOTD-SECRETS.CONF(5) manual page πŸ’… go set your permissions correctly and stay safe out there πŸŽ€βœ¨

πŸ“¦ where this page comes from