nodeSolidServer / node-solid-server

Solid server on top of the file-system in NodeJS
https://solidproject.org/for-developers/pod-server
Other
1.77k stars 297 forks source link

OpenID configuration - wrong parameter type #1766

Closed bourgeoa closed 4 months ago

bourgeoa commented 4 months ago

https://github.com/solid/solidcommunity.net/issues/72

zg009 commented 4 months ago

Alain is there any chance the provider.json file has "client_secret_basic" instead of ["client_secret_basic"] as the value provided? Because the only dependency I could find that would set that parameter is in here where it is correctly assigned as an array, unless it is overridden. https://github.com/nodeSolidServer/oidc-op/blob/baffba8a184538e47f01766359caeac17dfb0e91/src/Provider.js#L90C5-L91C76

bourgeoa commented 4 months ago

Thanks. You were right. I suppose that at some point OIDC was changed and the provider.json file was not updated in https:/solidcommunity.net I checked running NSS on localhost and provider.json contains an array for "client_secret_basic"

I just repaired https://solidcommunity.net and https://solidcommunity.net:8443

Here is an abstract of what I have on localhost

# cat .db/oidc/op/provider.json
{
  "issuer": "https://localhost:8443",
  "jwks_uri": "https://localhost:8443/jwks",
  "scopes_supported": [
    "openid",
    "offline_access"
  ],
  "response_types_supported": [
    "code",
    "code token",
    "code id_token",
    "id_token code",
    "id_token",
    "id_token token",
    "code id_token token",
    "none"
  ],
  "token_types_supported": [
    "legacyPop",
    "dpop"
  ],
  "response_modes_supported": [
    "query",
    "fragment"
  ],
  "grant_types_supported": [
    "authorization_code",
    "implicit",
    "refresh_token",
    "client_credentials"
  ],
  "subject_types_supported": [
    "public"
  ],
  "id_token_signing_alg_values_supported": [
    "RS256"
  ],
  "token_endpoint_auth_methods_supported": [
    "client_secret_basic"
  ],
  "token_endpoint_auth_signing_alg_values_supported": [
    "RS256"
  ],
  "display_values_supported": [],
  "claim_types_supported": [
    "normal"
  ],
  "claims_supported": [],
  "claims_parameter_supported": false,
  "request_parameter_supported": true,
  "request_uri_parameter_supported": false,
  "require_request_uri_registration": false,
  "check_session_iframe": "https://localhost:8443/session",
  "end_session_endpoint": "https://localhost:8443/logout",
  "authorization_endpoint": "https://localhost:8443/authorize",
  "token_endpoint": "https://localhost:8443/token",
  "userinfo_endpoint": "https://localhost:8443/userinfo",
  "registration_endpoint": "https://localhost:8443/register",
  "keys": {
    "descriptor": {
      "id_token": {
        "signing": {
          "RS256": {
            "alg": "RS256",
            "modulusLength": 2048
          },
          "RS384": {
            "alg": "RS384",
            "modulusLength": 2048
          },
          "RS512": {
            "alg": "RS512",
            "modulusLength": 2048
          }
        },
        "encryption": {}
      },
      "token": {
        "signing": {
          "RS256": {
            "alg": "RS256",
            "modulusLength": 2048
          },
          "RS384": {
            "alg": "RS384",
            "modulusLength": 2048
          },
          "RS512": {
            "alg": "RS512",
            "modulusLength": 2048
          }
        },
        "encryption": {}
      },
      "userinfo": {
        "encryption": {}
      },
      "register": {
        "signing": {
          "RS256": {
            "alg": "RS256",
            "modulusLength": 2048
          }
        }
      }
    },
    "jwks": {
........
zg009 commented 4 months ago

Interestingly enough Alain, it appears that https://solidcommunity.net:8443/.well-known/openid-configuration renders the token_endpoint_auth_methods_supported: ["client_secret_basic"] correctly, as shown below. image

However, https://solidcommunity.net:/.well-known/openid-configuration is still showing as just a string.

image

Are both deployments both referring to the same file, and the latest version of @solid/oidc-op?

Edit: Both OIDC configurations are working now, not sure if you changed something or it was a caching issue but it looks good to me if you want to close this Alain

bourgeoa commented 4 months ago

Thanks for the checking. I did not restart the https://solidcommunity.net server. It is OK know see https://solidcommunity.net:/.well-known/openid-configuration

.......
"token_endpoint_auth_methods_supported":["client_secret_basic"]
,.........
zg009 commented 4 months ago

Thanks for the checking. I did not restart the https://solidcommunity.net server. It is OK know see https://solidcommunity.net:/.well-known/openid-configuration

.......
"token_endpoint_auth_methods_supported":["client_secret_basic"]
,.........

I just finished editing my comment when I checked again 😁 It looks good to me if you want to close this issue