Skip to content

Instantly share code, notes, and snippets.

View infamousjoeg's full-sized avatar
🙊
I'm really good at keeping secrets.

Joe Garcia infamousjoeg

🙊
I'm really good at keeping secrets.
View GitHub Profile
@infamousjoeg
infamousjoeg / SecretsHubDiscoveryONLY.json
Created August 28, 2025 12:49
Secrets Hub ListSecrets Only CloudFormation Template
{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"PolicyName": {
"Type": "String",
"Description": "Meaningful policy name"
},
"CyberArkSecretsHubRoleARN": {
"Type": "String",
"Description": "The Secrets Hub tenant role ARN which will be trusted by this role"
@infamousjoeg
infamousjoeg / README.get-secrets.md
Created August 21, 2025 19:48
CyberArk get-secrets Tool: Windows Setup and PowerShell Usage Guide

CyberArk get-secrets Tool: Windows Setup and PowerShell Usage Guide

Prerequisites

  • Windows Server 2016+ or Windows 10+
  • PowerShell 5.1+ (included with Windows)
  • Administrator privileges
  • CyberArk Identity and Secrets Hub credentials

Step 1: Install Go

@infamousjoeg
infamousjoeg / authenticate_arksdk.py
Created August 11, 2025 16:32
How to authenticate as an Identity Service User using Ark SDK for Python
import getpass
from ark_sdk_python import ArkClient
from ark_sdk_python.auth import ArkISPAuth
def interactive_platform_auth():
"""Interactive platform token authentication setup"""
# Gather credentials interactively
tenant_url = input("Enter your CyberArk tenant URL: ")
client_id = input("Enter your Service User client ID: ")
@infamousjoeg
infamousjoeg / AzureKeyVaultsWithSecrets.ps1
Created August 6, 2025 17:31
Get all Azure Key Vaults in an Azure Management Group that contain Secret objects
# Requires: Az PowerShell Module
# Install with: Install-Module -Name Az -Scope CurrentUser
# ------------------------
# VARIABLES - EDIT THESE
# ------------------------
$ManagementGroupId = "<YourManagementGroupID>" # e.g. "mg-root"
# ------------------------
# CONNECT TO AZURE
@infamousjoeg
infamousjoeg / V5SynchronizerInstallation.proxy.ps1
Created June 16, 2025 14:38
Proxy-supported Vault-Conjur Synchronizer PowerShell Script
# Version = 13.6.0.4-release/13.6
#-----------------------------------------
# This script installs the Vault-Conjur Synchronizer
#------------------------------------------
#Requires -Version 4.0
param([switch] $silent, [switch] $forceNoPVWAApiUse, [switch] $trustPVWAAndConjurCert, [switch] $automationTests)
#region [Variables]
@infamousjoeg
infamousjoeg / cyberarkSAMLPingFederate.md
Created March 27, 2025 19:06
CyberArk PAM (Self-Hosted) REST API Authentication via PingFederate SAML

CyberArk PAM REST API Authentication via PingFederate SAML

This guide demonstrates how to authenticate to CyberArk's Self-Hosted Privileged Access Management (PAM) REST API using PingFederate SAML authentication with PowerShell.

Overview

The script implements a complete SAML authentication flow that:

  1. Initiates SAML authentication with CyberArk
  2. Redirects to PingFederate for authentication
@infamousjoeg
infamousjoeg / PS-SAML-Interactive-NG.psm1
Last active March 7, 2025 21:53
getSAMLResponse-Interactive using Selenium
function New-SAMLInteractive {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string] $LoginIDP
)
Begin {
# Regular expression to extract SAML Response
$RegEx = '(?i)name="SAMLResponse"(?: type="hidden")? value=\"(.*?)\"(?:.*)?\/>'
@infamousjoeg
infamousjoeg / GitHubOIDC-CyberArkConjur.md
Created August 15, 2024 13:07
Utilizing GitHub OIDC as an Authentication Method through CyberArk Conjur’s authn-jwt

Utilizing GitHub OIDC as an Authentication Method through CyberArk Conjur’s authn-jwt

Overview: This documentation demonstrates how to use GitHub's OpenID Connect (OIDC) as an authentication method in Conjur Cloud & Self-Hosted Enterprise using the authn-jwt authenticator. The process involves configuring the JWT authenticator, mapping claims from the GitHub OIDC token to annotations in Conjur Cloud, and finally authenticating a workload.


Step 1: Configure GitHub OIDC with JWT Authenticator

  1. Plan the Configuration:
@infamousjoeg
infamousjoeg / authn-iam-ec2.ps1
Created July 9, 2024 19:47
authn-iam PowerShell Example on EC2
# Import the AWS module
Import-Module AWSPowerShell.NetCore
# Define the region
$region = "YOUR_AWS_REGION"
# Function to get temporary security credentials from EC2 instance's IAM role
function Get-TemporaryCredentials {
param (
[string]$region
@infamousjoeg
infamousjoeg / QRadar_WinCollect_APPAudit.md
Created June 6, 2024 12:45
Setup WinCollect agent for QRadar SIEM to consume APPAudit.log for CP, CCP & ASCP

To send data from a flat-file log on a server to QRadar, you need to set up a log source in QRadar to collect and process the logs. Here’s a step-by-step guide to accomplish this:

1. Install WinCollect on the Server

WinCollect is a Windows-based agent provided by IBM for QRadar to collect logs. Here are the steps to install and configure it:

  • Download and Install WinCollect: Download the WinCollect agent from IBM's website and install it on your server.
  • Configure the WinCollect Agent: During installation, configure the agent to point to your QRadar instance.

2. Configure WinCollect to Monitor the Log File