nodeSolidServer / nodeSolidServer/node-solid-server
ES256 is not a supported algorithm when logging with Inrupt.com (Pod Spaces) account
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- JavaScript
- Estrelas
- 1.8k
- Forks
- 308
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
Hi,
When logging with an Inrupt.com account (a.k.a Pod Spaces, https://signup.pod.inrupt.com/) on several apps, I find the following error in the console: normalizedAlgorithm.importKey is not a function after trying to access other users data which are hosted in a NSS instance
After setting up a local Node Solid Server instance and reproducing the bug, I found the problem occurs here: https://github.com/solid/jose/blob/main/src/jose/JWA.js#L90
I logged around this line to get more info:
Expand to see logs
normalizedAlgorithm: {
"message": "ES256 is not a supported algorithm"
}
supportedAlgorithms: {
"sign": {
"HS256": {
"params": {
"name": "HMAC",
"hash": {
"name": "SHA-256"
}
}
},
"HS384": {
"params": {
"name": "HMAC",
"hash": {
"name": "SHA-384"
}
}
},
"HS512": {
"params": {
"name": "HMAC",
"hash": {
"name": "SHA-512"
}
}
},
"RS256": {
"params": {
"name": "RSASSA-PKCS1-v1_5",
"hash": {
"name": "SHA-256"
}
}
},
"RS384": {
"params": {
"name": "RSASSA-PKCS1-v1_5",
"hash": {
"name": "SHA-384"
}
}
},
"RS512": {
"params": {
"name": "RSASSA-PKCS1-v1_5",
"hash": {
"name": "SHA-512"
}
}
},
"none": {}
},
"verify": {
"HS256": {
"params": {
"name": "HMAC",
"hash": {
"name": "SHA-256"
}
}
},
"HS384": {
"params": {
"name": "HMAC",
"hash": {
"name": "SHA-384"
}
}
},
"HS512": {
"params": {
"name": "HMAC",
"hash": {
"name": "SHA-512"
}
}
},
"RS256": {
"params": {
"name": "RSASSA-PKCS1-v1_5",
"hash": {
"name": "SHA-256"
}
}
},
"RS384": {
"params": {
"name": "RSASSA-PKCS1-v1_5",
"hash": {
"name": "SHA-384"
}
}
},
"RS512": {
"params": {
"name": "RSASSA-PKCS1-v1_5",
"hash": {
"name": "SHA-512"
}
}
},
"none": {}
},
"encrypt": {},
"decrypt": {},
"importKey": {
"RS256": {
"params": {
"name": "RSASSA-PKCS1-v1_5",
"hash": {
"name": "SHA-256"
}
}
},
"RS384": {
"params": {
"name": "RSASSA-PKCS1-v1_5",
"hash": {
"name": "SHA-384"
}
}
},
"RS512": {
"params": {
"name": "RSASSA-PKCS1-v1_5",
"hash": {
"name": "SHA-512"
}
}
}
}
}
key.alg: "ES256"
And this file seems to confirm the absence of E256: https://github.com/solid/jose/blob/main/src/algorithms/index.js#L58
Does it mean that inrupt.com (and I guess other ESS based accounts) are currently not compatible with node-solid-server?
Guia de contribuição
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.
Direção de pesquisa
Comece reproduzindo a falha de login com uma instância local do Node Solid Server e, em seguida, inspecione src/jose/JWA.js por volta da linha 90 e src/algorithms/index.js por volta da linha 58. Compare o algoritmo de chave ES256 informado pela conta do Inrupt.com com os algoritmos compatíveis com a camada jose; considera-se concluído quando o problema de compatibilidade estiver resolvido ou seu escopo necessário estiver claramente estabelecido.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- javascript
- Domínio
- authentication, backend
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100