Description
This test case ensures the successful installation and functionality of an IPA server and its replica with Key Recovery Authority (KRA) 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
hostnamectl hostname ipa.example.test
echo “<ip-address> ipa.example.test” >> /etc/hosts
- Create softhsm token
runuser -u pkiuser -- /usr/bin/softhsm2-util --init-token --free --pin $TOKEN_PASSWORD --so-pin $TOKEN_PASSWORD --label ipa_token
- Install the 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 --setup-kra
- Identify the token directory on ipa.example.test
ls -1tr /var/lib/softhsm/tokens/ | tail -1
- Check if the return is
This will return a UUID like e373ded4-8763-29e9-dff9-e41f6930297e
- Copy token data to 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 replica hostname
hostnamectl hostname replica.example.test
- Configure the replica to use the IPA server DNS
resolvectl dns eth0 $IPA_SERVER_IP:53
- Install an IPA replica with a KRA
ipa-replica-install --domain example.test --realm EXAMPLE.TEST --admin-password $ADMIN_PASSWORD -U -N --setup-ca --token-password $TOKEN_PASSWORD --setup-kra
Expected Results
The following must be true to consider this a successful test run. Be brief ... but explicit.
- 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.
- KRA is set up correctly and its certificates are stored with the HSM token.
- DNS is set up correctly and the replica can resolve the IPA server.
- Basic KRA functionality tests (vault creation, archiving, and retrieval) work as expected and are accessible on both machines.
- Verfiy by running
# kinit admin # ipa vault-add test # ipa vault-archive test --data Zm9vCg== # ipa vault-retrieve test