Skip to content

Commit 7aede71

Browse files
committed
S3CSI-204: Add TLS configuration documentation
Add dedicated TLS configuration guide covering prerequisites, Helm values, verification steps, and troubleshooting. Update Helm chart reference with tls.* parameters. Add CA/PEM/TLS terms to glossary. Add TLS note to volume provisioning docs. Issue: S3CSI-204
1 parent 634c2c7 commit 7aede71

File tree

5 files changed

+181
-0
lines changed

5 files changed

+181
-0
lines changed

docs/concepts-and-reference/helm-chart-configuration-reference.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,24 @@ value: {{ coalesce .Values.node.s3EndpointUrl .Values.s3.endpointUrl | quote }}
153153
| `mountpointPod.headroomImage.tag` | Image tag for headroom pods. | `3.10` | No |
154154
| `mountpointPod.headroomImage.pullPolicy` | Image pull policy for headroom pods. | `IfNotPresent` | No |
155155

156+
## TLS Configuration
157+
158+
<!-- markdownlint-disable MD046 -->
159+
!!! info "Custom CA Certificates"
160+
When your S3 endpoint uses TLS with a private or internal CA, configure the `tls.*` parameters to inject the CA certificate.
161+
See the [TLS Configuration Guide](../driver-deployment/tls-configuration.md) for setup instructions.
162+
<!-- markdownlint-enable MD046 -->
163+
164+
| Parameter | Description | Default | Required |
165+
|------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|-----------------------------|
166+
| `tls.caCertConfigMap` | Name of the ConfigMap containing the CA certificate bundle (key: `ca-bundle.crt`). Must exist in both the controller namespace and `mountpointPod.namespace`. Leave empty to disable. | `""` | No |
167+
| `tls.initImage.repository` | Image repository for the CA certificate installation initContainer in mounter pods. | `alpine` | No |
168+
| `tls.initImage.tag` | Image tag for the CA certificate installation initContainer. | `3.21` | No |
169+
| `tls.initImage.pullPolicy` | Pull policy for the CA certificate init image. | `IfNotPresent` | No |
170+
| `tls.initResources.requests.cpu` | CPU request for the CA certificate init container. | `10m` | No |
171+
| `tls.initResources.requests.memory` | Memory request for the CA certificate init container. | `16Mi` | No |
172+
| `tls.initResources.limits.memory` | Memory limit for the CA certificate init container. | `64Mi` | No |
173+
156174
## CRD Cleanup Configuration (v2.0)
157175

158176
| Parameter | Description | Default | Required |
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# TLS Configuration
2+
3+
## Overview
4+
5+
When your S3 endpoint uses TLS with certificates signed by a private or internal CA,
6+
the CSI driver needs access to the CA certificate to validate the connection.
7+
The Scality CSI Driver supports injecting custom CA certificates via Kubernetes ConfigMaps.
8+
9+
This is required when:
10+
11+
- Your RING S3 endpoint uses HTTPS with a self-signed or internally-signed certificate
12+
- Your organization uses a private CA for internal services
13+
- The S3 endpoint's certificate chain is not in the default system trust store
14+
15+
## Prerequisites
16+
17+
- A PEM-encoded CA certificate file (the root or intermediate CA that signed your S3 server certificate)
18+
- The CSI driver Helm chart installed or ready to install
19+
20+
## Configuration
21+
22+
### Step 1: Create the CA Certificate ConfigMap
23+
24+
Create a ConfigMap containing your CA certificate in **both** the CSI driver namespace
25+
(typically `kube-system`) and the mounter pod namespace (typically `mount-s3`):
26+
27+
```bash
28+
# Create in the CSI driver namespace (controller uses this)
29+
kubectl create configmap s3-ca-cert \
30+
--from-file=ca-bundle.crt=/path/to/your/ca.crt \
31+
-n kube-system
32+
33+
# Create in the mounter pod namespace (mounter pods use this)
34+
kubectl create configmap s3-ca-cert \
35+
--from-file=ca-bundle.crt=/path/to/your/ca.crt \
36+
-n mount-s3
37+
```
38+
39+
<!-- markdownlint-disable MD046 -->
40+
!!! important "Key Name"
41+
The ConfigMap key **must** be `ca-bundle.crt`. This is the key the driver expects.
42+
<!-- markdownlint-enable MD046 -->
43+
44+
### Step 2: Install or Upgrade the Helm Chart
45+
46+
Set the `tls.caCertConfigMap` value to the name of your ConfigMap:
47+
48+
```bash
49+
helm upgrade --install scality-s3-csi \
50+
./charts/scality-mountpoint-s3-csi-driver \
51+
--namespace kube-system \
52+
--set s3.endpointUrl=https://s3.example.com:443 \
53+
--set tls.caCertConfigMap=s3-ca-cert
54+
```
55+
56+
### Step 3: Verify
57+
58+
Check that the controller pod has the CA certificate mounted:
59+
60+
```bash
61+
kubectl exec -n kube-system deploy/s3-csi-controller \
62+
-c s3-csi-controller -- ls /etc/ssl/custom-ca/
63+
```
64+
65+
Expected output: `ca-bundle.crt`
66+
67+
## How It Works
68+
69+
The TLS configuration operates at two levels:
70+
71+
### Controller Pod (Dynamic Provisioning)
72+
73+
The controller pod uses the CA certificate for S3 API calls (bucket creation/deletion)
74+
during dynamic provisioning:
75+
76+
- The ConfigMap is mounted at `/etc/ssl/custom-ca/` in the `s3-csi-controller` container
77+
- The `AWS_CA_BUNDLE` environment variable is set to `/etc/ssl/custom-ca/ca-bundle.crt`
78+
- AWS SDK Go v2 reads this variable and uses the CA certificate for TLS validation
79+
80+
### Mounter Pods (Volume Mounting)
81+
82+
Mounter pods use `mount-s3` (which uses s2n-tls) to mount S3 buckets.
83+
s2n-tls reads CA certificates from the system trust store (`/etc/ssl/certs/`),
84+
so a simple volume mount is not sufficient. Instead:
85+
86+
1. An **initContainer** (`install-ca-cert`) runs before the main `mountpoint` container
87+
2. The initContainer copies the system CA bundle from the Alpine image to a shared emptyDir volume
88+
3. It appends the custom CA certificate from the ConfigMap to the combined bundle
89+
4. The main container mounts the shared volume at `/etc/ssl/certs/` (read-only)
90+
5. `mount-s3` reads the combined trust store and validates the S3 endpoint certificate
91+
92+
The initContainer runs as non-root and complies with the PodSecurity `restricted` policy
93+
enforced on the mounter pod namespace.
94+
95+
## Helm Values Reference
96+
97+
| Parameter | Description | Default |
98+
| --------- | ----------- | ------- |
99+
| `tls.caCertConfigMap` | Name of the ConfigMap containing the CA certificate | `""` (disabled) |
100+
| `tls.initImage.repository` | Image repository for the CA cert init container | `alpine` |
101+
| `tls.initImage.tag` | Image tag for the CA cert init container | `3.21` |
102+
| `tls.initImage.pullPolicy` | Pull policy for the init image | `IfNotPresent` |
103+
| `tls.initResources.requests.cpu` | CPU request for the init container | `10m` |
104+
| `tls.initResources.requests.memory` | Memory request for the init container | `16Mi` |
105+
| `tls.initResources.limits.memory` | Memory limit for the init container | `64Mi` |
106+
107+
## Why ConfigMap Instead of Secret
108+
109+
CA certificates are public configuration data, not confidential information.
110+
Using ConfigMaps instead of Secrets:
111+
112+
- Follows the Kubernetes convention of using ConfigMaps for non-sensitive configuration
113+
- Avoids unnecessary RBAC complexity for managing Secrets
114+
- Makes the certificates easier to inspect and manage
115+
116+
## Troubleshooting
117+
118+
### Certificate Not Found
119+
120+
If mounter pods fail with TLS errors, verify:
121+
122+
1. The ConfigMap exists in the mounter pod namespace:
123+
124+
```bash
125+
kubectl get configmap s3-ca-cert -n mount-s3
126+
```
127+
128+
2. The ConfigMap has the correct key:
129+
130+
```bash
131+
kubectl get configmap s3-ca-cert -n mount-s3 -o jsonpath='{.data}' | head -c 100
132+
```
133+
134+
### Certificate Chain Issues
135+
136+
If you see certificate verification errors despite having the CA cert configured:
137+
138+
- Ensure you are providing the **root CA** certificate, not the server certificate
139+
- If using an intermediate CA, include the full chain in the `ca-bundle.crt` file
140+
- Verify the certificate is in PEM format (starts with `-----BEGIN CERTIFICATE-----`)
141+
142+
### Init Container Failures
143+
144+
If the init container fails, check its logs:
145+
146+
```bash
147+
kubectl logs <mounter-pod-name> -n mount-s3 -c install-ca-cert
148+
```
149+
150+
Common issues:
151+
152+
- The init image must include a system CA bundle at `/etc/ssl/certs/ca-certificates.crt`
153+
(Alpine includes this by default via the `ca-certificates` package)
154+
- The ConfigMap may not be mounted correctly

docs/glossary.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,36 @@ This glossary defines acronyms, technical terms, and concepts used throughout th
77
| Acronym | Full Form | Definition |
88
|---------|-----------|------------|
99
| **API** | Application Programming Interface | A set of protocols and tools for building software applications |
10+
| **CA** | Certificate Authority | Trusted entity that issues digital certificates for verifying identity |
1011
| **CLI** | Command Line Interface | A text-based interface for interacting with software |
1112
| **CRD** | Custom Resource Definition | Kubernetes extension mechanism for defining custom resources |
1213
| **CRT** | Common Runtime | AWS Common Runtime library used for S3 operations |
1314
| **CSI** | Container Storage Interface | A standard for exposing storage systems to containerized workloads |
1415
| **DNS** | Domain Name System | System that translates domain names to IP addresses |
16+
| **FUSE** | Filesystem in Userspace | Mechanism allowing non-privileged users to create file systems without editing kernel code |
1517
| **GID** | Group Identifier | Numeric identifier for a group in Unix-like systems |
1618
| **GHCR** | GitHub Container Registry | GitHub's container image registry service |
1719
| **HTTP** | Hypertext Transfer Protocol | Protocol for transferring data over the web |
1820
| **HTTPS** | HTTP Secure | Secure version of HTTP using encryption |
1921
| **IAM** | Identity and Access Management | System for managing user identities and permissions |
2022
| **JSON** | JavaScript Object Notation | Lightweight data interchange format |
2123
| **KMS** | Key Management Service | Service for managing encryption keys |
24+
| **PEM** | Privacy-Enhanced Mail | Text encoding format for cryptographic keys and certificates |
2225
| **POSIX** | Portable Operating System Interface | Set of standards for Unix-like operating systems |
2326
| **PV** | PersistentVolume | Kubernetes resource representing a piece of storage |
2427
| **PVC** | PersistentVolumeClaim | Kubernetes resource requesting storage from a PV |
2528
| **RBAC** | Role-Based Access Control | Method of restricting access based on user roles |
2629
| **S3** | Simple Storage Service | Object storage service protocol |
2730
| **S3PA** | S3 Pod Attachment (MountpointS3PodAttachment) | Kubernetes custom resource that tracks which workload pods are attached to a specific S3 volume, enabling volume sharing and mounter pod lifecycle management |
31+
| **s2n-tls** | Signal to Noise TLS | AWS's open-source TLS implementation used by mount-s3 |
2832
| **SDK** | Software Development Kit | Collection of tools for developing applications |
33+
| **SSL** | Secure Sockets Layer | Predecessor to TLS, often used colloquially to mean TLS |
2934
| **SSE** | Server-Side Encryption | Encryption of data at rest on the server |
35+
| **TLS** | Transport Layer Security | Cryptographic protocol for secure communication over networks |
3036
| **TTL** | Time To Live | Duration for which data is considered valid |
3137
| **UID** | User Identifier | Numeric identifier for a user in Unix-like systems |
3238
| **URL** | Uniform Resource Locator | Web address identifying a resource |
39+
| **X.509** | X.509 | ITU-T standard for public key certificates, used in TLS |
3340
| **YAML** | YAML Ain't Markup Language | Human-readable data serialization standard |
3441

3542
## Technical Terms

docs/volume-provisioning/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ The Scality CSI Driver for S3 supports two methods for creating and managing per
3131
**Common Configuration:**
3232

3333
- [Mount Options Reference](mount-options.md) - Customization options for both provisioning methods
34+
- [TLS Configuration](../driver-deployment/tls-configuration.md) - Custom CA certificate support for HTTPS S3 endpoints
3435
<!-- markdownlint-enable MD046 -->
3536

3637
### Quick Start: Static Provisioning

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ nav:
107107
- Installation Guide: driver-deployment/installation-guide.md
108108
- Upgrade Guide: driver-deployment/upgrade-guide.md
109109
- Node Startup Taint: driver-deployment/node-startup-taint.md
110+
- TLS Configuration: driver-deployment/tls-configuration.md
110111
- Uninstallation: driver-deployment/uninstallation.md
111112
- Volume Provisioning:
112113
- Overview: volume-provisioning/index.md

0 commit comments

Comments
 (0)