Skip to content

Let OpenIdKeyStore load keys over HTTPS only - #36

Merged
ievgeniiskliarenko merged 4 commits into
masterfrom
jwt/https-only-key-store
Oct 5, 2026
Merged

ievgeniiskliarenko merged 4 commits into
masterfrom
jwt/https-only-key-store

Conversation

@ievgeniiskliarenko

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

HTTP redirects can bypass the HTTPS restriction for both discovery and key retrieval.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Adds HTTPS-by-default URL validation to OpenIdKeyStore for discovery and key retrieval.

Changes:

  • Validates issuer and JWKS URL schemes before requests.
  • Adds configurable allowed schemes through allowSchemes().
  • Tests default restrictions and scheme configuration.
File Description
vicephp/​Virtue-JWT/​tests/​JWK/​Store/​OpenIdKeyStoreTest.php Tests URL rejection and configurable schemes.
vicephp/​Virtue-JWT/​src/​JWK/​Store/​OpenIdKeyStore.php Adds scheme validation and HTTPS defaults.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread vicephp/Virtue-JWT/src/JWK/Store/OpenIdKeyStore.php

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

Both fetch paths enforce allowed schemes, the prior redirect issue is addressed, and regression coverage supports the changes.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@ievgeniiskliarenko
ievgeniiskliarenko marked this pull request as ready for review October 5, 2026 13:13
@ievgeniiskliarenko
ievgeniiskliarenko merged commit c3d1de3 into master Oct 5, 2026
4 checks passed
@ievgeniiskliarenko
ievgeniiskliarenko deleted the jwt/https-only-key-store branch October 5, 2026 13:27
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.

3 participants