Skip to content

Harden PHP SDK for public distribution - #1

Merged
danifronter merged 2 commits into
mainfrom
agent/public-sdk-hardening
Jul 21, 2026
Merged

Harden PHP SDK for public distribution#1
danifronter merged 2 commits into
mainfrom
agent/public-sdk-hardening

Conversation

@danifronter

Copy link
Copy Markdown
Contributor

What changed

  • adopts Apache-2.0 and public distribution documentation
  • verifies JWT signatures before trusting claims
  • validates issuer, audience, authorized party, subject, nonce, and time claims
  • adds constant-time authorization state validation
  • enforces back-channel logout jti and prohibits nonce
  • replaces smoke checks with cryptographic PHPUnit coverage
  • adds PHPStan, PHP 8.2-8.5 CI, and Composer Audit

Security impact

The SDK now separates ID-token and logout-token validation rules and prevents unsigned claims from driving trust decisions.

Consumers remain responsible for storing authorization state server-side and rejecting replayed logout jti values.

Validation

  • PHPUnit: 5 tests, 17 assertions
  • PHPStan: no errors
  • Composer validate: valid
  • Composer audit: no advisories
  • Gitleaks full Git history: no leaks

@danifronter
danifronter marked this pull request as ready for review July 21, 2026 22:19
@danifronter
danifronter merged commit 17c13c6 into main Jul 21, 2026
5 checks passed
@danifronter
danifronter deleted the agent/public-sdk-hardening branch July 21, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant