Skip to content

Commit 6dd76a4

Browse files
Port-agent usage: Enhance SSL Certificate Configuration Documentation for Self-signed Certificates
1 parent e1eb7d6 commit 6dd76a4

File tree

1 file changed

+42
-22
lines changed
  • docs/actions-and-automations/setup-backend/webhook/port-execution-agent

1 file changed

+42
-22
lines changed

docs/actions-and-automations/setup-backend/webhook/port-execution-agent/usage.md

Lines changed: 42 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -80,36 +80,56 @@ For more information take a look at the Requests [proxy configuration documentat
8080

8181
### SSL Environment Configuration
8282

83-
### Certificate Configuration
84-
85-
#### Self-signed certificate
86-
87-
Use the following Helm values:
88-
- Set `selfSignedCertificate.enabled` to `true`.
89-
- Put your PEM-encoded CA content in `selfSignedCertificate.certificate`.
90-
91-
The certificate should be mounted to `/usr/local/share/ca-certificates/`.
92-
93-
`REQUESTS_CA_BUNDLE` is an environment variable used to specify a custom Certificate Authority (CA) bundle for verifying SSL/TLS certificates in HTTPS requests.
83+
### Self-signed Certificate Configuration
84+
85+
#### Option 1: Provide certificate in Helm values
86+
87+
```yaml
88+
selfSignedCertificate:
89+
enabled: true
90+
certificate: |
91+
-----BEGIN CERTIFICATE-----
92+
<YOUR_CERTIFICATE_CONTENT>
93+
-----END CERTIFICATE-----
94+
secret:
95+
useExistingSecret: false
96+
```
9497

95-
Set `REQUESTS_CA_BUNDLE` to the file path of your CA bundle, which should contain one or more CA certificates in PEM format.
98+
#### Option 2: Use existing Kubernetes secret
9699

97-
For example:
98-
```sh
99-
REQUESTS_CA_BUNDLE=/path/to/cacert.pem
100+
```yaml
101+
selfSignedCertificate:
102+
enabled: true
103+
secret:
104+
name: <SECRET_NAME>
105+
key: <CERTIFICATE_KEY>
106+
useExistingSecret: true
100107
```
101108

102-
This configuration directs the `requests` library to use the specified CA bundle for SSL/TLS certificate verification, overriding default system settings. It's useful for trusting self-signed certificates or certificates from a private CA.
109+
The Helm chart automatically:
110+
- Mounts the certificate to `/usr/local/share/ca-certificates/cert.crt`
111+
- Sets `SSL_CERT_FILE` and `REQUESTS_CA_BUNDLE` environment variables
112+
- Configures Python libraries (requests, httpx) to trust the certificate
103113

104114
#### Multiple certificates
105115

106-
Use the following Helm values:
107-
- Keep your certificate via `selfSignedCertificate` as above.
108-
- Add other certificates by supplying files via `extraVolumes` and mounting them with `extraVolumeMounts` into the container at `/usr/local/share/ca-certificates/<your-cert-name>.crt`.
116+
When multiple certificates are required, one certificate must be provided via `selfSignedCertificate` as described above. Additional certificates can be mounted using `extraVolumes` and `extraVolumeMounts`:
117+
118+
```yaml
119+
extraVolumes:
120+
- name: additional-certs
121+
secret:
122+
secretName: <ADDITIONAL_CERT_SECRET_NAME>
123+
extraVolumeMounts:
124+
- name: additional-certs
125+
mountPath: /usr/local/share/ca-certificates/<CERT_NAME>.crt
126+
subPath: <CERT_NAME>.crt
127+
readOnly: true
128+
```
109129

110-
:::info Certificate file requirements
111-
- Each certificate must be provided in a separate PEM file. Files containing multiple certificates are not supported.
112-
- Certificates must be mounted to `/usr/local/share/ca-certificates/` with a `.crt` file extension.
130+
:::info Certificate requirements
131+
- Each certificate must be provided in PEM format as a separate file
132+
- Certificates must be mounted to `/usr/local/share/ca-certificates/` with a `.crt` file extension
113133
:::
114134

115135
## Next Steps

0 commit comments

Comments
 (0)