ECDSA (ES256) support issues in OIDC module (JWK generation and token verification)
@cicnavi já está trabalhando nisso.
Desde 15/4/2026.
Avaliação
Esta issue ainda não foi avaliada.
Descrição
Hi,
I am currently working with the SimpleSAMLphp OIDC module and trying to use ECDSA (ES256) for signing tokens instead of RSA.
I encountered multiple issues that seem to indicate incomplete or inconsistent support for ECDSA.
1. JWK generation issue
In JsonWebKeySetService::prepareProtocolJwkSet(), the implementation uses:
JWKFactory::createFromKeyFile($certificatePath, ...)
However, $certificatePath points to an X.509 certificate file (.crt), not a private key.
According to the JWT Framework documentation, createFromKeyFile() expects a key file, while certificates should be loaded using:
JWKFactory::createFromCertificateFile()
This mismatch causes failures when using ECDSA certificates, while RSA may work by coincidence.
2. Access token verification issue
In BearerTokenValidator, the signer is hardcoded to RSA:
use Lcobucci\JWT\Signer\Rsa\Sha256;
Configuration::forSymmetricSigner(...)
This causes ES256 tokens to fail verification with:
Access token could not be verified
The validator should dynamically select the signer based on the token's alg header (e.g., ES256 vs RS256), and use forAsymmetricSigner().
3. Expected behavior
- The module should support both RS256 and ES256
- JWK generation should correctly use certificate-based loading
- Token verification should dynamically select the correct signer
4. Questions
- Is ECDSA (ES256) officially supported by this module?
- If yes, what is the correct way to configure keys and certificates?
- Should certificates be combined with private keys, or kept separate?
- Is there a recommended key generation procedure?
5. Suggested fixes
- Replace
createFromKeyFile()withcreateFromCertificateFile()when loading certificates - Refactor
BearerTokenValidatorto support multiple algorithms (RS256, ES256)
Any guidance would be greatly appreciated.
Thanks!
- Linguagem predominante
- PHP
- Estrelas
- 50
- Forks
- 28
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de simplesamlphp/simplesamlphp-module-oidc
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
simplesamlphp/simplesamlphp-module-oidc#360 · 1 comentário ·
-
prepared
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 65/100
simplesamlphp/simplesamlphp-module-oidc#358 · 2 comentários ·
-
Encryption key can only be stringTalvez livre de novo @cicnavi assumiu há 219 dias e não há nenhum pull request aberto. Abertaenhancement prepared
simplesamlphp/simplesamlphp-module-oidc#332 · 1 comentário · 1 responsável ·
-
ReflectionParameter::getClass() is deprecatedTalvez livre de novo @cicnavi assumiu há 234 dias e não há nenhum pull request aberto. Abertaprepared
simplesamlphp/simplesamlphp-module-oidc#327 · 2 comentários · 1 responsável ·
-
Missing support for multiple signature algorithmsTalvez livre de novo @cicnavi assumiu há 268 dias e não há nenhum pull request aberto. Abertaenhancement prepared
simplesamlphp/simplesamlphp-module-oidc#324 · 1 comentário · 1 responsável ·
Todas as issues de simplesamlphp/simplesamlphp-module-oidc
Issues semelhantes
-
No Code Attached Yet
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
joomla/joomla-cms#48611 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia
-
Bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Automattic/safe-publish#716 ·
Mantenedores costumam responder em até 1 dia
-
[FrameworkBundle][SecurityBundle] Make `KernelBrowser::loginUser()` wor…Talvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. AbertaFrameworkBundle SecurityBundle
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
symfony/symfony-docs#23277 ·
Mantenedores costumam responder em até 3 dias
-
[Sync EN] hard link does not need special permissionsTalvez já em andamento @lacatoire assumiu hoje. Abertasync-en
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
Mantenedores costumam responder em até 1 dia