object-storage-proxy 0.3.2__tar.gz → 0.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/.gitignore +2 -1
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/Cargo.lock +1 -1
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/Cargo.toml +1 -1
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/PKG-INFO +3 -3
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/README.md +2 -2
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/lib.rs +12 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/.cargo/config.toml +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/.github/workflows/ci.yml +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/LICENSE +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/img/logo.svg +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/img/request_lifecycle.svg +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/img/request_stages.svg +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/pyproject.toml +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/requirements.txt +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/credentials/hmac_keystore.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/credentials/mod.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/credentials/models.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/credentials/secrets_proxy.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/credentials/signer.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/object_storage_proxy.pyi +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/parsers/cos_map.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/parsers/credentials.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/parsers/keystore.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/parsers/mod.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/parsers/path.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/utils/mod.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/utils/validator.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/test_integration.sh +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/test_server.py +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: object-storage-proxy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Classifier: License :: Other/Proprietary License
|
|
5
5
|
Classifier: Programming Language :: Rust
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
@@ -176,7 +176,7 @@ s3 =
|
|
|
176
176
|
~/.aws/credentials
|
|
177
177
|
```ini
|
|
178
178
|
[osp]
|
|
179
|
-
aws_access_key_id = MYLOCAL123 # <-- this could be an openid connect/oauth2 token or anything that makes sense for your business
|
|
179
|
+
aws_access_key_id = MYLOCAL123 # <-- this could be an internal client identifier, to fetch openid connect/oauth2 token or anything that makes sense for your business
|
|
180
180
|
aws_secret_access_key = nothingmeaningful # <-- private key to sign original request
|
|
181
181
|
```
|
|
182
182
|
|
|
@@ -247,7 +247,7 @@ def lookup_secret_key(access_key: str) -> str | None:
|
|
|
247
247
|
def do_validation(token: str, bucket: str) -> bool:
|
|
248
248
|
""" Authorize the request based on token for the given bucket.
|
|
249
249
|
You can plug in your own authorization service here.
|
|
250
|
-
The token is
|
|
250
|
+
The token is a client identifier used to fetch an authorization token and further authenticate/authorize.
|
|
251
251
|
The bucket is the bucket name.
|
|
252
252
|
The function should return True if the request is authorized, False otherwise.
|
|
253
253
|
"""
|
|
@@ -156,7 +156,7 @@ s3 =
|
|
|
156
156
|
~/.aws/credentials
|
|
157
157
|
```ini
|
|
158
158
|
[osp]
|
|
159
|
-
aws_access_key_id = MYLOCAL123 # <-- this could be an openid connect/oauth2 token or anything that makes sense for your business
|
|
159
|
+
aws_access_key_id = MYLOCAL123 # <-- this could be an internal client identifier, to fetch openid connect/oauth2 token or anything that makes sense for your business
|
|
160
160
|
aws_secret_access_key = nothingmeaningful # <-- private key to sign original request
|
|
161
161
|
```
|
|
162
162
|
|
|
@@ -227,7 +227,7 @@ def lookup_secret_key(access_key: str) -> str | None:
|
|
|
227
227
|
def do_validation(token: str, bucket: str) -> bool:
|
|
228
228
|
""" Authorize the request based on token for the given bucket.
|
|
229
229
|
You can plug in your own authorization service here.
|
|
230
|
-
The token is
|
|
230
|
+
The token is a client identifier used to fetch an authorization token and further authenticate/authorize.
|
|
231
231
|
The bucket is the bucket name.
|
|
232
232
|
The function should return True if the request is authorized, False otherwise.
|
|
233
233
|
"""
|
|
@@ -7,6 +7,7 @@ use http::uri::Authority;
|
|
|
7
7
|
use parsers::cos_map::{CosMapItem, parse_cos_map};
|
|
8
8
|
use parsers::keystore::parse_hmac_list;
|
|
9
9
|
use pingora::http::ResponseHeader;
|
|
10
|
+
use pingora::protocols::ALPN;
|
|
10
11
|
use pingora::Result;
|
|
11
12
|
use pingora::proxy::{ProxyHttp, Session};
|
|
12
13
|
use pingora::server::Server;
|
|
@@ -268,6 +269,17 @@ impl ProxyHttp for MyProxy {
|
|
|
268
269
|
let addr = (endpoint.clone(), port);
|
|
269
270
|
|
|
270
271
|
let mut peer = Box::new(HttpPeer::new(addr, true, endpoint.clone()));
|
|
272
|
+
peer.options.alpn = ALPN::H2;
|
|
273
|
+
|
|
274
|
+
peer.options.max_h2_streams = 32;
|
|
275
|
+
peer.options.h2_ping_interval = Some(Duration::from_secs(30));
|
|
276
|
+
|
|
277
|
+
// todo: make ths configurable
|
|
278
|
+
|
|
279
|
+
// peer.options.idle_timeout = Some(Duration::from_secs(300));
|
|
280
|
+
// peer.options.connection_timeout = Some(Duration::from_secs(30));
|
|
281
|
+
// peer.options.read_timeout = Some(Duration::from_secs(300));
|
|
282
|
+
// peer.options.write_timeout = Some(Duration::from_secs(300));
|
|
271
283
|
|
|
272
284
|
debug!("peer: {:#?}", &peer);
|
|
273
285
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|