Skip to content

Commit 66ac205

Browse files
committed
Add docs and example for Agent Tokens
1 parent 925109b commit 66ac205

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

docs/public/03-configuration-reference.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ spec:
7171
userName:
7272
secretName: example-agent-connection-secret
7373
secretKey: userName
74+
token:
75+
secretName: example-agent-connection-secret
76+
secretKey: token
7477
```
7578

7679
| Property | Type | Required | Default Value | Description |
@@ -82,8 +85,12 @@ spec:
8285
| spec.serviceKey.secretKey | string | Yes | | The key of the value in the named Secret containing the serviceKey. |
8386
| spec.userName.secretName | string | Yes | | The name of the Secret containing the userName. |
8487
| spec.userName.secretKey | string | Yes | | The key of the value in the named Secret containing the userName. |
88+
| spec.token.secretName | string | Yes | | The name of the Secret containing the token. |
89+
| spec.token.secretKey | string | Yes | | The key of the value in the named Secret containing the token. |
8590

8691
- For security, Secrets referenced must be contained in the same namespace as the AgentConnection.
92+
- Either (`url`, `apiKey`, `serviceKey`, `userName`) or `token` should be used, not both. The Agent Token is a base64 encoded JSON object containing the url, api_key, service_key, and user_name configuration settings, allowing you to set them in a single value.
93+
- Minimum agent version for token support is: java 6.10.1, dotnet-core 4.3.2, nodejs 5.15.0, python 8.6.0, php 1.34.0
8794

8895
## AgentInjector
8996

@@ -205,6 +212,9 @@ spec:
205212
userName:
206213
secretName: default-agent-connection-secret
207214
secretKey: userName
215+
token:
216+
secretName: example-agent-connection-secret
217+
secretKey: token
208218
```
209219

210220
| Property | Type | Required | Default Value | Description |
@@ -214,3 +224,5 @@ spec:
214224

215225
- For security, ClusterAgentConnection manifests must be deployed into the same namespace of the operator.
216226
- Secrets referenced by ClusterAgentConnection must exist in the same namespace in which the ClusterAgentConnection entity is deployed.
227+
- Either (`url`, `apiKey`, `serviceKey`, `userName`) or `token` should be used, not both. The Agent Token is a base64 encoded JSON object containing the url, api_key, service_key, and user_name configuration settings, allowing you to set them in a single value.
228+
- Minimum agent version for token support is: java 6.10.1, dotnet-core 4.3.2, nodejs 5.15.0, python 8.6.0, php 1.34.0

docs/public/setup/02-configuration.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,36 @@ spec:
6767
```
6868

6969
In this example manifest, the Contrast Agent Operator will automatically inject the .NET Contrast agent into workloads (e.g. Deployments, DeploymentConfigs, etc.) that have the label `app=dotnet-hello-world` in the namespace `default`.
70+
71+
72+
## Agent Token auth configuration
73+
74+
The Agent Token is a base64 encoded JSON object containing the url, api_key, service_key, and user_name configuration settings, allowing you to set them in a single value. The minimum agent version for token support is: java 6.10.1, dotnet-core 4.3.2, nodejs 5.15.0, python 8.6.0, php 1.34.0
75+
76+
77+
```yaml
78+
apiVersion: v1
79+
kind: Secret
80+
metadata:
81+
name: default-agent-connection-secret
82+
namespace: contrast-agent-operator
83+
type: Opaque
84+
stringData:
85+
token: TODO
86+
```
87+
88+
> Finding your token is documented in the "[Find the agent keys](https://docs.contrastsecurity.com/en/find-the-agent-keys.html)" section.
89+
90+
```yaml
91+
apiVersion: agents.contrastsecurity.com/v1beta1
92+
kind: ClusterAgentConnection
93+
metadata:
94+
name: default-agent-connection
95+
namespace: contrast-agent-operator
96+
spec:
97+
template:
98+
spec:
99+
token:
100+
secretName: default-agent-connection-secret
101+
secretKey: token
102+
```

0 commit comments

Comments
 (0)