This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Create an RSA 2048-bit private key (PEM format) | |
| openssl genrsa -out my-secret.pem 2048 | |
| # Extract the RSA public key | |
| openssl rsa -in my-secret.pem -out my-secret.pem.pub -pubout | |
| # Store the RSA public key in Barbican | |
| # This was tested against a SafeNet AT KeySecure G460 HSM (via KMIP) | |
| openstack secret store \ | |
| --algorithm rsa \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| for i in `/usr/local/cpanel/bin/apitool listaccts --output json | jq -r '.data.acct[] | select(.suspended == 0) | .user'`; do | |
| echo "Verifying account: ${i}"; | |
| sketchy=$(su -s /bin/bash -c "wp core verify-checksums --path=/home/${i}/public_html/" ${i} 2>&1 | grep 'File should not exist' | awk -F' ' '{print $NF}') | |
| for sketch in $sketchy; do | |
| echo "++ Removing file: /home/${i}/public_html/${sketch}"; | |
| rm -f /home/${i}/public_html/${sketch} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| for i in `/usr/local/cpanel/bin/apitool listaccts --output json | jq -r '.data.acct[] | select(.suspended == 0) | .user'`; do | |
| echo "Updating account: ${i}"; | |
| su -s /bin/bash -c "wp core update --path=/home/${i}/public_html/" $i; | |
| su -s /bin/bash -c "wp plugin update --path=/home/${i}/public_html/ --all" $i; | |
| for subsite in `find /home/${i}/public_html/ -name "wp-config.php" | grep -Po "/home/${i}/public_html/\K.*(?=/wp-config.php)"`; do | |
| echo "Updating sub-site account: ${subsite}"; | |
| su -s /bin/bash -c "wp core update --path=/home/${i}/public_html/${subsite}/" $i; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Description name of the GlobalProtect interface | |
| $gp_iface = "PANGP Virtual Ethernet Adapter" | |
| # Routes to remove from the GlobalProtect interface | |
| $bad_routes = @( | |
| '0.0.0.0/0', | |
| '10.1.10.0/24', | |
| '10.1.10.255/32', | |
| '172.16.100.0/24', | |
| '192.168.1.0/24') | |
| # How many loops used to remove routes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| Example script for testing OpenStack Keystone SAML 2.0 ECP authentication | |
| This script expects the following OS environment variables to be defined: | |
| OS_AUTH_URL | |
| OS_USERNAME | |
| OS_PASSWORD | |
| OS_PROJECT_ID | |
| OS_PROJECT_NAME | |
| OS_PROTOCOL |