
The authkeys configuration file contains information for Heartbeat[1] to use when authenticating cluster[2] members. It cannot be readable or writable by anyone other than root.
Two lines are required in the authkeys file:
A line which says which key to use in signing outgoing packets.
One or more lines defining how incoming packets might be being signed.
auth 1
1 sha1 PutYourSuperSecretKeyHere
In this sample file, the auth 1 directive says to use key number 1 for signing outgoing packets. The 1 sha1... line describes how to sign the packets. The fields in this line are as follows:
1 - the key number associated with this line.
sha1 - the key signature method.
PutYourSuperSecretKeyHere - shared secret key[1[3]] to use in signing packets. This key must be the same on all nodes[4] except as noted below.
Normally, the key number would be 1, and the first line would say auth 1.
We do not recommend that you use the crc method unless all your communication is across serial lines and crossover cables.
We currently support these signature methods:
To get an absolutely up-to-date list of authentication methods supported, run this command
ls /usr/lib*/heartbeat/plugins/HBauth/*.so
To change keys without restarting heartbeat, the following procedure must be followed:
as authmethod.
Append a new number authmethod line to the authkeys file. The number on this line is fairly arbitrary, but it must be unique in the file and between 1 and 15 inclusive.
On each node, issue a /etc/init.d/heartbeat reload command.
Change the first line to say auth number to match the new number added in step 2 above.
On each node, issue a /etc/init.d/heartbeat reload command.
Remove the original authnumber authmethod line from the file (not the one added to the file in step 2 above).
On each node, issue a /etc/init.d/heartbeat reload command.
This is a little odd, but it works...
GeneratingAuthkeysAutomatically[3], ha.cf[5], haresources[6], Configuring Heartbeat[7]
| [1] | http://www.linux-ha.org/Heartbeat |
| [2] | http://en.wikipedia.org/wiki/Computer_cluster |
| [3] | http://www.linux-ha.org/GeneratingAuthkeysAutomatically |
| [4] | http://www.linux-ha.org/ClusterNode |
| [5] | http://www.linux-ha.org/ha.cf |
| [6] | http://www.linux-ha.org/haresources |
| [7] | http://www.linux-ha.org/ConfiguringHeartbeat |
This information provided courtesy of the Linux-HA project at http://linux-ha.org/