The Certificate Syncer is a bash script designed to synchronize certificates between two Java Keystores (JKS). This script allows you to selectively exclude certain aliases from being synced and ensures that only new certificates are imported. It also provides a colorful and visually appealing output.
- Selective Sync: Exclude specific aliases from being synced.
- Check for Existing Aliases: Skip importing certificates that already exist in the destination truststore.
- Progress Indicator: Visual feedback during the sync process.
- Summary Table: A stylish summary table displaying the status of each alias.
- Java Development Kit (JDK): Ensure that
keytool
is available in your PATH. - Bash: The script uses standard bash commands.
-
Clone the Repository
git clone https://github.com/kugelblitzz/wso2-java-truststore-syncer.git cd wso2-java-truststore-syncer
-
Configure the Script
Edit the
cert-syncer.sh
script to update the paths to your source and destination truststores, and the keystore password.nano cert-syncer.sh
# Paths to the source and destination truststores SRC_TRUSTSTORE="/path/to/source/client-truststore.jks" DEST_TRUSTSTORE="/path/to/destination/client-truststore.jks" PASSWORD="your_keystore_password"
-
Run the Script
Make the script executable and run it.
chmod +x cert-syncer.sh ./cert-syncer.sh
Define the paths to your source and destination truststores.
SRC_TRUSTSTORE="/path/to/source/client-truststore.jks"
DEST_TRUSTSTORE="/path/to/destination/client-truststore.jks"
PASSWORD="your_keystore_password"
Specify the aliases you want to exclude from syncing.
EXCLUDE_ALIASES=("alias1" "alias2")
Processing
Final Result
Had to censor some domain related information
WSO2 Java Keystore JKS Certificate Management Keytool Certificate Synchronization Bash Script Truststore WSO2 Identity Server WSO2 API Manager WSO2 Integration WSO2 Carbon Secure Sockets Layer (SSL) Transport Layer Security (TLS) Sync Truststore Trustore