Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/scripts/release_rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ The release workflow first runs the complete workspace dry run:
cargo publish --workspace --dry-run
```

That dry run stages the workspace as one set, so it also packages members whose
intra-workspace dependency versions are not on crates.io yet. A single-package
`cargo publish -p <crate> --dry-run` does not, and fails before a bootstrap with
a version-selection error for the unpublished dependency.

It then runs `publish.py`. The publisher uploads one package at a time, requests
and revokes a fresh GitHub OIDC-derived crates.io token for every attempt,
retries crates.io rate limits, and treats an already-published matching
Expand Down
26 changes: 16 additions & 10 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,25 @@ need a JavaScript host clock.

## Versioning

- Existing service crates and core share a lockstep major version (`3.0.0`).
- New provider and shared crates (`reqsign-cloudflare`, `reqsign-b2`,
`reqsign-baidu-netdisk`, `reqsign-oauth2`, `reqsign-dropbox`,
`reqsign-vercel`, `reqsign-koofr`) start
independent `1.0.0` version lines and depend on the current core major.
- `reqsign-aliyun-drive`, `reqsign-github`, `reqsign-onedrive`, and
`reqsign-yandex-disk` start independent `1.0.0` version lines.
- `reqsign-http-send-reqwest` has its own major (`4.0.0`).
- Established service crates and core share a lockstep major version
(`4.0.0`): `reqsign-core`, `reqsign-aws-core`, every established
`reqsign-<provider>` service crate, `reqsign-http-message-signatures`,
`reqsign-file-read-tokio`, and `reqsign-command-execute-tokio`. A breaking
change in core bumps this whole line together.
- Provider and shared crates (`reqsign-b2`, `reqsign-aliyun-drive`,
`reqsign-baidu-netdisk`, `reqsign-cloudflare`, `reqsign-dropbox`,
`reqsign-github`, `reqsign-koofr`, `reqsign-oauth2`, `reqsign-onedrive`,
`reqsign-seafile`, `reqsign-upyun`, `reqsign-vercel`, `reqsign-yandex-disk`)
start independent `1.0.0` version lines and depend on the current core major.
- `reqsign-http-send-reqwest` has its own major (`5.0.0`), one major ahead of
the core lockstep. It moves when the core lockstep major changes, so a
reqwest major bump never forces a core major.
- `reqsign-crypto-rustcrypto` and `reqsign-crypto-boring` each have independent
version lines, starting at `1.0.0`.
- The facade `reqsign` crate follows an independent scheme (`0.20.0`).
- The facade `reqsign` crate follows an independent scheme (`0.21.0`).
- Release is triggered by pushing a `v*.*.*` tag; `cargo publish --workspace`
publishes everything.
publishes every crate in the plan. `crypto/boring` is excluded from the root
workspace and needs its own publication decision.

## License

Expand Down
131 changes: 131 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Apache Reqsign Changelog

Release notes for Apache Reqsign. The facade `reqsign` version names the
release; every other crate keeps its own line. Migration steps for the current
major are in
[Upgrading to Reqsign 0.21](website/docs/guides/upgrading-to-0.21.md).

## 0.21.0 - Unreleased

0.21 is a coordinated major for the core and the established service crates,
and the first crates.io release of the provider crates added since 0.20.8. It
moves cryptography out of the signing crates into a `CryptoProvider` selected
through the `Context`, passes the `Context` explicitly to facade
`default_signer` helpers, and raises the minimum supported Rust version to
1.87.

### Breaking changes

- **Cryptography is resolved through `Context`.** `reqsign-core` and every
`services/*` crate no longer link SHA-1, SHA-256, HMAC, RSA, P-256, or
AES-GCM. `Context::new()` starts unbound; a context without a provider, or a
provider without the requested operation, fails with `ConfigInvalid`. Bind a
provider with `Context::with_crypto`, install one process-wide with
`reqsign_core::crypto::install_default`, or use the facade's
`default_context()`, which binds `RustCryptoProvider` when no global provider
is installed and the `default-crypto` feature is enabled.
- **`reqsign_core::jwt` is removed** together with the core `jwt` feature. Azure
client-certificate and Google service-account flows format RS256 JWS in
private service helpers through the selected provider. Hash and MAC helpers
now take `&dyn CryptoProvider` and return `Result`; Azure
`ServiceSharedAccessSignature::token` takes the resolved provider.
- **Facade `default_signer` takes the `Context` first.** For example
`aws::default_signer(ctx, "s3", "us-east-1")`. The `default-context` feature
no longer gates `DefaultSigner` or `default_signer`; both exist whenever the
service feature is enabled.
- **`Signer::with_context` isolates the credential cache** instead of reusing
the previous context's cached credential, because a different context can
resolve a different identity. Use `with_request_signer` or
`with_credential_granter` to keep the cache.
- **OBS and TOS `Credential` gained `expires_at`**, which breaks struct-literal
construction. Use `Credential::new` plus `with_expires_at` (and
`with_session_token` for TOS).

### Added

- Crypto backend crates `reqsign-crypto-rustcrypto` (workspace member,
`wasm32-unknown-unknown` for its supported subset) and
`reqsign-crypto-boring` (native-only, excluded from the main workspace,
optional `fips` feature), both `1.0.0`.
- Provider crates and facade features, all first release at `1.0.0`:
`reqsign-aliyun-drive`, `reqsign-b2` (facade feature `b2`),
`reqsign-baidu-netdisk`, `reqsign-cloudflare`, `reqsign-dropbox`,
`reqsign-github`, `reqsign-koofr`, `reqsign-oauth2`, `reqsign-onedrive`,
`reqsign-seafile`, `reqsign-upyun`, `reqsign-vercel`, `reqsign-yandex-disk`.
- `reqsign-http-message-signatures` for RFC 9421 request signing, facade
feature `http-message-signatures`.
- Shared OAuth 2.0 refresh grants and OpenStack static-token credentials and
Swift TempURL presigning.
- Optional MD5 and HMAC-SHA512 provider operations.
- Opt-in IMDSv1 fallback for AWS credentials, and AssumeRole providers that
honor STS endpoint settings.

### Changed

- Minimum supported Rust version is 1.87.0. The RustCrypto backend's
`rsa 0.10.0` requirement is the reason.
- The facade `default` feature enables `default-context` and `default-crypto`.
- Lockstep major `4.0.0` for `reqsign-core`, `reqsign-aws-core`, every
established service crate, `reqsign-file-read-tokio`, and
`reqsign-command-execute-tokio`. `reqsign-http-send-reqwest` moves to
`5.0.0`, its own line offset from the core major.

### Carried over from the v0.20.9 release candidate

The 0.21 source also contains the changes prepared for v0.20.9, which had not
reached crates.io when this release was prepared. If the v0.20.9 vote completes
first, these reach users there and this section only records that 0.21 includes
them:

- AWS SSO-backed assume-role profile chains, S3 Express session-token selection
by service, and configurable SigV4 canonical URI encoding.
- Google service-account OAuth2 token caching for the request signer.
- Oracle caller-supplied request body-header signing and profile field
inheritance.
- Huawei Cloud OBS IAM agency granter, Volcengine TOS STS `AssumeRole` granter,
and Tencent COS `GetFederationToken` granter.
- Absolute credential expiry for OBS and TOS (see breaking changes above).
- OpenStack catalog search across all matching entries.
- Credential and security-token redaction in OBS and TOS debug output.

### Crate versions

| Crate | 0.21.0 |
| --- | --- |
| `reqsign` | 0.21.0 |
| `reqsign-core` | 4.0.0 |
| `reqsign-command-execute-tokio` | 4.0.0 |
| `reqsign-file-read-tokio` | 4.0.0 |
| `reqsign-http-send-reqwest` | 5.0.0 |
| `reqsign-aws-core` | 4.0.0 |
| `reqsign-aws-v4` | 4.0.0 |
| `reqsign-aws-v4a` | 4.0.0 |
| `reqsign-aliyun-oss` | 4.0.0 |
| `reqsign-azure-storage` | 4.0.0 |
| `reqsign-google` | 4.0.0 |
| `reqsign-huaweicloud-obs` | 4.0.0 |
| `reqsign-http-message-signatures` | 4.0.0 |
| `reqsign-openstack-keystone` | 4.0.0 |
| `reqsign-oracle` | 4.0.0 |
| `reqsign-tencent-cos` | 4.0.0 |
| `reqsign-volcengine-tos` | 4.0.0 |
| `reqsign-crypto-rustcrypto` | 1.0.0 |
| `reqsign-crypto-boring` | 1.0.0 (published outside the workspace) |
| `reqsign-aliyun-drive` | 1.0.0 |
| `reqsign-b2` | 1.0.0 |
| `reqsign-baidu-netdisk` | 1.0.0 |
| `reqsign-cloudflare` | 1.0.0 |
| `reqsign-dropbox` | 1.0.0 |
| `reqsign-github` | 1.0.0 |
| `reqsign-koofr` | 1.0.0 |
| `reqsign-oauth2` | 1.0.0 |
| `reqsign-onedrive` | 1.0.0 |
| `reqsign-seafile` | 1.0.0 |
| `reqsign-upyun` | 1.0.0 |
| `reqsign-vercel` | 1.0.0 |
| `reqsign-yandex-disk` | 1.0.0 |

## Earlier releases

Release notes before 0.21.0 were published with each
[GitHub release](https://github.com/apache/reqsign/releases).
32 changes: 16 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,34 +29,34 @@ rust-version = "1.87.0"
[workspace.dependencies]
# Workspace dependencies
reqsign-aliyun-drive = { version = "1.0.0", path = "services/aliyun-drive" }
reqsign-aliyun-oss = { version = "3.2.2", path = "services/aliyun-oss" }
reqsign-aws-core = { version = "3.4.0", path = "services/aws-core" }
reqsign-aws-v4 = { version = "3.5.0", path = "services/aws-v4" }
reqsign-aws-v4a = { version = "3.2.0", path = "services/aws-v4a" }
reqsign-azure-storage = { version = "3.3.2", path = "services/azure-storage" }
reqsign-aliyun-oss = { version = "4.0.0", path = "services/aliyun-oss" }
reqsign-aws-core = { version = "4.0.0", path = "services/aws-core" }
reqsign-aws-v4 = { version = "4.0.0", path = "services/aws-v4" }
reqsign-aws-v4a = { version = "4.0.0", path = "services/aws-v4a" }
reqsign-azure-storage = { version = "4.0.0", path = "services/azure-storage" }
reqsign-b2 = { version = "1.0.0", path = "services/b2" }
reqsign-baidu-netdisk = { version = "1.0.0", path = "services/baidu-netdisk" }
reqsign-cloudflare = { version = "1.0.0", path = "services/cloudflare" }
reqsign-command-execute-tokio = { version = "3.0.9", path = "context/command-execute-tokio" }
reqsign-core = { version = "3.3.4", path = "core" }
reqsign-command-execute-tokio = { version = "4.0.0", path = "context/command-execute-tokio" }
reqsign-core = { version = "4.0.0", path = "core" }
reqsign-crypto-rustcrypto = { version = "1.0.0", path = "crypto/rustcrypto" }
reqsign-dropbox = { version = "1.0.0", path = "services/dropbox" }
reqsign-file-read-tokio = { version = "3.0.9", path = "context/file-read-tokio" }
reqsign-file-read-tokio = { version = "4.0.0", path = "context/file-read-tokio" }
reqsign-github = { version = "1.0.0", path = "services/github" }
reqsign-google = { version = "3.4.0", path = "services/google" }
reqsign-http-send-reqwest = { version = "4.0.9", path = "context/http-send-reqwest" }
reqsign-huaweicloud-obs = { version = "3.1.0", path = "services/huaweicloud-obs" }
reqsign-http-message-signatures = { version = "3.0.0", path = "services/http-message-signatures" }
reqsign-google = { version = "4.0.0", path = "services/google" }
reqsign-http-send-reqwest = { version = "5.0.0", path = "context/http-send-reqwest" }
reqsign-huaweicloud-obs = { version = "4.0.0", path = "services/huaweicloud-obs" }
reqsign-http-message-signatures = { version = "4.0.0", path = "services/http-message-signatures" }
reqsign-koofr = { version = "1.0.0", path = "services/koofr" }
reqsign-oauth2 = { version = "1.0.0", path = "services/oauth2" }
reqsign-onedrive = { version = "1.0.0", path = "services/onedrive" }
reqsign-openstack-keystone = { version = "3.0.1", path = "services/openstack-keystone" }
reqsign-oracle = { version = "3.1.0", path = "services/oracle" }
reqsign-openstack-keystone = { version = "4.0.0", path = "services/openstack-keystone" }
reqsign-oracle = { version = "4.0.0", path = "services/oracle" }
reqsign-seafile = { version = "1.0.0", path = "services/seafile" }
reqsign-tencent-cos = { version = "3.1.0", path = "services/tencent-cos" }
reqsign-tencent-cos = { version = "4.0.0", path = "services/tencent-cos" }
reqsign-upyun = { version = "1.0.0", path = "services/upyun" }
reqsign-vercel = { version = "1.0.0", path = "services/vercel" }
reqsign-volcengine-tos = { version = "3.2.0", path = "services/volcengine-tos" }
reqsign-volcengine-tos = { version = "4.0.0", path = "services/volcengine-tos" }
reqsign-yandex-disk = { version = "1.0.0", path = "services/yandex-disk" }

# Crates.io dependencies
Expand Down
2 changes: 1 addition & 1 deletion context/command-execute-tokio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

[package]
name = "reqsign-command-execute-tokio"
version = "3.0.9"
version = "4.0.0"

categories = ["asynchronous"]
description = "Tokio-based command execution implementation for reqsign"
Expand Down
2 changes: 1 addition & 1 deletion context/file-read-tokio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

[package]
name = "reqsign-file-read-tokio"
version = "3.0.9"
version = "4.0.0"

categories = ["asynchronous"]
description = "Tokio-based file reader implementation for reqsign"
Expand Down
2 changes: 1 addition & 1 deletion context/http-send-reqwest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

[package]
name = "reqsign-http-send-reqwest"
version = "4.0.9"
version = "5.0.0"

categories = ["asynchronous"]
description = "Reqwest-based HTTP client implementation for reqsign."
Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

[package]
name = "reqsign-core"
version = "3.3.4"
version = "4.0.0"

categories = ["command-line-utilities", "web-programming"]
description = "Signing API requests without effort."
Expand Down
16 changes: 16 additions & 0 deletions core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,22 @@ signer.sign(&mut parts, None).await?;
- **Environment Integration**: Access environment variables through the Context
- **Type Safety**: Strong typing ensures compile-time correctness

## Changelog: 4.0.0

- Cryptography moved behind `reqsign_core::crypto::CryptoProvider`, resolved
through the `Context`: an explicit `Context::with_crypto` binding, then the
process-wide `install_default`, otherwise `ConfigInvalid` at the point of use.
`Context::new()` starts unbound and the crate links no cryptographic
implementation. Use `reqsign-crypto-rustcrypto` (or another backend) to bind
one.
- The `jwt` module and `jwt` feature are removed. Hash and MAC helpers take
`&dyn CryptoProvider` and return `Result`; services format their own RS256
JWS through the selected provider.
- `Signer::with_context` isolates the credential cache instead of reusing the
previous context's cached credential. `with_request_signer` and
`with_credential_granter` keep the cache.
- The minimum supported Rust version is 1.87.0.

## Core Concepts

### Context
Expand Down
6 changes: 3 additions & 3 deletions crypto/boring/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ fips = ["boring/fips"]

[dependencies]
boring = "5.5.1"
reqsign-core = { version = "3.3.4", path = "../../core" }
reqsign-core = { version = "4.0.0", path = "../../core" }

[dev-dependencies]
hex = "0.4"
hmac = "0.13"
http = "1"
p256 = { version = "0.14.0", default-features = false, features = ["ecdsa"] }
reqsign-aws-core = { version = "3.4.0", path = "../../services/aws-core" }
reqsign-aws-v4 = { version = "3.5.0", path = "../../services/aws-v4" }
reqsign-aws-core = { version = "4.0.0", path = "../../services/aws-core" }
reqsign-aws-v4 = { version = "4.0.0", path = "../../services/aws-v4" }
reqsign-crypto-rustcrypto = { version = "1.0.0", path = "../rustcrypto" }
sha2 = "0.11"
tokio = { version = "1", features = ["macros", "rt"] }
Loading
Loading