Skip to content

Conversation

@DeepDiver1975
Copy link
Collaborator

refs https://portswigger.net/kb/issues/00200902_jwt-self-signed-jwk-header-supported

JWK header shall not be used without verification.

Usage:

In case self signed JWK header is desired to be used (very rare cases from my understanding) the class OpenIDConnectClient shall be sub classed and the method verifyJWKHeader implemented as needed

use Jumbojett\OpenIDConnectClient;
use Jumbojett\OpenIDConnectClientException;

class MyOpenIDConnectClient extends OpenIDConnectClient
{
    protected function verifyJWKHeader($jwk)
    {
        # TODO: add your own logic to verify
        if ($not_valid) {
            throw new OpenIDConnectClientException('Self signed JWK header is not valid');
        }
    }
}

List of common tasks a pull request require complete

  • Changelog entry is added or the pull request don't alter library's functionality

@DeepDiver1975 DeepDiver1975 force-pushed the fix/harden-self-signed-jwk-header branch from 3cd53cd to ed0e30a Compare September 26, 2022 06:34
@DeepDiver1975 DeepDiver1975 merged commit 7672086 into master Sep 27, 2022
@DeepDiver1975 DeepDiver1975 deleted the fix/harden-self-signed-jwk-header branch September 27, 2022 08:33
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.

2 participants