Skip to content

Instantly share code, notes, and snippets.

I'm really good at keeping secrets quarantined.

Joe Garcia infamousjoeg

I'm really good at keeping secrets quarantined.
View GitHub Profile
infamousjoeg /
Last active Jul 2, 2020
Chef Kameel's, of Aviva by Kameel, Hummus Recipe
infamousjoeg /
Last active Jun 9, 2020
CyberArk Automation - Greatest Hits!
infamousjoeg / samlAuthn.ps1
Last active Jun 9, 2020
How to authenticate CyberArk PAS REST API using SAML
View samlAuthn.ps1
$webresp = Invoke-WebRequest "" -MaximumRedirection 0 -ErrorAction SilentlyContinue -UseBasicParsing
$samlresp = Invoke-WebRequest -Uri ($webresp.links.href) -MaximumRedirection 1 -UseDefaultCredentials -UseBasicParsing
If ($samlresp.InputFields[0].name -eq "SAMLResponse"){
$SamlToken = $samlresp.InputFields[0].value
Write-Host $SamlToken
## This Base64-encoded SamlToken is what to place as SAMLResponse URL parameter value in
## API Documentation:
infamousjoeg /
Last active May 28, 2020
AIM CCP REST - Bash Example
PASSWORD = wget --quiet \
--method GET \
infamousjoeg /
Created May 2, 2018
Install Ansible AWX in OpenShift
mkdir Tower
cd Tower/
git clone
cd awx
cd installer/
#vi inventory
-# openshift_host=
-# awx_openshift_project=awx
-# openshift_user=developer
View gist:c9c16c2a98c5142cdcc42677b1c88740

Homebrew Formula for a Go app

These are quick notes from making my own Formula and Tap.

Add go build script to your Git repo

infamousjoeg / enableTLS.ps1
Created Apr 14, 2020
Force PowerShell to permanently use TLS and not SSL by "Enabling Strong Cryptography"
View enableTLS.ps1
# Open PowerShell as Administrator and check the current enabled protocols
# When I ran this, my output was:
# sslv2, tls
# Set strong cryptography on 64 bit .Net Framework (version 4 and above)
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
# Set strong cryptography on 32 bit .Net Framework (version 4 and above)
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
infamousjoeg /
Last active Apr 7, 2020
CyberArk Conjur Shell Scripts used by Security Services
if [[ "$(curl -k https://localhost/info)" == *"\"role\": \"master\""* ]];then
# delete backups older than 30 days
find /opt/conjur/backup -maxdepth 1 -type f -mtime +$RETENTION_DAYS -print | grep Z.tar.xz.gpg | xargs /bin/rm -f
# run the backup
docker exec dap evoke backup
infamousjoeg /
Created Apr 1, 2020
Script to Set/Get secret variables in CyberArk Conjur & DAP - By: @jodyhuntatx
# Authenticates as a user and gets or sets value of a specified variable.
# If you set the environment variables AUTHN_USERNAME and AUTHN_PASSWORD
# to appropriate values, you can avoid having to enter the admin username
# and password every time this script runs.
# Note that 'set' does not correctly handle values containing whitespace.
infamousjoeg / protectCredential.ps1
Last active Feb 5, 2020
Protecting Credentials Retrieved using @cyberark AAM Credential Providers in PowerShell Scripts [Recommended Best Practice]
View protectCredential.ps1
# Import the modules to be used
Import-Module psPAS #
Import-Module CredentialRetriever #
# Before login, we'll request the credentials from AAM and immediately pass the PSCredential object for secure login
New-PASSession -BaseURI -Credential $(Get-CCPCredential -URL -AppID ApplicationID -Safe SafeName -UserName ServiceManagerUser).ToCredential() -type LDAP
# Do stuff here...
# Finally,
You can’t perform that action at this time.