AUTHKEYS(5)
π AUTHKEYS β the Heartbeat auth file, explained bestie-style π
okay so real talk, this is authkeys(5) from the Heartbeat cluster messaging layer, and honestly? she's a config file. but she's an important one. let's get into it π«Ά
β¨ NAME β¨
authkeys β the authentication file for the Heartbeat cluster messaging layer. that's it, that's the whole job, and she does it flawlessly π
πΈ DESCRIPTION πΈ
so heartbeat(8) reads /etc/ha.d/authkeys, right? and what that does is let Heartbeat securely authenticate cluster nodes. like, this is how your nodes prove to each other that they're actually part of the squad and not some random impostor trying to crash the party π
β οΈ bestie. listen. this file must not be readable or writable by any users other thanroot. nobody else. not your cousin, not your cat, notnobody. lock it down π
π FILE FORMAT π
you need two things in the authkeys file, minimum:
- a line that says which key to use in signing outgoing packets β like, the outgoing vibe βοΈ
- one or more lines defining how incoming packets might be being signed β the receiving vibe π₯
and the file has to follow this format exactly, no improvising:
auth num
num method secret
num method secret
num method secret
...
now let's break down what all that means:
numis a numerical identifier, and it has to be between1and15inclusive. also it must be unique within the file β no duplicate numbers, that's not the vibe, that's a problem πmethodis one of the available authentication signature methods (scroll down, bestie, the supported ones are listed right there π)secretis an alphanumerical shared secret used to identify cluster nodes to each other. it's like a little handshake password between your nodes π€
and then auth num is the line that selects the currently active authentication method and secret. so whichever num you name there? that's the one in the spotlight, main character energy π
π SUPPORTED SIGNATURE METHODS π
here's what authkeys supports, listed here in alphabetical order (as the original says, even though the list itself is being a little chaotic about it, we love her anyway π):
md5β the MD5 hash method. this one requires a shared secret. classic, reliable, she's been around.sha1β the SHA-1 hash method. this one also requires a shared secret. β¨crcβ the Cyclic Redundancy Check hash method. this one does not require a shared secret, and bestie... it's insecure. it's use is strongly discouraged. like, do not. π« no cap, we're being so serious about this one. please don't runcrcunless you genuinely have no other option and have accepted your fate π
π¦ want the absolutely up-to-date list of authentication methods supported? you can grab it by running ls /usr/lib/heartbeat/plugins/HBauth/*.so. go look, the plugins will tell you everything β¨
π AUTHORS π
the icons who made this happen:
- Alan Robertson
<alanr@unix.sh>β heartbeat, original Wiki page π - Lars Ellenberg
<lars.ellenberg@linbit.com>β Heartbeat Maintainer; code fixes; documentation updates π§ - Florian Haas
<florian.haas@linbit.com>β man page π
π the sign-off
this whole thing is from Heartbeat 3.0.6, dated 24 Nov 2009 β yeah she's vintage, she's an icon, she predates half the apps on your phone and she's still out here authenticating cluster nodes. respect the elders π β¨π
okay love you, go fix your permissions, bye ππ¦πΈ
π¦ where this page comes from
- debian bookworm: heartbeat 1:3.0.6-13+b2 Β· GPL-2.0-or-later
- debian trixie: heartbeat 1:3.0.6-17 Β· GPL-2.0-or-later
- ubuntu jammy: heartbeat 1:3.0.6-12build1 Β· GPL-2.0-or-later
- ubuntu noble: heartbeat 1:3.0.6-14.1ubuntu2 Β· GPL-2.0-or-later
- ubuntu questing: heartbeat 1:3.0.6-17ubuntu2
- ubuntu resolute: heartbeat 1:3.0.6-18ubuntu2 Β· GPL-2.0-or-later
- ubuntu stonking: heartbeat 1:3.0.6-18ubuntu2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms