- The main branch uses
Jetty-11and other older documents (wgetcommand to get those files) from the source we follow: HOWTO guide provided by Consortium GARR. - Our branch: jetty-12 has solved this issue. all files up-to-date, up to the date of this announcement. so please consider review it first.
This project provides an automated installation and configuration script for setting up Shibboleth Identity Provider (IdP) v5 on Ubuntu/Debian servers with Apache as the front-end reverse proxy and Jetty as the application server. The script is based on the official HOWTO guide provided by Consortium GARR, automating the majority of manual steps while maintaining flexibility for customization.
The installer includes integrated OpenLDAP server installation and configuration, making it a complete solution for local testing and development environments.
Note: All IdP5 supporting configuration files are sourced from the official Consortium GARR IDEM tutorials repository.
- ✅ Fully automated installation of Shibboleth IdP v5.x
- ✅ Jetty servlet container setup and configuration
- ✅ Apache reverse proxy with SSL/TLS support
- ✅ OpenLDAP server installation and configuration
- ✅ LDAP-based authentication integration with Shibboleth
- ✅ Self-signed SSL certificates generation (for testing)
- ✅ Attribute resolver configuration with sample attributes
- ✅ Interactive manual steps for advanced configurations
- ✅ Idempotent design - safe to re-run
- ✅ Progress tracking and clear status messages
- ✅ Compatible with local VMs and private networks
- Ubuntu 22.04 LTS (recommended)
- Debian 11+ (compatible)
- CPU: 2 cores (64-bit)
- RAM: 4 GB minimum
- Disk: 10 GB free space
- Network: Internet connection required for package downloads
- Root access required - The script must be run as root or with sudo
- Port 80 (HTTP) and 443 (HTTPS) must be accessible
- Port 389 (LDAP) for local LDAP server
The installer uses the following software versions (configurable in the script):
| Component | Version | Variable Name |
|---|---|---|
| Shibboleth IdP | 5.1.6 | SHIB_IDP_VERSION |
| Jetty | 11.0.25 | JETTY_VERSION |
| Java | Amazon Corretto 17 | JAVA_HOME_ENV |
| Apache | 2.4+ | (from apt) |
| OpenLDAP | Latest from apt | (from apt) |
Note: You can update these versions by modifying the variables at the top of the
install_local_idp5_corrected.shscript.
idp5-installer/
├── install_local_idp5_corrected.sh # Main installation script
├── idp5_supporting_files/ # Configuration templates and files
│ ├── Apache2_as_front_end_of_Jetty_template.conf
│ ├── attribute-resolver-v5-idem-sample.xml
│ ├── eduPersonTargetedID.properties.txt
│ ├── idem-example-arp.txt
│ ├── idp_jetty_context.xml
│ ├── jetty-logging.properties.txt
│ ├── jetty-requestlog.xml
│ ├── jetty-start.ini.txt
│ ├── updateIDPsecrets.sh
│ └── ...
├── ldif_files/ # Auto-generated LDAP directory files
│ ├── ou-structure.ldif
│ ├── idpuser.ldif
│ ├── johnsmith.ldif
│ ├── jacobdan.ldif
│ └── ...
└── README.md # This file
# Machine's IP addresses
IP_ADDRESS="192.168.4.220" # Your machine's private IP address
LOOP_IP_ADDRESS="127.0.1.1" # Loopback IP for /etc/hosts
# IdP hostname configuration
SHIB_IDP_HOSTNAME="idp.localtest2" # Your IdP hostname
SHIB_IDP_FQDN="${SHIB_IDP_HOSTNAME}" # Fully Qualified Domain NameImportant: Update
SHIB_IDP_HOSTNAMEto match your desired hostname before running the script.
IDP_HOME="/opt/shibboleth-idp" # IdP installation directory
MAIN_SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd)" # Script directory
SUPPORTING_FILES_PATH="${MAIN_SCRIPT_PATH}/idp5_supporting_files" # Supporting files directory
LDAP_FILES_PATH="${MAIN_SCRIPT_PATH}/ldif_files" # LDAP files directoryCritical: The
idp5_supporting_filesdirectory must exist in the same directory as the installation script. The script will exit with an error if this directory is missing.
# LDAP domain components (auto-extracted from hostname)
LDAP_DC_1=$(echo "${SHIB_IDP_HOSTNAME}" | awk -F'.' '{print $1}') # e.g., "idp"
LDAP_DC_2=$(echo "${SHIB_IDP_HOSTNAME}" | awk -F'.' '{print $NF}') # e.g., "localtest2"
LDAP_DC_COMPOSITE="dc=${LDAP_DC_2}" # e.g., "dc=localtest2"
# LDAP credentials
LDAP_ADMIN_PASSWORD='admin123' # LDAP admin password
LDAP_IDPUSER_PASSWORD='idpuser123' # LDAP service account passwordSecurity Note: Change these default passwords for production environments!
The script automatically creates two sample users for testing:
| Username | Password | UID | |
|---|---|---|---|
| johnsmith | smith123 | johnsmith@localtest2 | 1001 |
| jacobdan | dan123 | jacobdan@localtest2 | 1002 |
The installer script supports the following command-line options:
# Show usage information
./install_local_idp5_corrected.sh
# Show help message
./install_local_idp5_corrected.sh --help
# Start the installation process (requires root)
sudo ./install_local_idp5_corrected.sh --install
# View post-installation tasks (can be run anytime)
./install_local_idp5_corrected.sh --print-remaining| Option | Short | Description | Root Required |
|---|---|---|---|
--install |
-i |
Start the installation process | ✓ Yes |
--print-remaining |
-p |
Display post-installation tasks | ✗ No |
--help |
-h |
Show help message | ✗ No |
| (no option) | Show usage information | ✗ No |
Before running the installer, ensure:
- You have root access to the system
- The system is Ubuntu 22.04 or compatible
- You have internet connectivity
- The
idp5_supporting_filesdirectory exists - You have updated the configuration variables (hostname, IP addresses)
git clone https://github.com/yourusername/idp5-installer.git
cd idp5-installerOr download and extract the ZIP file.
# Check that the supporting files directory exists
ls -la idp5_supporting_files/
# You should see files like:
# - Apache2_as_front_end_of_Jetty_template.conf
# - attribute-resolver-v5-idem-sample.xml
# - idp_jetty_context.xml
# - updateIDPsecrets.sh
# etc.Edit the script to update your environment-specific settings:
vim install_local_idp5_corrected.shUpdate these variables:
SHIB_IDP_HOSTNAME- Your IdP hostnameIP_ADDRESS- Your machine's IP address (optional)LDAP_ADMIN_PASSWORD- LDAP admin passwordLDAP_IDPUSER_PASSWORD- LDAP service account password
# Make the script executable
chmod +x install_local_idp5_corrected.sh
# Run the installation with --install option
sudo ./install_local_idp5_corrected.sh --installImportant: The script must be run with root privileges using
sudoor as the root user.
The script will pause at certain steps that require manual verification or configuration. These steps are:
configure_persistent_nameid- Configure persistent NameID generationconfigure_attribute_resolver- Review and confirm attribute resolver configurationconfigure_eduPersonTargetedID_confirm_required- Verify eduPersonTargetedID configurationconfigure_idp_logging- Review logging configuration
When the script pauses:
- Open another terminal to review the configuration files
- Verify the settings are correct
- Return to the installation terminal
- Type
doneto continue, orexitto stop the installation
Example:
╔════════════════════════════════════════════════════════════╗
║ MANUAL VERIFICATION REQUIRED ║
╚════════════════════════════════════════════════════════════╝
Please verify the configuration in:
/opt/shibboleth-idp/conf/saml-nameid.properties
Have you reviewed and confirmed the configuration?
Type 'done' to continue or 'exit' to abort: done
After installation completes, verify the services:
# Check Jetty status
systemctl status jetty
# Check Apache status
systemctl status apache2
# Check OpenLDAP status
systemctl status slapd
# Check IdP status
bash /opt/shibboleth-idp/bin/status.sh# Test LDAP connection with admin user
ldapsearch -x -H ldap://localhost \
-D "cn=admin,dc=localtest2" \
-w "admin123" \
-b "dc=localtest2"
# Test LDAP connection with idpuser service account
ldapsearch -x -H ldap://localhost \
-D "cn=idpuser,ou=system,dc=localtest2" \
-w "idpuser123" \
-b "ou=people,dc=localtest2" \
"(uid=johnsmith)"From the IdP server:
# Using curl (bypass SSL verification for self-signed cert)
curl -k https://idp.localtest2/idp/shibbolethFrom your local machine:
# First, add the IdP to your /etc/hosts file
echo "192.168.4.220 idp.localtest2" | sudo tee -a /etc/hosts
# Then access the metadata
curl -k https://idp.localtest2/idp/shibbolethYou should see XML metadata output starting with:
<?xml version="1.0" encoding="UTF-8"?>
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" ...>Open a web browser and navigate to:
https://idp.localtest2/idp/profile/SAML2/Unsolicited/SSO?providerId=https://sp.example.org
You should see the Shibboleth IdP login page.
Try logging in with one of the sample users:
- Username:
johnsmith - Password:
smith123
Or:
- Username:
jacobdan - Password:
dan123
The script automates the following steps from the official HOWTO guide:
- ✅ Hostname and
/etc/hostsconfiguration - ✅ JAVA_HOME environment variable setup
- ✅ System package updates and dependency installation
- ✅ Amazon Corretto JDK 17 installation
- ✅ GPG key import and repository configuration
- ✅ Jetty download and extraction
- ✅ Jetty user and directory creation
- ✅ Jetty systemd service configuration
- ✅ LogBack logging setup
- ✅ Jakarta Servlet API installation
- ✅ IdP download and GPG signature verification
- ✅ IdP installation with proper parameters
- ✅ Metadata typo fix (for v5.1.3)
- ✅ Directory indexing disabled
- ✅ Jetty context descriptor configuration
- ✅ DocumentRoot creation
- ✅ Self-signed SSL certificate generation
- ✅ Apache modules enablement (proxy_http, ssl, headers, etc.)
- ✅ Virtual host configuration
- ✅ Reverse proxy to Jetty setup
- ✅ OpenLDAP server installation
- ✅ DIT (Directory Information Tree) structure creation
- ✅ Service account (idpuser) creation
- ✅ Sample user accounts creation (johnsmith, jacobdan)
- ✅ LDAP authentication configuration
- ✅ Attribute resolver setup
- ✅ Persistent NameID configuration
- ✅ eduPersonTargetedID configuration
- ✅ IdP logging configuration
- ✅ Cookie security configuration
- ✅ Secret rotation script setup
- ✅ Cron job for daily secret updates
The following steps require manual verification during installation:
When: After LDAP integration
What: Verify the persistent NameID generation settings
File: /opt/shibboleth-idp/conf/saml-nameid.properties
Action: Review and confirm the configuration is correct
When: After persistent NameID configuration
What: Verify attribute resolution from LDAP
File: /opt/shibboleth-idp/conf/attribute-resolver.xml
Action: Ensure LDAP attributes are correctly mapped
When: After attribute resolver configuration
What: Verify eduPersonTargetedID attribute definition
File: /opt/shibboleth-idp/conf/attribute-resolver.xml
Action: Confirm the XML configuration is present and correct
When: Near the end of installation
What: Verify logging configuration for LDAP authentication
File: /opt/shibboleth-idp/conf/logback.xml
Action: Confirm LDAP authentication logging is enabled
After the automated installation completes, the script will display a list of remaining tasks. You can view this list again at any time by running:
./install_local_idp5_corrected.sh --print-remainingThe remaining tasks include:
- Add your institutional logo (80x60 px PNG)
- Customize login page messages
- Update footer text
See: HOWTO - Enrich IdP Login Page
- Add SP metadata to
/opt/shibboleth-idp/conf/metadata-providers.xml - Configure attribute release policy in
/opt/shibboleth-idp/conf/attribute-filter.xml - Restart Jetty
See: HOWTO - Appendix D: Connect an SP with the IdP
For production use, replace the self-signed SSL certificates with CA-signed certificates:
# Copy your CA-signed certificates
cp your-cert.crt /etc/ssl/certs/idp.localtest2.crt
cp your-key.key /etc/ssl/private/idp.localtest2.key
# Set proper permissions
chmod 644 /etc/ssl/certs/idp.localtest2.crt
chmod 600 /etc/ssl/private/idp.localtest2.key
# Restart Apache
systemctl restart apache2# Allow HTTP and HTTPS
ufw allow 80/tcp
ufw allow 443/tcp
# If accessing LDAP remotely (not recommended for production)
ufw allow 389/tcp # LDAP
ufw allow 636/tcp # LDAPS- Register your IdP with IDEM or another federation
- Download and configure federation metadata
- Update metadata refresh configuration
Problem: Jetty fails to start
Solution:
# Check Jetty logs
journalctl -xeu jetty
tail -f /var/log/jetty/start.log
# Verify JAVA_HOME is set
echo $JAVA_HOME
# Check if Jetty is listening on port 8080
netstat -tulpn | grep 8080
# Restart Jetty
systemctl restart jettyProblem: 502 Bad Gateway error
Solution:
# Ensure Jetty is running
systemctl status jetty
# Check Apache configuration
apache2ctl configtest
# Check Apache error logs
tail -f /var/log/apache2/idp.localtest2-error.log
# Restart both services
systemctl restart jetty
systemctl restart apache2Problem: LDAP authentication fails
Solution:
# Test LDAP connectivity
ldapsearch -x -H ldap://localhost \
-D "cn=admin,dc=localtest2" \
-w "admin123" \
-b "dc=localtest2"
# Check LDAP logs
journalctl -u slapd
# Verify IdP LDAP configuration
cat /opt/shibboleth-idp/conf/ldap.properties
cat /opt/shibboleth-idp/credentials/secrets.properties
# Check IdP logs for LDAP errors
grep -i ldap /opt/shibboleth-idp/logs/idp-process.logProblem: Cannot access https://idp.localtest2/idp/shibboleth
Solution:
# Check if IdP WAR is deployed
ls -la /opt/shibboleth-idp/war/idp.war
# Check if Jetty context is configured
ls -la /opt/jetty/webapps/idp.xml
# Test direct Jetty access
curl http://localhost:8080/idp/shibboleth
# Test through Apache
curl -k https://localhost/idp/shibboleth
# Check ownership
ls -la /opt/shibboleth-idp/logs
ls -la /opt/shibboleth-idp/metadataProblem: Browser shows SSL warning
Solution: This is expected with self-signed certificates. For testing:
- Accept the security exception in your browser
- Use
curl -kto bypass verification
For production, obtain a CA-signed certificate.
- The script generates self-signed SSL certificates suitable only for testing
- Update
/etc/hostson client machines to resolve the IdP hostname - Default LDAP passwords are weak - change them for any non-testing use
- Replace self-signed certificates with CA-signed certificates
- Use strong, randomly generated passwords for LDAP
- Consider using LDAPS (LDAP over SSL/TLS) instead of plain LDAP
- Implement proper firewall rules
- Set up monitoring and log rotation
- Configure regular backups
- Review and harden security settings
- For local VM testing, the loopback IP (127.0.1.1) is used in
/etc/hosts - For network-accessible IdP, you may want to use the actual IP address
- Ensure DNS resolution works for your IdP hostname
| Component | Location |
|---|---|
| IdP Home | /opt/shibboleth-idp |
| IdP Configuration | /opt/shibboleth-idp/conf/ |
| IdP Credentials | /opt/shibboleth-idp/credentials/ |
| IdP Logs | /opt/shibboleth-idp/logs/ |
| IdP Metadata | /opt/shibboleth-idp/metadata/ |
| Jetty Home | /usr/local/src/jetty-src |
| Jetty Base | /opt/jetty |
| Jetty Logs | /var/log/jetty/ |
| Apache Config | /etc/apache2/sites-available/ |
| Apache Logs | /var/log/apache2/ |
| SSL Certificates | /etc/ssl/certs/ and /etc/ssl/private/ |
| LDAP Config | /etc/ldap/ |
# View post-installation tasks
./install_local_idp5_corrected.sh --print-remaining
# Check IdP status
bash /opt/shibboleth-idp/bin/status.sh
# Rebuild IdP WAR file
bash /opt/shibboleth-idp/bin/build.sh
# Restart all services
systemctl restart jetty
systemctl restart apache2
systemctl restart slapd
# View logs in real-time
tail -f /opt/shibboleth-idp/logs/idp-process.log
tail -f /var/log/jetty/start.log
tail -f /var/log/apache2/idp.localtest2-error.log
# Test LDAP user authentication
ldapsearch -x -H ldap://localhost \
-D "uid=johnsmith,ou=people,dc=localtest2" \
-w "smith123" \
-b "ou=people,dc=localtest2"- Shibboleth Project
- Consortium GARR IDEM Tutorials
- Official HOWTO Guide
- Eclipse Jetty
- Amazon Corretto
- OpenLDAP
This project follows the same licensing as the Consortium GARR IDEM tutorials. Please refer to the original repository for license details.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
For issues related to:
- This installer script: Open an issue in this repository
- Shibboleth IdP: Consult the official documentation
- IDEM Federation: Contact Consortium GARR
- ✅ Updated to Shibboleth IdP 5.1.6
- ✅ Updated to Jetty 11.0.25
- ✅ Improved error handling and validation
- ✅ Added interactive manual verification steps
- ✅ Enhanced LDAP integration
- ✅ Better progress tracking
- ✅ Improved idempotency
- ✅ Fixed GPG key import issues
- ✅ Added JAVA_HOME configuration
- ✅ Updated configuration file sources
- Initial release with basic automation
Author: Abubakur Sait Last Updated: 13 October 2025 Tested On: Ubuntu 22.04 LTS