Overview
Temporary URLs (TempURLs) let you share individual objects from Polystack Object Storage with anyone — no Polystack account required — for a limited time window. The URL is cryptographically signed with an HMAC-SHA256 digest, so it cannot be guessed or extended. When the expiry time passes, the URL stops working automatically. Common use cases: pre-signed download links for customers, time-limited file sharing with external partners, secure upload URLs for untrusted clients, and CI/CD artifact distribution.Prerequisites
- Object Storage access with at least project member role
- The
python-swiftclientpackage installed (pip install python-swiftclient) or theopenstackCLI - A Temporary URL key set on your account
Set a Temporary URL Key
Before generating TempURLs, set a secret key on your account. This key signs all TempURLs — keep it confidential.- CLI (swift)
- CLI (openstack)
Set account-level TempURL key
Verify the key is set
Generate a Temporary URL
- CLI (swift-temp-url)
- Python
- Bash
The This outputs a path like:Prepend your Swift endpoint to get the full URL:
swift-temp-url command generates signed URLs directly:Generate a 24-hour download URL
Full shareable URL
Upload-Only Temporary URLs
Generate a PUT TempURL to allow a client to upload a file to a specific object path without any read access:Generate a 1-hour upload URL
Client-side upload with TempURL
URL Parameters Reference
Force a browser download filename
Key Rotation
Rotate TempURL keys without immediately breaking existing URLs by using both key slots:Set new key in slot 2
Add new key to slot 2
Migrate to new key
Update all URL generation processes to use the new key value from slot 2.
Replace old key
Once all old URLs have expired, move the new key to slot 1 and clear slot 2:
Promote new key to slot 1
Security Considerations
Keep expiry windows short
Keep expiry windows short
Set the minimum expiry needed for the use case. Downloads that should complete in minutes should not have 24-hour URLs. An attacker who intercepts a URL has access until expiry.
Use IP range restrictions for sensitive data
Use IP range restrictions for sensitive data
The
temp_url_ip_range parameter restricts URL use to a specific source IP or CIDR:Restrict to a single IP
Never expose your TempURL key
Never expose your TempURL key
The TempURL key signs all URLs for your account. Treat it like a password. Do not embed it in client-side code, public repositories, or logs. Rotate it if exposure is suspected.
Next Steps
Access Control
Container ACLs and account-level access policies for permanent access grants
Object Versioning
Retain previous versions of objects to recover from accidental overwrites
Large Objects
Upload objects larger than 5 GB using multi-part Static or Dynamic Large Objects
Object Storage Security
Server-side encryption, TLS, and hardening guidance for object storage
