Skip to content

Commit ed3ce37

Browse files
authored
Merge pull request #63 from GitGuardian/amascia/cyberark-integrations
Amascia/cyberark integrations
2 parents 5d9a40a + d0cd417 commit ed3ce37

File tree

16 files changed

+207
-109
lines changed

16 files changed

+207
-109
lines changed

.github/workflows/validate-helm-examples.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ jobs:
1919
steps:
2020
- name: Checkout code
2121
uses: actions/checkout@v4
22-
22+
2323
- name: Find all examples and create matrix
2424
id: set-matrix
2525
run: |
2626
# Find all example directories
2727
ALL_EXAMPLES=$(find charts/ggscout/examples -maxdepth 1 -mindepth 1 -type d -exec basename {} \;)
28-
28+
2929
# Create JSON array for GitHub Actions matrix
3030
echo "examples=$(echo "$ALL_EXAMPLES" | jq -R -s -c 'split("\n") | map(select(length > 0))')" >> $GITHUB_OUTPUT
31-
31+
3232
echo "Found examples: $ALL_EXAMPLES"
3333
3434
lint-examples:
@@ -39,7 +39,7 @@ jobs:
3939
fail-fast: false
4040
matrix:
4141
example: ${{ fromJson(needs.find-examples.outputs.examples) }}
42-
42+
4343
steps:
4444
- name: Checkout code
4545
uses: actions/checkout@v4
@@ -48,7 +48,7 @@ jobs:
4848
uses: azure/setup-helm@v3
4949
with:
5050
version: 'latest'
51-
51+
5252
- name: Install yq
5353
run: |
5454
sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq
@@ -57,22 +57,22 @@ jobs:
5757
- name: Lint chart example - ${{ matrix.example }}
5858
run: |
5959
echo "🔍 Linting example: ${{ matrix.example }}"
60-
60+
6161
# Create values-ci.yaml for linting
6262
echo "Creating values-ci.yaml for ${{ matrix.example }}"
6363
cp "charts/ggscout/examples/${{ matrix.example }}/values.yaml" "charts/ggscout/examples/${{ matrix.example }}/values-ci.yaml"
64-
64+
6565
# Check if secret.yaml exists and apply values to values-ci.yaml
6666
if [ -f "charts/ggscout/examples/${{ matrix.example }}/secret.yaml" ]; then
6767
echo "Found secret.yaml, using it for values replacement"
68-
68+
6969
# Create a temporary file to store environment variables
7070
ENV_FILE="charts/ggscout/examples/${{ matrix.example }}/.env.tmp"
7171
touch $ENV_FILE
72-
72+
7373
# Extract keys and values from secret.yaml and write to env file
7474
yq '.stringData | to_entries | .[] | .key + "=" + .value' "charts/ggscout/examples/${{ matrix.example }}/secret.yaml" > $ENV_FILE
75-
75+
7676
# Process values-ci.yaml and replace ${VAR} patterns with actual values from secret.yaml
7777
# Read env file line by line
7878
while IFS= read -r line; do
@@ -84,24 +84,24 @@ jobs:
8484
VALUE="${VALUE#\"}"
8585
VALUE="${VALUE%\'}"
8686
VALUE="${VALUE#\'}"
87-
87+
8888
# Replace ${KEY} with VALUE in values-ci.yaml
8989
sed -i.bak "s|\${$KEY}|$VALUE|g" "charts/ggscout/examples/${{ matrix.example }}/values-ci.yaml"
9090
rm "charts/ggscout/examples/${{ matrix.example }}/values-ci.yaml.bak"
9191
done < $ENV_FILE
92-
92+
9393
# Remove temporary env file
9494
rm $ENV_FILE
9595
fi
96-
96+
9797
# Run helm lint
9898
if ! helm lint charts/ggscout -f "charts/ggscout/examples/${{ matrix.example }}/values-ci.yaml"; then
9999
echo "❌ Helm lint failed for ${{ matrix.example }}"
100100
exit 1
101101
else
102102
echo "✅ Helm lint passed for ${{ matrix.example }}"
103103
fi
104-
104+
105105
# Clean up the temporary values-ci.yaml file
106106
rm "charts/ggscout/examples/${{ matrix.example }}/values-ci.yaml"
107107
@@ -114,7 +114,7 @@ jobs:
114114
fail-fast: false
115115
matrix:
116116
example-group:
117-
- secret_manager_group_1: ["akeyless", "conjurcloud", "hashicorpvault", "azurekeyvault"]
117+
- secret_manager_group_1: ["akeyless", "cyberarksaas", "hashicorpvault", "azurekeyvault"]
118118
- secret_manager_group_2: ["delinea", "gcpsecretmanager", "awssecretsmanager"] # TODO: add fetch-only
119119
# - consumers: ["k8s_incluster", "k8s_kubeconfigfile", "gitlabci"]
120120

charts/ggscout/examples/conjurcloud-k8s/secret.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

charts/ggscout/examples/conjurcloud-workload/secret.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

charts/ggscout/examples/conjurcloud-k8s/README.md renamed to charts/ggscout/examples/cyberarksaas-k8s/README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
# Conjur Cloud with Kubernetes JWT Authentication
1+
# CyberArk SaaS with Kubernetes JWT Authentication
22

3-
This example demonstrates how to configure ggscout to authenticate with Conjur Cloud using Kubernetes JWT tokens.
3+
This example demonstrates how to configure ggscout to authenticate with CyberArk SaaS using Kubernetes JWT tokens.
44

55
## Overview
66

7-
Kubernetes JWT authentication allows ggscout running in a Kubernetes cluster to authenticate with Conjur Cloud using the cluster's service account tokens. This eliminates the need to manage static credentials.
7+
Kubernetes JWT authentication allows ggscout running in a Kubernetes cluster to authenticate with CyberArk SaaS using the cluster's service account tokens. This eliminates the need to manage static credentials.
88

99
## Prerequisites
1010

1111
Before using this example, you need:
1212

13-
1. **Conjur Cloud Account**: Access to a Conjur Cloud instance
13+
1. **CyberArk SaaS Account**: Access to a CyberArk SaaS instance
1414
2. **Kubernetes Cluster**: EKS, GKE, AKS, or self-hosted cluster
15-
3. **JWT Authenticator**: Configured in Conjur Cloud for your cluster
16-
4. **Workload Identity**: Created in Conjur Cloud for your ggscout service account
15+
3. **JWT Authenticator**: Configured in CyberArk SaaS for your cluster
16+
4. **Workload Identity**: Created in CyberArk SaaS for your ggscout service account
1717

1818
## Setup Steps
1919

20-
### 1. Configure JWT Authenticator in Conjur Cloud
20+
### 1. Configure JWT Authenticator in CyberArk SaaS
2121

22-
Create a JWT authenticator in Conjur Cloud with the following configuration:
22+
Create a JWT authenticator in CyberArk SaaS with the following configuration:
2323

2424
**For AWS EKS:**
2525
```bash
@@ -31,19 +31,19 @@ aws eks describe-cluster --name <YOUR_CLUSTER_NAME> --query "cluster.identity.oi
3131
- `jwks-uri`: `https://oidc.eks.us-east-1.amazonaws.com/id/EXAMPLE/keys`
3232
- `issuer`: `https://oidc.eks.us-east-1.amazonaws.com/id/EXAMPLE`
3333
- `token-app-property`: `sub` (IMPORTANT: Always use 'sub' for Kubernetes)
34-
- `audience`: `conjur` (recommended)
34+
- `audience`: `cyberark` (recommended)
3535

3636
### 2. Create Workload Identity
3737

38-
Create a workload identity in Conjur Cloud for your ggscout service account:
38+
Create a workload identity in CyberArk SaaS for your ggscout service account:
3939

4040
**Workload Configuration:**
4141
- **Authentication Method**: JWT
4242
- **JWT Authenticator**: Your authenticator ID (e.g., `k8s-cluster-name`)
4343
- **Workload ID**: `system:serviceaccount:<namespace>:<service-account-name>`
4444
- **Policy Branch**: `k8s-apps` (or your preferred branch)
4545

46-
**Example using Conjur CLI:**
46+
**Example using CyberArk CLI:**
4747
```yaml
4848
# Create workload policy (save as workload-policy.yaml)
4949
- !policy
@@ -57,13 +57,13 @@ Create a workload identity in Conjur Cloud for your ggscout service account:
5757
kubernetes/service-account: ggscout-service-account
5858

5959
- !grant
60-
role: !group conjur/authn-jwt/k8s-cluster-name/users
60+
role: !group cyberark/authn-jwt/k8s-cluster-name/users
6161
member: !host system:serviceaccount:ggscout-namespace:ggscout-service-account
6262
```
6363
6464
Load the policy:
6565
```bash
66-
conjur policy load -f workload-policy.yaml -b data
66+
cyberark policy load -f workload-policy.yaml -b data
6767
```
6868

6969
### 3. Grant Access to Secrets
@@ -79,16 +79,16 @@ Create secrets and grant access to your workload:
7979
id: database/password
8080
- !variable
8181
id: api/token
82-
82+
8383
- !group consumers
84-
84+
8585
- !permit
8686
role: !group consumers
8787
privileges: [read, execute]
8888
resources:
8989
- !variable database/password
9090
- !variable api/token
91-
91+
9292
- !grant
9393
role: !group consumers
9494
member: !host /data/k8s-apps/system:serviceaccount:ggscout-namespace:ggscout-service-account
@@ -100,8 +100,8 @@ Update the `secret.yaml` file with your specific values:
100100

101101
```yaml
102102
stringData:
103-
CONJUR_SUBDOMAIN: "your-company"
104-
CONJUR_JWT_AUTHENTICATOR_ID: "k8s-cluster-name"
103+
CYBERARK_SUBDOMAIN: "your-company"
104+
CYBERARK_JWT_AUTHENTICATOR_ID: "k8s-cluster-name"
105105
GITGUARDIAN_API_KEY: "your_gitguardian_api_token"
106106
NAMESPACE: "ggscout-namespace"
107107
```
@@ -128,7 +128,7 @@ helm upgrade ggscout ggscout-charts/ggscout \
128128

129129
### Service Account Identity Format
130130

131-
The workload identity in Conjur Cloud must exactly match the Kubernetes service account format:
131+
The workload identity in CyberArk SaaS must exactly match the Kubernetes service account format:
132132
```
133133
system:serviceaccount:<namespace>:<service-account-name>
134134
```
@@ -139,7 +139,7 @@ Always use `sub` as the `token-app-property` in your JWT authenticator. The `sub
139139

140140
### Namespace Considerations
141141

142-
- The namespace in your Kubernetes deployment must match the namespace in your Conjur workload identity
142+
- The namespace in your Kubernetes deployment must match the namespace in your CyberArk workload identity
143143
- Update the `NAMESPACE` environment variable in `secret.yaml` if using a different namespace
144144
- Ensure your service account has the necessary RBAC permissions
145145

@@ -149,7 +149,7 @@ Always use `sub` as the `token-app-property` in your JWT authenticator. The `sub
149149

150150
1. **Verify JWT authenticator configuration**: Check that `jwks-uri`, `issuer`, and `token-app-property` are correctly set
151151
2. **Check workload identity**: Ensure the workload ID matches the service account format exactly
152-
3. **Verify RBAC**: Make sure the service account has access to the required Conjur resources
152+
3. **Verify RBAC**: Make sure the service account has access to the required CyberArk resources
153153

154154
### Common Errors
155155

@@ -171,6 +171,6 @@ logs:
171171

172172
## Additional Resources
173173

174-
- [Conjur Cloud JWT Authentication Documentation](https://docs.cyberark.com/conjur-cloud/latest/en/Content/Operations/Services/JWT_Authenticator.htm)
174+
- [CyberArk SaaS JWT Authentication Documentation](https://docs.cyberark.com/secrets-hub/latest/en/Content/Operations/Services/JWT_Authenticator.htm)
175175
- [Kubernetes Service Account Tokens](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/)
176176
- [ggscout Configuration Guide](https://docs.gitguardian.com/ggscout-docs/configuration)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: v1
3+
kind: Secret
4+
metadata:
5+
name: ggscout-secrets
6+
stringData:
7+
# CyberArk SaaS subdomain (your company's subdomain)
8+
CYBERARK_SUBDOMAIN: "your-cyberark-subdomain"
9+
10+
# JWT Authenticator ID configured in CyberArk SaaS
11+
CYBERARK_JWT_AUTHENTICATOR_ID: "k8s-cluster-name"
12+
13+
# GitGuardian API token
14+
GITGUARDIAN_API_KEY: "your_gitguardian_token"

charts/ggscout/examples/conjurcloud-k8s/values.yaml renamed to charts/ggscout/examples/cyberarksaas-k8s/values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
inventory:
55
config:
66
sources:
7-
conjur_cloud_k8s:
8-
type: conjurcloud
7+
cyberark_saas_k8s:
8+
type: cyberarksaas
99
auth:
1010
auth_mode: "k8s"
11-
service_id: "${CONJUR_JWT_AUTHENTICATOR_ID}"
11+
service_id: "${CYBERARK_JWT_AUTHENTICATOR_ID}"
1212
fetch_all_versions: true
1313
mode: "read/write" # Can be `read`, `write` or `read/write` depending on wether fetch and/or sync are enabled
14-
subdomain: "${CONJUR_SUBDOMAIN}"
14+
subdomain: "${CYBERARK_SUBDOMAIN}"
1515

1616
gitguardian:
1717
endpoint: "https://api.gitguardian.com/v1"

charts/ggscout/examples/conjurcloud-workload/README.md renamed to charts/ggscout/examples/cyberarksaas-workload/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# Conjur Cloud with Workload Authentication
1+
# CyberArk SaaS with Workload Authentication
22

3-
This example demonstrates how to configure ggscout to authenticate with Conjur Cloud using Workload authentication.
3+
This example demonstrates how to configure ggscout to authenticate with CyberArk SaaS using Workload authentication.
44

55
## Prerequisites
66

7-
1. Access to a Conjur Cloud instance
8-
2. A Conjur workload with appropriate permissions
7+
1. Access to a CyberArk SaaS instance
8+
2. A CyberArk workload with appropriate permissions
99
3. Workload login ID and API key
1010

1111
## Configuration
1212

1313
### 1. Workload Setup
1414

15-
In your Conjur Cloud instance, ensure you have:
15+
In your CyberArk SaaS instance, ensure you have:
1616
- A workload identity configured
1717
- Appropriate policies granting the workload access to secrets
1818
- The workload login ID and API key
@@ -21,9 +21,9 @@ In your Conjur Cloud instance, ensure you have:
2121

2222
Edit the `secret.yaml` file to match your environment:
2323

24-
- `CONJUR_WORKLOAD_LOGIN`: Your Conjur workload login ID (e.g., "host/my-app")
25-
- `CONJUR_WORKLOAD_API_KEY`: Your Conjur workload API key
26-
- `CONJUR_SUBDOMAIN`: Your Conjur Cloud subdomain
24+
- `CYBERARK_WORKLOAD_LOGIN`: Your CyberArk workload login ID (e.g., "host/my-app")
25+
- `CYBERARK_WORKLOAD_API_KEY`: Your CyberArk workload API key
26+
- `CYBERARK_SUBDOMAIN`: Your CyberArk SaaS subdomain
2727
- `GITGUARDIAN_API_KEY`: Your GitGuardian API token
2828

2929
Edit the `values.yaml` file:
@@ -41,13 +41,13 @@ helm repo update
4141
# Apply the secret first
4242
kubectl apply -f secret.yaml
4343

44-
# Install ggscout with Conjur Cloud Workload authentication
45-
helm install ggscout-conjur ggscout/ggscout -f values.yaml
44+
# Install ggscout with CyberArk SaaS Workload authentication
45+
helm install ggscout-cyberark ggscout/ggscout -f values.yaml
4646
```
4747

4848
## Verification
4949

50-
Check that ggscout can authenticate with Conjur Cloud:
50+
Check that ggscout can authenticate with CyberArk SaaS:
5151

5252
```bash
5353
# Check the logs of the ggscout pods
@@ -61,6 +61,6 @@ kubectl get cronjobs
6161

6262
1. **Authentication Issues**: Verify the workload login ID and API key are correct
6363
2. **Permission Issues**: Ensure the workload has proper policies to access the required secrets
64-
3. **Network Connectivity**: Verify ggscout pods can reach your Conjur Cloud instance
64+
3. **Network Connectivity**: Verify ggscout pods can reach your CyberArk SaaS instance
6565

66-
For more details on Conjur Cloud workload authentication, refer to the [Conjur Cloud documentation](https://docs.cyberark.com/conjur-cloud/).
66+
For more details on CyberArk SaaS workload authentication, refer to the [CyberArk SaaS documentation](https://docs.cyberark.com/secrets-hub/).
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
apiVersion: v1
3+
kind: Secret
4+
metadata:
5+
name: ggscout-secrets
6+
stringData:
7+
# CyberArk Workload authentication
8+
CYBERARK_WORKLOAD_LOGIN: "your-workload-login"
9+
CYBERARK_WORKLOAD_API_KEY: "your-workload-api-key"
10+
11+
# CyberArk subdomain
12+
CYBERARK_SUBDOMAIN: "your-cyberark-subdomain"
13+
14+
# GitGuardian API token
15+
GITGUARDIAN_API_KEY: "your_gitguardian_token"

0 commit comments

Comments
 (0)