Version: 1.4 Doc. ID: UG-AUTOLOGIN
| Date | Version | Description |
|---|---|---|
| 23.08.2017 | 1.0 | Initial version |
| 06.03.2018 | 1.1 | Added chapter and section structure, terms and refs sections and term doc reference and link, toc |
| 15.11.2018 | 1.2 | Ubuntu 18.04 updates |
| 11.09.2019 | 1.3 | Remove Ubuntu 14.04 support |
| 26.09.2022 | 1.4 | Remove Ubuntu 18.04 support |
This document describes the Autologin utility which automatically enters the PIN code after xroad-signer has started.
See X-Road terms and abbreviations documentation [TA-TERMS].
- [TA-TERMS] X-Road Terms and Abbreviations. Document ID: TA-TERMS.
- Install the package
- Ubuntu: apt install xroad-autologin
- RedHat: yum install xroad-autologin
- If storing the PIN code on the server in plaintext is acceptable, create file
/etc/xroad/autologinthat contains the PIN code.
- File should be readable by user
xroad - If
/etc/xroad/autologindoes not exists, and you have not implementedcustom-fetch-pin.sh, the service will not start
- If you do not want to store PIN code in plaintext, implement bash script
/usr/share/xroad/autologin/custom-fetch-pin.sh
- The script needs to output the PIN code to stdout
- Script should be readable and executable by user
xroad - Script should exit with exit code
- 0 if it was able to fetch PIN code successfully
- 127 if it was not able to fetch PIN code, but this is not an actual error that should cause the service to fail (default implementation uses this if
/etc/xroad/autologindoes not exist) - other exit codes in error situations that should cause the service to fail
#!/bin/bash
PIN_CODE=$(curl https://some-address)
echo "${PIN_CODE}"
exit 0- Creates a new service
xroad-autologin - Service is started after
xroad-signerhas started - On RHEL/Ubuntu 20.04, service calls wrapper script
/usr/share/xroad/autologin/xroad-autologin-retry.shwhich in turn callsautologin.expect- Wrapper script handles retries in error situations.
- Service tries to enter the PIN code using script
signer-console- If the PIN was correct or incorrect, it exits
- If an error occurred (for example because
xroad-signerhas not yet fully started), it keeps retrying indefinitely