object-storage-proxy 0.4.3__tar.gz → 0.5.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 (126) hide show
  1. object_storage_proxy-0.5.3/.env.example +52 -0
  2. object_storage_proxy-0.5.3/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
  3. object_storage_proxy-0.5.3/.github/ISSUE_TEMPLATE/feature_request.md +21 -0
  4. object_storage_proxy-0.5.3/.github/PULL_REQUEST_TEMPLATE.md +20 -0
  5. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/.github/workflows/ci.yml +53 -36
  6. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/.gitignore +2 -0
  7. object_storage_proxy-0.5.3/CHANGELOG.md +69 -0
  8. object_storage_proxy-0.5.3/CODE_OF_CONDUCT.md +41 -0
  9. object_storage_proxy-0.5.3/CONTRIBUTING.md +101 -0
  10. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/Cargo.lock +1015 -1256
  11. object_storage_proxy-0.5.3/Cargo.toml +70 -0
  12. object_storage_proxy-0.5.3/DEVELOP.md +167 -0
  13. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/LICENSE +1 -1
  14. object_storage_proxy-0.5.3/PKG-INFO +275 -0
  15. object_storage_proxy-0.5.3/README.md +254 -0
  16. object_storage_proxy-0.5.3/SECURITY.md +36 -0
  17. object_storage_proxy-0.5.3/TODO.md +38 -0
  18. object_storage_proxy-0.5.3/Taskfile.yml +116 -0
  19. object_storage_proxy-0.5.3/examples/minimal_server.py +91 -0
  20. object_storage_proxy-0.5.3/flake.lock +82 -0
  21. object_storage_proxy-0.5.3/flake.nix +95 -0
  22. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/pyproject.toml +7 -4
  23. object_storage_proxy-0.5.3/src/credentials/hmac_keystore.rs +59 -0
  24. object_storage_proxy-0.5.3/src/credentials/mod.rs +12 -0
  25. object_storage_proxy-0.5.3/src/credentials/models.rs +115 -0
  26. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/src/credentials/secrets_proxy.rs +69 -20
  27. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/src/credentials/signer.rs +336 -102
  28. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/src/lib.rs +504 -230
  29. object_storage_proxy-0.5.3/src/object_storage_proxy.pyi +40 -0
  30. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/src/parsers/cos_map.rs +132 -1
  31. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/src/parsers/credentials.rs +119 -49
  32. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/src/parsers/keystore.rs +14 -9
  33. object_storage_proxy-0.5.3/src/parsers/mod.rs +12 -0
  34. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/src/parsers/path.rs +30 -11
  35. object_storage_proxy-0.5.3/src/utils/banner.rs +32 -0
  36. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/src/utils/functions.rs +11 -8
  37. object_storage_proxy-0.5.3/src/utils/mod.rs +12 -0
  38. object_storage_proxy-0.5.3/src/utils/response.rs +39 -0
  39. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/src/utils/validator.rs +62 -40
  40. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/test_integration.sh +0 -0
  41. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/test_server.py +1 -0
  42. object_storage_proxy-0.5.3/tests/__init__.py +0 -0
  43. object_storage_proxy-0.5.3/tests/test_config.py +64 -0
  44. object_storage_proxy-0.5.3/uv.lock +214 -0
  45. object_storage_proxy-0.4.3/Cargo.toml +0 -61
  46. object_storage_proxy-0.4.3/PKG-INFO +0 -425
  47. object_storage_proxy-0.4.3/README.md +0 -406
  48. object_storage_proxy-0.4.3/src/credentials/hmac_keystore.rs +0 -34
  49. object_storage_proxy-0.4.3/src/credentials/mod.rs +0 -4
  50. object_storage_proxy-0.4.3/src/credentials/models.rs +0 -58
  51. object_storage_proxy-0.4.3/src/object_storage_proxy.pyi +0 -22
  52. object_storage_proxy-0.4.3/src/parsers/mod.rs +0 -4
  53. object_storage_proxy-0.4.3/src/utils/mod.rs +0 -2
  54. object_storage_proxy-0.4.3/uv.lock +0 -43
  55. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/.cargo/config.toml +0 -0
  56. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/img/logo.svg +0 -0
  57. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/img/request_lifecycle.svg +0 -0
  58. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/img/request_stages.svg +0 -0
  59. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/docker/Dockerfile +0 -0
  60. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/presto/docker-compose.yml +0 -0
  61. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/presto/etc/catalog/hive.properties +0 -0
  62. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/presto/etc/config.properties +0 -0
  63. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/presto/etc/hadoop-conf/core-site.xml +0 -0
  64. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/presto/etc/hadoop-conf/hive-site.xml +0 -0
  65. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/presto/etc/jvm.config +0 -0
  66. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/presto/hive-conf/hive-site.xml +0 -0
  67. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/presto/query.sql +0 -0
  68. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/presto/worker/etc/catalog/hive.properties +0 -0
  69. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/presto/worker/etc/config.properties +0 -0
  70. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/presto/worker/etc/hadoop-conf/core-site.xml +0 -0
  71. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/presto/worker/etc/hadoop-conf/hive-site.xml +0 -0
  72. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/presto/worker/etc/jvm.config +0 -0
  73. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/presto/worker/etc/log.properties +0 -0
  74. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/presto/worker/etc/node.properties +0 -0
  75. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/compose.yml +0 -0
  76. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/conf/hive-site.xml +0 -0
  77. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/coordinator/etc/catalog/hive.properties +0 -0
  78. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/coordinator/etc/catalog/tpcds.properties +0 -0
  79. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/coordinator/etc/catalog/tpch.properties +0 -0
  80. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/coordinator/etc/config.properties +0 -0
  81. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/coordinator/etc/hadoop-conf/core-site.xml +0 -0
  82. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/coordinator/etc/hadoop-conf/hive-site.xml +0 -0
  83. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/coordinator/etc/jvm.config +0 -0
  84. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/coordinator/etc/log.properties +0 -0
  85. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/coordinator/etc/node.properties +0 -0
  86. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/etc/catalog/hive.properties +0 -0
  87. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/etc/catalog/tpcds.properties +0 -0
  88. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/etc/catalog/tpch.properties +0 -0
  89. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/etc/config.properties +0 -0
  90. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/etc/hadoop-conf/core-site.xml +0 -0
  91. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/etc/hadoop-conf/hive-site.xml +0 -0
  92. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/etc/jvm.config +0 -0
  93. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/etc/log.properties +0 -0
  94. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/etc/node.properties +0 -0
  95. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/hadoop-conf/core-site.xml +0 -0
  96. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/hadoop-conf/hive-site.xml +0 -0
  97. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/lib/postgresql-42.7.4.jar +0 -0
  98. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/README.md +0 -0
  99. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/assets/bucket.png +0 -0
  100. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/assets/login.png +0 -0
  101. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/assets/metastore.png +0 -0
  102. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/assets/minio.png +0 -0
  103. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/assets/runtime.png +0 -0
  104. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/assets/storage.png +0 -0
  105. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/assets/tiny.png +0 -0
  106. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/conf/core-site.xml +0 -0
  107. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/conf/metastore-site.xml +0 -0
  108. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/docker-compose.yml +0 -0
  109. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/etc/catalog/minio.properties +0 -0
  110. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/etc/catalog/tpcds.properties +0 -0
  111. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/etc/catalog/tpch.properties +0 -0
  112. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/etc/config.properties +0 -0
  113. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/etc/jvm.config +0 -0
  114. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/etc/log.properties +0 -0
  115. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/trino-minio/etc/node.properties +0 -0
  116. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/worker/etc/catalog/hive.properties +0 -0
  117. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/worker/etc/catalog/tpcds.properties +0 -0
  118. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/worker/etc/catalog/tpch.properties +0 -0
  119. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/worker/etc/config.properties +0 -0
  120. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/worker/etc/hadoop-conf/core-site.xml +0 -0
  121. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/worker/etc/hadoop-conf/hive-site.xml +0 -0
  122. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/worker/etc/jvm.config +0 -0
  123. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/worker/etc/log.properties +0 -0
  124. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/integration/trino/worker/etc/node.properties +0 -0
  125. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/localhost.cnf +0 -0
  126. {object_storage_proxy-0.4.3 → object_storage_proxy-0.5.3}/requirements.txt +0 -0
@@ -0,0 +1,52 @@
1
+ # Environment variables
2
+
3
+ Copy this file to .env and fill in your values.
4
+ The .env file is excluded from version control.
5
+
6
+ # ---------------------------------------------------------------------------
7
+ # IBM Cloud Object Storage
8
+ # ---------------------------------------------------------------------------
9
+
10
+ # IAM API key used to fetch bearer tokens for COS buckets that use API key auth.
11
+ COS_API_KEY=
12
+
13
+ # Default HMAC keypair (used by do_hmac_creds fallback).
14
+ ACCESS_KEY=
15
+ SECRET_KEY=
16
+
17
+ # Per-bucket HMAC keypairs. The naming convention is <PREFIX>_ACCESS_KEY / <PREFIX>_SECRET_KEY.
18
+ # The hmac_fetcher callable resolves the secret key from the access key by scanning
19
+ # all environment variables that follow this pattern.
20
+ LOCAL2_ACCESS_KEY=
21
+ LOCAL2_SECRET_KEY=
22
+
23
+ PROXY_BUCKET05_ACCESS_KEY=
24
+ PROXY_BUCKET05_SECRET_KEY=
25
+
26
+ # ---------------------------------------------------------------------------
27
+ # AWS
28
+ # ---------------------------------------------------------------------------
29
+
30
+ AWS_ACCESS_KEY=
31
+ AWS_SECRET_KEY=
32
+
33
+ # Required for AWS CLI >= 2.x to avoid checksum errors with the proxy.
34
+ AWS_REQUEST_CHECKSUM_CALCULATION=WHEN_REQUIRED
35
+
36
+ # ---------------------------------------------------------------------------
37
+ # TLS (HTTPS frontend)
38
+ # ---------------------------------------------------------------------------
39
+
40
+ # Full paths to the TLS certificate and private key used by the HTTPS listener.
41
+ # Generate self-signed certs for local development:
42
+ # openssl req -x509 -nodes -days 365 -newkey rsa:4096 \
43
+ # -keyout key.pem -out cert.pem -config localhost.cnf
44
+ TLS_CERT_PATH=
45
+ TLS_KEY_PATH=
46
+
47
+ # ---------------------------------------------------------------------------
48
+ # Proxy behaviour
49
+ # ---------------------------------------------------------------------------
50
+
51
+ # Set to "true" to enable per-URL request counting (exposed via get_request_count()).
52
+ OSP_ENABLE_REQUEST_COUNTING=false
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report a reproducible defect
4
+ labels: bug
5
+ ---
6
+
7
+ **Describe the bug**
8
+
9
+ A clear and concise description of what the bug is.
10
+
11
+ **To reproduce**
12
+
13
+ Steps to reproduce the behaviour:
14
+
15
+ 1. Configure `ProxyServerConfig` with ...
16
+ 2. Send request ...
17
+ 3. See error ...
18
+
19
+ **Expected behaviour**
20
+
21
+ What you expected to happen.
22
+
23
+ **Actual behaviour**
24
+
25
+ What actually happened. Include relevant log output (redact any credentials).
26
+
27
+ **Environment**
28
+
29
+ - object-storage-proxy version:
30
+ - Python version:
31
+ - Rust version (`rustc --version`):
32
+ - OS:
33
+ - Client (aws-cli / boto3 / polars / other):
34
+
35
+ **Additional context**
36
+
37
+ Add any other context about the problem here.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest a new capability or improvement
4
+ labels: enhancement
5
+ ---
6
+
7
+ **Is your feature request related to a problem?**
8
+
9
+ A clear and concise description of what the problem is.
10
+
11
+ **Describe the solution you'd like**
12
+
13
+ A clear and concise description of what you want to happen.
14
+
15
+ **Describe alternatives you've considered**
16
+
17
+ Any alternative solutions or features you have considered.
18
+
19
+ **Additional context**
20
+
21
+ Add any other context, links, or screenshots here.
@@ -0,0 +1,20 @@
1
+ ## Summary
2
+
3
+ Briefly describe what this PR does and why.
4
+
5
+ ## Related issue
6
+
7
+ Closes #
8
+
9
+ ## Changes
10
+
11
+ -
12
+ -
13
+
14
+ ## Checklist
15
+
16
+ - [ ] Tests added or updated for every changed behaviour
17
+ - [ ] `cargo fmt` passes
18
+ - [ ] `cargo clippy -- -D warnings` passes with no new warnings
19
+ - [ ] `CHANGELOG.md` updated under `Unreleased`
20
+ - [ ] No credentials, personal paths, or debug prints introduced
@@ -14,8 +14,22 @@ permissions:
14
14
  contents: read
15
15
 
16
16
  jobs:
17
- test:
18
- name: Test
17
+ lint:
18
+ name: Lint
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - name: Install Rust stable
23
+ uses: dtolnay/rust-toolchain@stable
24
+ with:
25
+ components: rustfmt, clippy
26
+ - name: Check formatting
27
+ run: cargo fmt --check
28
+ - name: Clippy
29
+ run: cargo clippy -- -D warnings
30
+
31
+ test_rust:
32
+ name: Test (Rust)
19
33
  runs-on: ubuntu-latest
20
34
 
21
35
  steps:
@@ -23,8 +37,33 @@ jobs:
23
37
  - name: Setup Rust
24
38
  uses: PyO3/maturin-action@v1
25
39
  - name: Run cargo tests
40
+ env:
41
+ AWS_LC_SYS_NO_ASM: "1"
26
42
  run: cargo test --all-features
27
43
 
44
+ test_python:
45
+ name: Test (Python)
46
+ runs-on: ubuntu-latest
47
+
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+ - uses: actions/setup-python@v5
51
+ with:
52
+ python-version: '3.12'
53
+ - name: Install uv
54
+ uses: astral-sh/setup-uv@v5
55
+ - name: Build and install extension
56
+ uses: PyO3/maturin-action@v1
57
+ env:
58
+ AWS_LC_SYS_NO_ASM: "1"
59
+ with:
60
+ args: --out dist --find-interpreter
61
+ - name: Install wheel and test deps
62
+ run: |
63
+ uv pip install --system dist/*.whl pytest
64
+ - name: Run pytest
65
+ run: pytest tests/
66
+
28
67
 
29
68
  linux:
30
69
  runs-on: ${{ matrix.platform.runner }}
@@ -32,12 +71,12 @@ jobs:
32
71
  strategy:
33
72
  matrix:
34
73
  platform:
74
+ # x86_64: standard hosted runner, native build
35
75
  - runner: ubuntu-22.04
36
76
  target: x86_64
37
- # - runner: ubuntu-22.04
38
- # target: aarch64
39
- # - runner: ubuntu-22.04
40
- # target: armv7
77
+ # aarch64: GitHub's native ARM runner — no cross-compilation, no stdatomic.h issues
78
+ - runner: ubuntu-22.04-arm
79
+ target: aarch64
41
80
 
42
81
  steps:
43
82
  - uses: actions/checkout@v4
@@ -45,43 +84,23 @@ jobs:
45
84
  - uses: actions/setup-python@v5
46
85
  with:
47
86
  python-version: 3.12
48
- # - name: Export aarch64 cross-compiler
49
- # if: matrix.platform.target == 'aarch64'
50
- # run: echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
51
-
52
- - name: Install AArch64 cross-compiler
53
- run: |
54
- sudo apt-get update
55
- sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
56
87
 
57
88
  - name: Build wheels
58
89
  uses: PyO3/maturin-action@v1
59
90
  env:
60
- # point maturin's cc-rs at the aarch64 cross-compiler
61
- CC_aarch64_unknown_linux_gnu: gcc-aarch64-linux-gnu
62
- CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: gcc-aarch64-linux-gnu
63
- # force the assembler to know it's ARMv8-A
64
- CFLAGS_aarch64_unknown_linux_gnu: "-march=armv8-a -D__ARM_ARCH=8"
91
+ # OPENSSL_STATIC=1: statically link OpenSSL into the wheel — no runtime dependency for users.
92
+ # openssl-src builds OpenSSL from source (fully vendored); perl-core in before-script provides
93
+ # the perl modules (IPC::Cmd, Time::Piece, etc.) that openssl-src's Configure script requires.
94
+ OPENSSL_STATIC: "1"
65
95
  with:
66
96
  target: ${{ matrix.platform.target }}
67
97
  args: --release --out dist --find-interpreter
68
98
  sccache: 'true'
69
99
  manylinux: auto
70
100
  before-script-linux: |
71
- # If we're running on rhel centos, install needed packages.
72
- if command -v yum &> /dev/null; then
73
- yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic perl-CPAN
74
-
75
- # If we're running on i686 we need to symlink libatomic
76
- # in order to build openssl with -latomic flag.
77
- if [[ ! -d "/usr/lib64" ]]; then
78
- ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
79
- fi
80
- else
81
- # If we're running on debian-based system.
82
- apt update -y && apt-get install -y libssl-dev openssl pkg-config
83
- fi
84
-
101
+ # perl-core provides the full perl stdlib (IPC::Cmd, Time::Piece, etc.) required by
102
+ # openssl-src's Configure script when building OpenSSL from source.
103
+ yum install -y perl-core
85
104
 
86
105
  - name: Upload wheels
87
106
  uses: actions/upload-artifact@v4
@@ -196,8 +215,6 @@ jobs:
196
215
  strategy:
197
216
  matrix:
198
217
  platform:
199
- - runner: macos-13
200
- target: x86_64
201
218
  - runner: macos-14
202
219
  target: aarch64
203
220
  steps:
@@ -236,7 +253,7 @@ jobs:
236
253
  name: Release
237
254
  runs-on: ubuntu-latest
238
255
  # if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
239
- needs: [test, linux, musllinux, macos, sdist]
256
+ needs: [lint, test_rust, test_python, linux, musllinux, macos, sdist]
240
257
  permissions:
241
258
  # Use to sign the release artifacts
242
259
  id-token: write
@@ -1,4 +1,6 @@
1
1
  /target
2
+ dist/
3
+ target/wheels/
2
4
  .ibm_cos_creds
3
5
  .Idea/
4
6
  .env
@@ -0,0 +1,69 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+ - `flake.nix` for reproducible Rust + Python development environment via Nix.
12
+ - `Taskfile.yml` with tasks for build, run, test, lint, and clean.
13
+ - `BUILD.md` with detailed build and run instructions.
14
+ - `CONTRIBUTING.md`, `CHANGELOG.md`, `CODE_OF_CONDUCT.md`, `SECURITY.md`.
15
+ - GitHub issue templates and pull request template.
16
+ - `.env.example` documenting all required environment variables.
17
+
18
+ ### Changed
19
+ - Fixed `pyproject.toml` license classifier from Proprietary to MIT.
20
+ - Added `license`, `homepage`, `repository`, and `description` to `Cargo.toml`.
21
+ - Updated `object_storage_proxy.pyi` stub with all `ProxyServerConfig` parameters.
22
+ - Commented out broken `[tool.uv.workspace]` entry (integration/ has no pyproject.toml).
23
+
24
+ ### Fixed
25
+ - Unused import compiler warnings resolved via `cargo fix`.
26
+
27
+ ## [0.4.3] - 2025-04-19
28
+
29
+ ### Added
30
+ - Configurable `max_presign_url_usage_attempts` for presigned URL access control.
31
+ - `server_name` field on `ProxyServerConfig`.
32
+ - `hmac_fetcher` callable for dynamic secret key lookup by access key.
33
+
34
+ ### Changed
35
+ - Migrated from `pingora 0.4` (OpenSSL) to `pingora 0.5` (rustls).
36
+ - Switched from `openssl` to `rustls` + `aws-lc-rs` throughout.
37
+
38
+ ## [0.4.0] - 2025-03-01
39
+
40
+ ### Added
41
+ - Configurable request counting (`enable_request_counting`, `disable_request_counting`, `get_request_count`).
42
+ - `skip_signature_validation` option for development use.
43
+ - `verify` option to disable upstream TLS certificate verification.
44
+ - `hmac_keystore` support for multi-credential HMAC key management.
45
+
46
+ ### Changed
47
+ - `ProxyServerConfig` now accepts `hmac_keystore` as a list of access/secret key dicts.
48
+
49
+ ## [0.3.0] - 2025-01-15
50
+
51
+ ### Added
52
+ - Python callable for authorization (`validator`).
53
+ - TTL-based authorization cache.
54
+ - HTTP/2 support on the HTTPS frontend.
55
+
56
+ ## [0.2.0] - 2024-11-01
57
+
58
+ ### Added
59
+ - Python callable for credential fetching (`bucket_creds_fetcher`).
60
+ - IBM COS IAM bearer token cache with configurable TTL.
61
+ - Path-style to virtual-style address translation.
62
+
63
+ ## [0.1.0] - 2024-09-01
64
+
65
+ ### Added
66
+ - Initial release.
67
+ - Pingora-based reverse proxy for AWS S3 and IBM Cloud Object Storage.
68
+ - AWS SigV4 request re-signing.
69
+ - `ProxyServerConfig` Python class with `cos_map`, `http_port`, `https_port`, `threads`.
@@ -0,0 +1,41 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, colour, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our standards
10
+
11
+ Examples of behaviour that contributes to a positive environment:
12
+
13
+ - Demonstrating empathy and kindness toward other people
14
+ - Being respectful of differing opinions, viewpoints, and experiences
15
+ - Giving and gracefully accepting constructive feedback
16
+ - Accepting responsibility and apologising to those affected by our mistakes, and learning from the experience
17
+ - Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behaviour:
20
+
21
+ - The use of sexualised language or imagery, and sexual attention or advances of any kind
22
+ - Trolling, insulting or derogatory comments, and personal or political attacks
23
+ - Public or private harassment
24
+ - Publishing others' private information, such as a physical or email address, without their explicit permission
25
+ - Other conduct which could reasonably be considered inappropriate in a professional setting
26
+
27
+ ## Enforcement responsibilities
28
+
29
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behaviour and will take appropriate and fair corrective action in response to any behaviour that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported to the community leaders responsible for enforcement at jeroen@flexworks.eu. All complaints will be reviewed and investigated promptly and fairly.
38
+
39
+ ## Attribution
40
+
41
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
@@ -0,0 +1,101 @@
1
+ # Contributing
2
+
3
+ Thank you for considering a contribution to object-storage-proxy. The following guidelines help keep the process smooth for everyone.
4
+
5
+ ## Code of conduct
6
+
7
+ This project follows the [Contributor Covenant](CODE_OF_CONDUCT.md). Please read it before participating.
8
+
9
+ ## Getting started
10
+
11
+ 1. Fork the repository and clone your fork.
12
+ 2. Create a feature or fix branch from `main`:
13
+ ```bash
14
+ git checkout -b feat/my-feature
15
+ # or
16
+ git checkout -b fix/my-bug
17
+ ```
18
+ 3. Set up the development environment (see [BUILD.md](BUILD.md)).
19
+ 4. Make your changes, add tests, and ensure everything passes.
20
+ 5. Open a pull request against `main`.
21
+
22
+ ## Development setup
23
+
24
+ ```bash
25
+ # Install Rust (stable)
26
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
27
+
28
+ # Install uv
29
+ curl -LsSf https://astral.sh/uv/install.sh | sh
30
+
31
+ # Install dependencies and build the extension
32
+ uv sync
33
+ uv run maturin develop
34
+
35
+ # Or use the Nix flake
36
+ nix develop
37
+ ```
38
+
39
+ ## Running tests
40
+
41
+ ```bash
42
+ # Rust unit tests
43
+ cargo test
44
+
45
+ # With nextest
46
+ cargo nextest run
47
+
48
+ # Python tests
49
+ uv run pytest
50
+ ```
51
+
52
+ ## Code style
53
+
54
+ ### Rust
55
+
56
+ - Format with `cargo fmt` before committing.
57
+ - All `cargo clippy -- -D warnings` findings must be resolved.
58
+ - Prefer `?` over `.unwrap()` in non-test code.
59
+ - Use `tracing::{debug, info, warn, error}` instead of `println!` or `dbg!`.
60
+
61
+ ### Python
62
+
63
+ - Type annotations are required on all public functions.
64
+ - Docstrings on all public symbols.
65
+
66
+ ## Commit messages
67
+
68
+ Use the [Conventional Commits](https://www.conventionalcommits.org/) format:
69
+
70
+ ```
71
+ <type>(<scope>): <short summary>
72
+
73
+ [optional body]
74
+
75
+ [optional footer]
76
+ ```
77
+
78
+ Common types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `ci`.
79
+
80
+ Examples:
81
+
82
+ ```
83
+ feat(proxy): add path-style to virtual-style translation for AWS
84
+ fix(signer): handle missing authorization header gracefully
85
+ docs: add CONTRIBUTING guide
86
+ ```
87
+
88
+ ## Pull request checklist
89
+
90
+ - [ ] Tests added or updated for every changed behaviour.
91
+ - [ ] `cargo fmt` and `cargo clippy` pass with no warnings.
92
+ - [ ] `CHANGELOG.md` updated under `Unreleased`.
93
+ - [ ] PR description explains the motivation and approach.
94
+
95
+ ## Reporting bugs
96
+
97
+ Use the [bug report template](.github/ISSUE_TEMPLATE/bug_report.md).
98
+
99
+ ## Requesting features
100
+
101
+ Use the [feature request template](.github/ISSUE_TEMPLATE/feature_request.md).