photoncloud-monorepo/creditservice/crates/creditservice-api/src/lib.rs
centra d2149b6249 fix(lightningstor): Fix SigV4 canonicalization for AWS S3 auth
- Replace form_urlencoded with RFC 3986 compliant URI encoding
- Implement aws_uri_encode() matching AWS SigV4 spec exactly
- Unreserved chars (A-Z,a-z,0-9,-,_,.,~) not encoded
- All other chars percent-encoded with uppercase hex
- Preserve slashes in paths, encode in query params
- Normalize empty paths to '/' per AWS spec
- Fix test expectations (body hash, HMAC values)
- Add comprehensive SigV4 signature determinism test

This fixes the canonicalization mismatch that caused signature
validation failures in T047. Auth can now be enabled for production.

Refs: T058.S1
2025-12-12 06:23:46 +09:00

18 lines
533 B
Rust

//! gRPC service implementations for CreditService
//!
//! This crate provides the CreditService gRPC service implementation.
mod billing;
mod chainfire_storage;
mod credit_service;
mod nightlight;
mod storage;
pub use billing::{
MockUsageMetricsProvider, PricingRules, ProjectBillingResult, ResourceUsage, UsageMetrics,
UsageMetricsProvider,
};
pub use chainfire_storage::ChainFireStorage;
pub use credit_service::CreditServiceImpl;
pub use nightlight::NightLightClient;
pub use storage::{CreditStorage, InMemoryStorage};