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 than root. nobody else. not your cousin, not your cat, not nobody. lock it down πŸ”’

πŸŽ€ FILE FORMAT πŸŽ€

you need two things in the authkeys file, minimum:

  1. a line that says which key to use in signing outgoing packets β€” like, the outgoing vibe ✈️
  2. 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:

  • num is a numerical identifier, and it has to be between 1 and 15 inclusive. also it must be unique within the file β€” no duplicate numbers, that's not the vibe, that's a problem πŸ’€
  • method is one of the available authentication signature methods (scroll down, bestie, the supported ones are listed right there πŸ‘‡)
  • secret is 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 run crc unless 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 πŸ’–πŸ¦‹πŸŒΈ