npx skills add ...
npx skills add tigrisdata/skills --skill tigris-security-access-control
Use when configuring CORS, rotating access keys, setting bucket policies, or securing Tigris storage — covers key lifecycle, roles, CORS rules, presigned URL security, audit checklist
npx skills add tigrisdata/skills --skill tigris-security-access-control
Configure access keys, CORS rules, bucket visibility, and presigned URL security for Tigris object storage. Covers key lifecycle management, role-based access, and security auditing.
Before doing anything else, install the Tigris CLI if it's not already available:
If you need to install it, tell the user: "I'm installing the Tigris CLI (@tigrisdata/cli) so we can work with Tigris object storage."
| Operation | Command |
|---|---|
| Create key | tigris access-keys create "my-key" |
| List keys | tigris access-keys list |
| Assign to bucket | tigris access-keys assign <tid> --bucket <name> --role Editor |
| Revoke key | tigris access-keys delete <tid> |
| Set CORS | tigris buckets cors set <bucket> --config cors.json |
| Get CORS | tigris buckets cors get <bucket> |
| Remove CORS | tigris buckets cors delete <bucket> |
| Role | Read | Write | Delete | Use When |
|---|---|---|---|---|
Editor | Yes | Yes | Yes | App servers that upload/modify files |
ReadOnly | Yes | No | No | Services that only read/serve files |
Create separate keys for different concerns:
CORS is required for browser-based uploads (direct uploads, presigned PUT URLs).
Warning: Only use "*" origins for truly public, read-only content. Never allow PUT/DELETE from any origin.
| Setting | Who Can Read | URL Access | Use For |
|---|---|---|---|
| Private (default) | Only authenticated requests | Presigned URLs | User documents, sensitive files |
| Public | Anyone with URL | Direct URL | Static assets, public images, CDN content |
| Parameter | Recommendation |
|---|---|
| Expiration (download) | 5-60 minutes for most use cases |
| Expiration (upload) | 5-15 minutes |
| Scope | One URL per file, one operation per URL |
For CI/CD, use your platform's secrets management:
tid_ and tsec_ in your repo.env in .gitignore — credentials never committedReadOnly role"*" origin with write methodsIf an access key is exposed (committed to git, leaked in logs, etc.):
Always: Create separate keys per environment and concern | Assign keys to specific buckets with minimum required role | Rotate keys periodically (quarterly recommended) | Set CORS to specific origins in production | Use short-lived presigned URLs
Never: Commit keys to git | Use a single key for all environments | Set CORS to "*" with write methods | Share presigned URLs publicly | Keep unused keys active
| Problem | Fix |
|---|---|
| CORS preflight fails | Check AllowedOrigins includes your exact origin (with protocol) |
| "Access denied" after key rotation | Ensure new key is assigned to bucket with correct role |
| Secret key lost | Cannot recover — create new key and reassign |
| Browser upload fails silently | Check CORS config includes PUT in AllowedMethods |