object-storage-proxy 0.3.2__tar.gz → 0.3.4__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.4}/.github/workflows/ci.yml +1 -1
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/.gitignore +2 -1
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/Cargo.lock +1 -1
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/Cargo.toml +1 -1
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/PKG-INFO +3 -3
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/README.md +2 -2
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/src/credentials/signer.rs +3 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/src/lib.rs +14 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/.cargo/config.toml +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/LICENSE +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/img/logo.svg +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/img/request_lifecycle.svg +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/img/request_stages.svg +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/pyproject.toml +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/requirements.txt +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/src/credentials/hmac_keystore.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/src/credentials/mod.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/src/credentials/models.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/src/credentials/secrets_proxy.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/src/object_storage_proxy.pyi +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/src/parsers/cos_map.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/src/parsers/credentials.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/src/parsers/keystore.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/src/parsers/mod.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/src/parsers/path.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/src/utils/mod.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/src/utils/validator.rs +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/test_integration.sh +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/test_server.py +0 -0
- {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.4}/uv.lock +0 -0
|
@@ -235,7 +235,7 @@ jobs:
|
|
|
235
235
|
release:
|
|
236
236
|
name: Release
|
|
237
237
|
runs-on: ubuntu-latest
|
|
238
|
-
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
238
|
+
# if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
239
239
|
needs: [test, linux, musllinux, macos, sdist]
|
|
240
240
|
permissions:
|
|
241
241
|
# Use to sign the release artifacts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: object-storage-proxy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
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
|
"""
|
|
@@ -103,6 +103,8 @@ impl<'a> AwsSign<'a, HashMap<String, String>> {
|
|
|
103
103
|
"range",
|
|
104
104
|
"x-amz-content-sha256",
|
|
105
105
|
"x-amz-security-token",
|
|
106
|
+
"trailer",
|
|
107
|
+
"x-amz-trailer",
|
|
106
108
|
]
|
|
107
109
|
};
|
|
108
110
|
|
|
@@ -358,6 +360,7 @@ pub(crate) async fn sign_request(
|
|
|
358
360
|
// empty body → empty slice
|
|
359
361
|
"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" => &[], // sha256 hash of empty string
|
|
360
362
|
"UNSIGNED-PAYLOAD" => b"UNSIGNED-PAYLOAD",
|
|
363
|
+
"STREAMING-UNSIGNED-PAYLOAD-TRAILER" => b"STREAMING-UNSIGNED-PAYLOAD-TRAILER",
|
|
361
364
|
// unreachable code
|
|
362
365
|
_ => &[],
|
|
363
366
|
};
|
|
@@ -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;
|
|
@@ -269,6 +270,17 @@ impl ProxyHttp for MyProxy {
|
|
|
269
270
|
|
|
270
271
|
let mut peer = Box::new(HttpPeer::new(addr, true, endpoint.clone()));
|
|
271
272
|
|
|
273
|
+
// todo: make ths configurable
|
|
274
|
+
|
|
275
|
+
peer.options.max_h2_streams = 32;
|
|
276
|
+
peer.options.h2_ping_interval = Some(Duration::from_secs(30));
|
|
277
|
+
|
|
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));
|
|
283
|
+
|
|
272
284
|
debug!("peer: {:#?}", &peer);
|
|
273
285
|
|
|
274
286
|
if let Some(verify) = self.verify {
|
|
@@ -623,6 +635,8 @@ impl ProxyHttp for MyProxy {
|
|
|
623
635
|
"x-amz-content-sha256",
|
|
624
636
|
"x-amz-security-token",
|
|
625
637
|
"range",
|
|
638
|
+
"trailer",
|
|
639
|
+
"x-amz-trailer",
|
|
626
640
|
];
|
|
627
641
|
|
|
628
642
|
let to_check: Vec<String> = upstream_request
|
|
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
|