<object-storage-proxy ⚡> Yet Another Object Storage Proxy
Project description
Yet Another Object Storage Reverse Proxy
Introduction
secrets
IBM COS Storage is built in a way where buckets are grouped by a cos (Cloud Object Storage) instance. Access to a bucket is managed by either an api key or hmac secrets, configured on the cos instance.
endpoint
Each bucket has its own endpoint: <bucket_name>.s3..cloud-object-storage.appdomain.cloud:.
The port is not always different, though, but it might be. Depends on your implementation.
You can imagine managing multiple buckets across instances can become quite cumbersome, even with aws profiles etc.
solution
There are two ways to access a bucket: through virtual addressing style (bucket.ibm-cos-host:port) and path style (ibm-cos-host/bucket).
your client (aws s3 compatible) -> http(s)://this-proxy/bucket01 -> https://bucket01.s3.eu-de.cloud-object-storage.appdomain.cloud:443
- translate path style to virtual style
- abstract authentication & authorization
Pass in a function which maps bucket to instance (credentials), and a function to map bucket to port (endpoint)
┌──────┐ ┌────────────┐ ┌───────────┐ ┌───────┐
│Client│ │ReverseProxy│ │IAM_Service│ │IBM_COS│
└───┬──┘ └──────┬─────┘ └─────┬─────┘ └───┬───┘
│Path-style Request ┌┴┐ │ │
│──────────────────> │ │ │ │
│ │ │ │ │
│ │ │ ────┐ │ │
│ │ │ │ Extract credentials from request │ │
│ │ │ <───┘ │ │
│ │ │ │ │
│ │ │ ────┐ │ │
│ │ │ │ Check cache for valid credentials │ │
│ │ │ <───┘ │ │
│ │ │ │ │
│ │ │ │ │
│ ╔══════╤════════╪═╪═════════════════════════════════════════════════════════╪═══════════════╗ │
│ ║ ALT │ Credentials Not Found or Expired │ ║ │
│ ╟──────┘ │ │ │ ║ │
│ ║ │ │ Request IAM Verification ┌┴┐ ║ │
│ ║ │ │ ──────────────────────────────────────────────────────>│ │ ║ │
│ ║ │ │ └┬┘ ║ │
│ ║ │ │ Return Verified Credentials │ ║ │
│ ║ │ │ <─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─│ ║ │
│ ║ │ │ │ ║ │
│ ║ │ │ ────┐ │ ║ │
│ ║ │ │ │ Cache credentials │ ║ │
│ ║ │ │ <───┘ │ ║ │
│ ╠═══════════════╪═╪═════════════════════════════════════════════════════════╪═══════════════╣ │
│ ║ [Credentials Valid] │ ║ │
│ ║ │ │ ────┐ │ ║ │
│ ║ │ │ │ Use Cached Credentials │ ║ │
│ ║ │ │ <───┘ │ ║ │
│ ╚═══════════════╪═╪═════════════════════════════════════════════════════════╪═══════════════╝ │
│ │ │ │ │
│ │ │ ────┐ │ │
│ │ │ │ Translate path-style to virtual-style request │ │
│ │ │ <───┘ │ │
│ │ │ │ │
│ │ │ ────┐ │ │
│ │ │ │ Handle secrets and endpoint (incl. port) │ │
│ │ │ <───┘ │ │
│ │ │ │ │
│ │ │ Forward Virtual-style Request │ ┌┴┐
│ │ │ ───────────────────────────────────────────────────────────────────────────>│ │
│ │ │ │ │ │
│ │ │ Response │ │ │
│ │ │ <─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─│ │
│ └┬┘ │ └┬┘
│ Return Response │ │ │
│<─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ │ │
┌───┴──┐ ┌──────┴─────┐ ┌─────┴─────┐ ┌───┴───┐
│Client│ │ReverseProxy│ │IAM_Service│ │IBM_COS│
└──────┘ └────────────┘ └───────────┘ └───────┘
authentication & authorization
The advantage is we can plug in a python authentication function and another function for authorization, allowing for fine-grained control.
authentication
We use the standard aws hmac header.
authorization
Pass in a callable from python which will be called from rust. This will be cached (ttl) for consequtive requests.
Status
- pingora proxy implementation
- pass in credentials handler
- cache credentials
- pass in bucket/instance and bucket/port config
-
split in workspace crate with core, cli and python crates(too many specifics for python) - config mgmt
- cache authorization (with optional ttl)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file object_storage_proxy-0.1.0.tar.gz.
File metadata
- Download URL: object_storage_proxy-0.1.0.tar.gz
- Upload date:
- Size: 41.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ce7e65ce49216bc5cc519592dbbb01d4055943cbae704c82235c743d788bb18
|
|
| MD5 |
0e0fdcfc6363aa7bccf3268e2eab846e
|
|
| BLAKE2b-256 |
94d9fa5435db115e8cfe0ef09fac7e586690f5c938fe313572deefa7ebe9e5bd
|
File details
Details for the file object_storage_proxy-0.1.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: object_storage_proxy-0.1.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 8.8 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e50e7d40da26c30d01e4e76f63878b13059c9149895b472835795f903aed469a
|
|
| MD5 |
4f28d46a0f8f728a023bb4fe81388043
|
|
| BLAKE2b-256 |
33e01cfcbe7dd0d555267ea93747c7dacccc858dc66689e0cb01e82dd45a2902
|
File details
Details for the file object_storage_proxy-0.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: object_storage_proxy-0.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 8.8 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5ef66f12d227d6298e93904fa56363ab740820e3716c281aa7ba3a83d5e5fda
|
|
| MD5 |
f63ea2bf981f761ce2cc96766b433159
|
|
| BLAKE2b-256 |
424e80122738b8b634b8c653e90bacab622ad1a971a199839adc37f4f5d2ecfb
|
File details
Details for the file object_storage_proxy-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: object_storage_proxy-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a338cdb98843b6dfd00807cff5563b0bd1159abb6d3c35f32c6225d1406eac45
|
|
| MD5 |
2c596d0351b7d014d7c0c8c1563edbf7
|
|
| BLAKE2b-256 |
b8261ca5dce7dbdbd1392140ec90443694dfd188b378b2f085a68546e8efdb22
|
File details
Details for the file object_storage_proxy-0.1.0-cp313-cp313-macosx_10_12_x86_64.whl.
File metadata
- Download URL: object_storage_proxy-0.1.0-cp313-cp313-macosx_10_12_x86_64.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.13, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19ce22dc1f724b1c900ca5412060fe63cbbe8f37fc3bf130068144000a408ba9
|
|
| MD5 |
ba398bd6a6d07cbdb43a6a487f6ec755
|
|
| BLAKE2b-256 |
7e5c25e338efb68d8f2b5d224449890f7a61b2402b84c2c3547756dc0ed252d8
|
File details
Details for the file object_storage_proxy-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: object_storage_proxy-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd18a0d211e001494d37c57aea087d3081de62f336cd8d58107f3b7a0db05214
|
|
| MD5 |
bd8199c384f97f794febefbb0c6e6c7c
|
|
| BLAKE2b-256 |
3e571034c735e70a6c12896c58e39c8673a19000cc69eb978d86d48155e11545
|
File details
Details for the file object_storage_proxy-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl.
File metadata
- Download URL: object_storage_proxy-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.12, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bb96ed40aa7cf8cca03cbfcdc9bfc98564fda386a847e06a6c9e77c9ee9d791
|
|
| MD5 |
36720de7a24d1b19f0b09baef83ec37e
|
|
| BLAKE2b-256 |
97f3af531f6f55dca1aff57cd7659ba90d10460854e5835d12dc0bf9ff0094b8
|
File details
Details for the file object_storage_proxy-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: object_storage_proxy-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41f77d8a1e23ece30868a66a80e09073ffc1ba02fd3af5ebb9fc45b0e3bdec69
|
|
| MD5 |
f016650461d349d8df19e86c756d261e
|
|
| BLAKE2b-256 |
60bc1f034fd5d7887b9f85b1cbe7b369eb151b0c8edb1a7200ea0269b9bb3e8b
|
File details
Details for the file object_storage_proxy-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl.
File metadata
- Download URL: object_storage_proxy-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.11, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afb441f9e43c55dc8d2a11ba537fe7f2de1fdd50375cb827832eff1f14ab51d1
|
|
| MD5 |
c9890872795cc8a35a6c35104ebbb412
|
|
| BLAKE2b-256 |
5061fefa1cbae380e463ce16ee21f5823e563193392a7c9a51d04cdbe6df0eb3
|
File details
Details for the file object_storage_proxy-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: object_storage_proxy-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67cbc9014c4959201daa30c51c329aba2df8221ca41bfdd295939f1f16e43342
|
|
| MD5 |
0da9e1b78792ac51541e3e3fc4ff9cc4
|
|
| BLAKE2b-256 |
6914564878339baa01e44ce54424b84f42d6fbe508648a4e2346878af9ec6c03
|