The files in CDPStorage can be reached in several ways: over the S3 API with access keys, with presigned URLs, in the CDPDrive web interface, through share links, through a JSON listing and through CDN addresses.
This page lists every real access path and how it is authenticated.<STORAGE_HOST>, <DRIVE_HOST> and <CDN_HOST> are the addresses of your own installation, for example storage.example.com, drive.example.com and cdn.example.com.
Access paths at a glance
| Path | Address | Authentication |
|---|---|---|
| S3 API | https://<STORAGE_HOST>/<BUCKET>/<key> | Access key, Signature V4 in the Authorization header |
| Presigned URL | same address with X-Amz-* query parameters | Signature V4 in the query, valid 1 s to 7 days |
| Web interface | https://<DRIVE_HOST> | User sign-in with password and TOTP |
| Share link | https://<DRIVE_HOST>/<10-character code> | Link, optionally with password |
| JSON listing | https://<DRIVE_HOST>/api/v1/projects/<PROJECT_ID>/objects | Signed-in session |
| CDN delivery | https://<CDN_HOST>/<ZONE>/<path> | Public, if CDN is enabled for the project |
S3 API
The S3 API is the native access path of CDPStorage.
It is meant for programs, scripts, servers and backup tools.
- Endpoint:
https://<STORAGE_HOST>, port 443 only. Plain HTTP is redirected to HTTPS. - Addressing: path style only. The bucket is the first path segment. Addresses of the form
<BUCKET>.<STORAGE_HOST>are not supported. - Region: any string is accepted, because the signing key is derived from the region your program sends.
eu-frais the value the installation reports. - Signature: AWS Signature Version 4 (
AWS4-HMAC-SHA256), service names3. Signature Version 2 is rejected. - Payload: the header
x-amz-content-sha256is required. It may contain the SHA-256 of the body,UNSIGNED-PAYLOADor one of the streaming values for aws-chunked uploads (signed, signed with trailer, unsigned with trailer). - Clock: the request time may differ from the server time by at most 15 minutes.
Every request is checked against the key: the key must exist, must not be disabled or expired, and –
if an IP allow list is set –
must come from an allowed address.
Then the rights of the key (read, write, delete) are checked for the project and, if set, the prefix.
Presigned URLs
A program that holds a key can create a presigned URL and pass it to someone who has no key, for example for a single download.
The signature is in the query parameters X-Amz-Algorithm, X-Amz-Credential, X-Amz-Date, X-Amz-Expires, X-Amz-SignedHeaders and X-Amz-Signature.X-Amz-Expires must be between 1 and 604800 seconds.
After that time the URL answers with AccessDenied ("Request has expired").
The rights and the IP list of the signing key apply.
Web interface (CDPDrive)
All objects stored over S3 are visible in the CDPDrive file browser of the project, and files uploaded in the browser are readable over S3. Users sign in with e-mail address and password;
TOTP one-time codes are required for administrators by default and can be required for all users.
Inside a project, users have a role: administrators see every project, other users see the projects they are members of (project role viewer, editor or admin).
Only administrators open the pages "Access keys (S3)", "Storage nodes" and "Settings".
Share links
For people without an account, CDPDrive creates share links of the form https://<DRIVE_HOST>/<code> with a 10-character code.
They can have a password, an expiry date, a download limit or be one-time links.
Share links are a function of CDPDrive;
the S3 endpoint itself never serves files without a signature.
JSON listing
GET https://<DRIVE_HOST>/api/v1/projects/<PROJECT_ID>/objects returns the files and folders of a project as JSON (key, name, size, type, ETag, download address, CDN addresses, tags).
Optional query parameters: prefix for a folder and q for a search.
This listing uses the session of a signed-in user, not an access key;
it is used by the media picker and the CDPCMS module.<PROJECT_ID> is the number of the project in the address of its page in CDPDrive (https://<DRIVE_HOST>/projects/<PROJECT_ID>), not the bucket name.
CDN addresses
If CDN delivery is enabled for the project, each file is publicly reachable at https://<CDN_HOST>/<ZONE>/<path>, where the zone has the name of the bucket.
Raster images are also available in the widths 480, 960 and 1440.
Switch off CDN for a project if its files must stay private.