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.
Files changed (30) hide show
  1. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/.gitignore +2 -1
  2. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/Cargo.lock +1 -1
  3. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/Cargo.toml +1 -1
  4. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/PKG-INFO +3 -3
  5. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/README.md +2 -2
  6. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/lib.rs +12 -0
  7. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/.cargo/config.toml +0 -0
  8. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/.github/workflows/ci.yml +0 -0
  9. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/LICENSE +0 -0
  10. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/img/logo.svg +0 -0
  11. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/img/request_lifecycle.svg +0 -0
  12. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/img/request_stages.svg +0 -0
  13. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/pyproject.toml +0 -0
  14. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/requirements.txt +0 -0
  15. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/credentials/hmac_keystore.rs +0 -0
  16. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/credentials/mod.rs +0 -0
  17. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/credentials/models.rs +0 -0
  18. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/credentials/secrets_proxy.rs +0 -0
  19. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/credentials/signer.rs +0 -0
  20. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/object_storage_proxy.pyi +0 -0
  21. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/parsers/cos_map.rs +0 -0
  22. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/parsers/credentials.rs +0 -0
  23. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/parsers/keystore.rs +0 -0
  24. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/parsers/mod.rs +0 -0
  25. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/parsers/path.rs +0 -0
  26. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/utils/mod.rs +0 -0
  27. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/src/utils/validator.rs +0 -0
  28. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/test_integration.sh +0 -0
  29. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/test_server.py +0 -0
  30. {object_storage_proxy-0.3.2 → object_storage_proxy-0.3.3}/uv.lock +0 -0
@@ -4,4 +4,5 @@
4
4
  .env
5
5
  .venv
6
6
  .DS_Store
7
- *.pem
7
+ *.pem
8
+ */with_*.log
@@ -1701,7 +1701,7 @@ dependencies = [
1701
1701
 
1702
1702
  [[package]]
1703
1703
  name = "object-storage-proxy"
1704
- version = "0.3.2"
1704
+ version = "0.3.3"
1705
1705
  dependencies = [
1706
1706
  "async-trait",
1707
1707
  "chrono",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "object-storage-proxy"
3
- version = "0.3.2"
3
+ version = "0.3.3"
4
4
  edition = "2024"
5
5
 
6
6
  [dependencies]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: object-storage-proxy
3
- Version: 0.3.2
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 the authorization token passed in the request.
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 the authorization token passed in the request.
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