Skip to content

Commit 75caf48

Browse files
Merge pull request #393 from MateSaary/deprecate-x-secret-token
OSD-27752: Deprecate x-secret-token
2 parents 2db698e + 91214fc commit 75caf48

File tree

5 files changed

+7
-21
lines changed

5 files changed

+7
-21
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ Grafana dashboard configmaps are stored in the [Dashboards](./dashboards/) direc
168168
* `CAD_PD_USERNAME`: refers to the username of CAD on PagerDuty
169169
* `CAD_SILENT_POLICY`: refers to the silent policy CAD should use if the incident shall be silent
170170
* `PD_SIGNATURE`: refers to the PagerDuty webhook signature (HMAC+SHA256)
171-
* `X_SECRET_TOKEN`: refers to our custom Secret Token for authenticating against our pipeline
172171
* `CAD_PROMETHEUS_PUSHGATEWAY`: refers to the URL cad will push metrics to
173172
* `BACKPLANE_URL`: refers to the backplane url to use
174173
* `BACKPLANE_INITIAL_ARN`: refers to the initial ARN used for the isolated backplane jumprole flow

deploy/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ See [../pkg/pagerduty/](../pkg/pagerduty/) for more details.
2727
##### OCM
2828
[task-cad-checks-secrets-ocm-client.yaml](./task-cad-checks-secrets-ocm-client.yaml) This will hold the ocm creds.
2929

30-
CAD_OCM_CLIENT_* env vars are in internal kv store.
30+
CAD_OCM_CLIENT_* env vars are in internal kv store.
3131

3232
See [../pkg/ocm/](../pkg/ocm/) for more details.
3333

@@ -49,11 +49,11 @@ Install CAD by running the following commands:
4949
```
5050

5151
2. Configure secrets
52-
52+
5353
See section at the bottom of `Tasks Secrets` to configure.
5454

5555
3. Deploy container image
56-
56+
5757
The repo builds the binary to a container using [../Dockerfile](a container file). build it using:
5858

5959
```console
@@ -92,7 +92,7 @@ Install CAD by running the following commands:
9292
Pipeline runs can be started via the following post command:
9393

9494
```console
95-
oc exec -it deploy/el-cad-event-listener -- curl -X POST -H 'X-Secret-Token: samplesecret' --connect-timeout 1 -v --data '{"event": {"data": {"id":"12312"}}}' http://el-cad-event-listener.configuration-anomaly-detection.svc.cluster.local:8080
95+
oc exec -it deploy/el-cad-event-listener -- curl -X POST -H 'X-PagerDuty-Signature: v1=samplesecret' --connect-timeout 1 -v --data '{"event": {"data": {"id":"12312"}}}' http://el-cad-event-listener.configuration-anomaly-detection.svc.cluster.local:8080
9696
```
9797

9898
For more details, see the [Tekton Documentation](https://github.com/tektoncd/triggers/tree/main/examples#invoking-the-triggers-locally).
@@ -110,7 +110,7 @@ The `tkn` tool is pulled from https://github.com/tektoncd/cli.
110110
The result of the last runs can be seen with:
111111

112112
```console
113-
tkn pipelinerun list -n configuration-anomaly-detection
113+
tkn pipelinerun list -n configuration-anomaly-detection
114114
```
115115

116116
See the [Tekton documentation](https://docs.openshift.com/container-platform/4.4/cli_reference/tkn_cli/op-tkn-reference.html) for further commands.

deploy/pipeline-trigger.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ metadata:
4949
name: cad-pipe-listener
5050
spec:
5151
interceptors:
52-
- ref:
53-
name: "cel"
54-
params:
55-
- name: "filter"
56-
value: "header.canonical('X-Secret-Token').compareSecret('X_SECRET_TOKEN', 'cad-pd-token')"
5752
# Enable after interceptor deployment is tested
5853
- ref:
5954
name: "cad-interceptor"
@@ -97,4 +92,4 @@ spec:
9792
valueFrom:
9893
secretKeyRef:
9994
key: tls.key
100-
name: cad-event-listener-tls-secret
95+
name: cad-event-listener-tls-secret

deploy/task-cad-checks-secrets-pd.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ stringData:
1010
CAD_PD_TOKEN: CHANGEME # refers to the generated private access token for token-based authentication
1111
CAD_PD_USERNAME: CHANGEME # refers to the username in case username/pw credentials should be used
1212
CAD_SILENT_POLICY: CHANGEME # refers to the silent policy CAD should use if the incident shall be silent
13-
X_SECRET_TOKEN: CHANGEME # refers to the PagerDuty webhook signature (HMAC+SHA256)
14-
PD_SIGNATURE: CHANGEME # refers to our custom Secret Token for authenticating against our pipeline
13+
PD_SIGNATURE: CHANGEME # refers to the PagerDuty webhook signature (HMAC+SHA256)

openshift/template.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,6 @@ objects:
154154
bindings:
155155
- ref: cad-check-trigger
156156
interceptors:
157-
- params:
158-
- name: filter
159-
value: header.canonical('X-Secret-Token').compareSecret('X_SECRET_TOKEN',
160-
'cad-pd-token')
161-
ref:
162-
name: cel
163157
- ref:
164158
kind: NamespacedInterceptor
165159
name: cad-interceptor
@@ -286,7 +280,6 @@ objects:
286280
CAD_PD_USERNAME: CHANGEME
287281
CAD_SILENT_POLICY: CHANGEME
288282
PD_SIGNATURE: CHANGEME
289-
X_SECRET_TOKEN: CHANGEME
290283
type: Opaque
291284
- apiVersion: tekton.dev/v1beta1
292285
kind: Task

0 commit comments

Comments
 (0)