nodeSolidServer / nodeSolidServer/node-solid-server

ES256 is not a supported algorithm when logging with Inrupt.com (Pod Spaces) account

Aperta
#1,602 1 commento 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
JavaScript
Stelle
1.8k
Fork
308
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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?

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo il fallimento dell’accesso con un’istanza locale di Node Solid Server, quindi esamina src/jose/JWA.js intorno alla riga 90 e src/algorithms/index.js intorno alla riga 58. Confronta l’algoritmo della chiave ES256 riportato dall’account Inrupt.com con gli algoritmi supportati dal livello jose; il lavoro è completato quando il problema di compatibilità è risolto oppure il relativo ambito necessario è stato stabilito chiaramente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
authentication, backend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.