Skip to content

Commit 3f80b4e

Browse files
committed
Remove unused webhook secret verification
1 parent 8e478c9 commit 3f80b4e

2 files changed

Lines changed: 3 additions & 56 deletions

File tree

.github/argocd/SETUP.md

Lines changed: 3 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,7 @@ vi .github/argocd/argocd-notifications-config.yaml
6161
kubectl apply -f .github/argocd/argocd-notifications-config.yaml
6262
```
6363

64-
### 4. Add Secret to GitHub Repository
65-
66-
1. Go to your GitHub repository → Settings → Secrets and variables → Actions
67-
2. Click "New repository secret"
68-
3. Name: `ARGOCD_WEBHOOK_SECRET`
69-
4. Value: `udd2UzDVgpRyrIw9XBW8YiNuLO9aCV/4eKFe/wlr4hU=`
70-
5. Click "Add secret"
71-
72-
### 5. Commit and Push the Workflow
64+
### 4. Commit and push the workflow
7365

7466
```bash
7567
cd /home/dcasati/src/agentic-platform-engineering
@@ -114,28 +106,6 @@ argocd app patch my-app --patch='{"metadata":{"annotations":{"notifications.argo
114106

115107
## Testing
116108

117-
### Test the notification system:
118-
119-
1. Deploy a broken application to trigger a failure
120-
2. Check ArgoCD notifications controller logs:
121-
```bash
122-
kubectl logs -n argocd -l app.kubernetes.io/name=argocd-notifications-controller -f
123-
```
124-
3. Verify the webhook was sent to GitHub
125-
4. Check GitHub Actions workflow run
126-
5. Verify issue was created in your repository
127-
128-
### Manual test without breaking a deployment:
129-
130-
```bash
131-
# Send a test notification
132-
kubectl exec -n argocd deployment/argocd-notifications-controller -- \
133-
argocd-notifications trigger on-sync-failed \
134-
--app my-app
135-
```
136-
137-
## What Happens on Deployment Failure
138-
139109
1. ArgoCD detects sync failure or degraded health
140110
2. ArgoCD Notifications sends webhook to GitHub repository_dispatch
141111
3. GitHub Actions workflow is triggered
@@ -151,9 +121,9 @@ kubectl exec -n argocd deployment/argocd-notifications-controller -- \
151121

152122
## Security Features
153123

154-
- ✅ Fine-grained GitHub token with minimal permissions
124+
- ✅ Fine-grained GitHub token with minimal permissions (Contents, Actions, Issues)
155125
- ✅ Token stored in Kubernetes secret (not in code)
156-
-Webhook secret for signature verification
126+
-Token authentication protects GitHub API endpoint
157127
- ✅ Automatic duplicate issue detection
158128
- ✅ Labels for easy filtering: `argocd-deployment-failure`, `automated`, `bug`
159129

@@ -179,17 +149,6 @@ kubectl get configmap argocd-notifications-cm -n argocd -o yaml
179149
3. Check workflow logs for errors
180150
4. Verify token permissions include "Actions: Read and write" and "Issues: Read and write"
181151

182-
## Webhook Secret
183-
184-
**Important:** The webhook secret is:
185-
```
186-
udd2UzDVgpRyrIw9XBW8YiNuLO9aCV/4eKFe/wlr4hU=
187-
```
188-
189-
This must be stored in:
190-
- ✅ Kubernetes: `argocd-notifications-secret` (already done)
191-
- ⚠️ GitHub: Repository secrets as `ARGOCD_WEBHOOK_SECRET` (you need to do this)
192-
193152
## Next Steps
194153

195154
After completing the setup:

.github/workflows/argocd-deployment-failure.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,6 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- name: Verify webhook signature
17-
id: verify
18-
env:
19-
PAYLOAD: ${{ toJson(github.event.client_payload) }}
20-
WEBHOOK_SECRET: ${{ secrets.ARGOCD_WEBHOOK_SECRET }}
21-
run: |
22-
# This is a placeholder - GitHub repository_dispatch doesn't include signatures
23-
# The security comes from the GitHub token scope limitation
24-
echo "Webhook received from ArgoCD"
25-
echo "App: ${{ github.event.client_payload.app_name }}"
26-
echo "Status: ${{ github.event.client_payload.operation_phase }}"
27-
2816
- name: Extract deployment info
2917
id: deployment_info
3018
run: |

0 commit comments

Comments
 (0)