nodeSolidServer / nodeSolidServer/node-solid-server

Test for trialing slashes in value for 'issuer' from '/.well-known/openid-configuration' responses

Open
#1,511 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.8k
Forks
308
PR merge metrics
No merged PRs in 30d

Description

Basically our ESS Brokers are advertising themselves (in their /.well-known/openid-configuration responses) as issuers with a trailing slash, e.g. for https://broker.pod.inrupt.com/.well-known/openid-configuration:

{
    "introspection_endpoint": "https://broker.pod.inrupt.com/introspect",
    "scopes_supported": [
        "openid",
        "offline_access",
        "webid"
    ],
    "issuer": "https://broker.pod.inrupt.com/",
    :

Note the trailing slash on the issuer URL (which is technically (slightly!) more correct than having the URL without the trailing slash).
So it seems NSS might be blindly taking that issuer value, and appending the string literal /.well-known/openid-configuration to it, without first checking if the issuer value has a trailing slash or not. If the URL constructed has two slashes, then the server responds with it’s standard HTML ‘Page Not Found’ response, which results in the ‘invalid json response…’ error.

If this is correct, then the fix in NSS should be simply checking for a trailing slash before appending /.well-known/openid-configuration.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the code that builds the /.well-known/openid-configuration URL from the issuer returned by the OpenID configuration response. Add coverage for issuer values with and without a trailing slash, and confirm both produce a valid single-slash URL rather than an invalid JSON response.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
authentication
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.