From Fedora Project Wiki
Description
This test case ensures the successful installation and basic functionality of an IPA server and its replica with HSM on Fedora.
Setup
Install the pre-release version of Fedora to be tested on two bare metal systems (one for the IPA server and one for the replica) using the default Anaconda settings, except to reclaim all disk space in the process.
How to test
- Install the freeipa packages on both machines
dnf install freeipa-server freeipa-server-dns softhsm -y
- Rename the hostname with the domain to be used with IPA on the server:
hostnamectl hostname ipa.example.test
echo "<ip-address> ipa.example.test" >> /etc/hosts
- Create a softhsm token on ipa.example.test only:
runuser -u pkiuser -- /usr/bin/softhsm2-util --init-token --free --pin $TOKEN_PASSWORD --so-pin $TOKEN_PASSWORD --label ipa_token
- Install IPA Server
ipa-server-install -a $ADMIN_PASSWORD -p $DM_PASSWORD -r EXAMPLE.TEST -U --random-serial-numbers --token-name=ipa_token --token-library-path=/usr/lib64/pkcs11/libsofthsm2.so --token-password=$TOKEN_PASSWORD
- Identify the token directory on ipa.example.test:
ls -1tr /var/lib/softhsm/tokens/ | tail -1
- This will return a UUID like
e373ded4-8763-29e9-dff9-e41f6930297e
- Copy token data to the replica
export token="<UUID>"
rsync -avp $IPA_SERVER_IP:/var/lib/softhsm/tokens/${token} /var/lib/softhsm/tokens/
- Add a DNS server to ipa.example.test (it will make things easier):
ipa-dns-install --no-forwarders --auto-reverse
- Add the replica IP information to DNS (on the IPA server):
kinit admin
ipa dnsrecord-add example.test. replica --a-rec=$REPLICA_IP
- Set the replica hostname:
hostnamectl hostname replica.example.test
- Configure the replica to use the IPA server DNS:
resolvectl dns eth0 $IPA_SERVER_IP:53
- Install ipa-replica:
ipa-replica-install --domain example.test --realm EXAMPLE.TEST --admin-password $ADMIN_PASSWORD -U -N --setup-ca --token-password $TOKEN_PASSWORD
- Verify that the certificate serial numbers are the same. Run this on both machines:
certutil -L -d /etc/pki/pki-tomcat/alias -h ipa_token -n 'ipa_token
cert-pki-ca' |grep -A1 'Serial Number:'
Expected Results
- All installation steps complete without errors.
- The hostname is successfully renamed and resolved on both machines.
- The softhsm token is created and initialized correctly on the server.
- The IPA server and replica install without issues and recognize the HSM token.
- DNS is set up correctly and the replica can resolve the IPA server.
- Certificates are stored correctly with the HSM token on both the server and replica.
- Certificate serial numbers match on both the server and replica.