You've already forked wc-licensed-product
Release v0.2.0 - Security and integrity features
- Add REST API response signing using HMAC-SHA256 - Add SHA256 hash validation for version file uploads - Add ResponseSigner class for automatic API response signing - Add file_hash column to database schema - Remove external URL support from version uploads - Update translations with all fuzzy strings resolved Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
46
CHANGELOG.md
46
CHANGELOG.md
@@ -7,6 +7,49 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.2.0] - 2026-01-22
|
||||
|
||||
### Added
|
||||
|
||||
- Response signing for REST API using HMAC-SHA256
|
||||
- SHA256 hash field for product version uploads with checksum validation
|
||||
- File integrity verification before storing uploaded version files
|
||||
- New `ResponseSigner` class for automatic API response signing
|
||||
- Database column `file_hash` in versions table for storing checksums
|
||||
|
||||
### Changed
|
||||
|
||||
- Version uploads now require file attachments (external URL option removed)
|
||||
- API responses now include `X-License-Signature` and `X-License-Timestamp` headers when `WC_LICENSE_SERVER_SECRET` is configured
|
||||
|
||||
### Removed
|
||||
|
||||
- External download URL field from product version form
|
||||
- Direct URL support in version uploads (use Media Library uploads only)
|
||||
|
||||
### Security
|
||||
|
||||
- API response signing prevents tampering and replay attacks
|
||||
- Per-license key derivation using HKDF-like approach
|
||||
- SHA256 checksum validation ensures file integrity
|
||||
|
||||
### Technical Details
|
||||
|
||||
- New class: `ResponseSigner` for HMAC-SHA256 response signing
|
||||
- VersionManager extended with `$fileHash` parameter and validation
|
||||
- ProductVersion model extended with `fileHash` property
|
||||
- Signature algorithm: `HMAC-SHA256(derived_key, timestamp + ':' + canonical_json)`
|
||||
- Key derivation: `HMAC-SHA256(HMAC-SHA256(license_key, server_secret) + "\x01", server_secret)`
|
||||
- Compatible with `magdev/wc-licensed-product-client` SecureLicenseClient
|
||||
|
||||
### Configuration
|
||||
|
||||
To enable response signing, add to `wp-config.php`:
|
||||
|
||||
```php
|
||||
define('WC_LICENSE_SERVER_SECRET', 'your-secure-random-string-min-32-chars');
|
||||
```
|
||||
|
||||
## [0.1.0] - 2026-01-22
|
||||
|
||||
### Added
|
||||
@@ -297,7 +340,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- WordPress REST API integration
|
||||
- Custom WooCommerce product type extending WC_Product
|
||||
|
||||
[Unreleased]: https://src.bundespruefstelle.ch/magdev/wc-licensed-product/compare/v0.1.0...HEAD
|
||||
[Unreleased]: https://src.bundespruefstelle.ch/magdev/wc-licensed-product/compare/v0.2.0...HEAD
|
||||
[0.2.0]: https://src.bundespruefstelle.ch/magdev/wc-licensed-product/compare/v0.1.0...v0.2.0
|
||||
[0.1.0]: https://src.bundespruefstelle.ch/magdev/wc-licensed-product/compare/v0.0.11...v0.1.0
|
||||
[0.0.11]: https://src.bundespruefstelle.ch/magdev/wc-licensed-product/compare/v0.0.10...v0.0.11
|
||||
[0.0.10]: https://src.bundespruefstelle.ch/magdev/wc-licensed-product/compare/v0.0.9...v0.0.10
|
||||
|
||||
Reference in New Issue
Block a user