Skip to content

Proof-of-Concept: Federated OIDC with Decentralised Identity; multi-tenant support

License

Notifications You must be signed in to change notification settings

rtang03/verify-me

Repository files navigation

verify-me

(Work-In-Progress) Proof of Concept:

Federated OpenID Connect Provider - with w3c Decentralized Identity

Please DON'T use.

Developer Notes

auth0 callback for Registra application when using next-auth http://localhost:3000/api/auth/callback/auth0

id_token Format

{
  "sub": "auth0|6059aed4aa7803006a20d824",
  "nonce": "foobar",
  "at_hash": "TmQxzKISmVJef8D_2xRYfQ",
  "c_hash": "4ymVi1DdQYxKrjgqgFdmHA",
  "aud": "2843faca-8911-45ac-b605-f15c5556b88e",
  "exp": 1625765183,
  "iat": 1625761583,
  "iss": "https://issuer.example.com/oidc/issuers/0ac6d292-1868-44d3-a161-923052e11fb8"
}

accesstoken Format

{
"urn:oidc-provider:example:foo": "bar", <=== ADD by ProviderConfiguration extra token claim
"jti": "Yd5U9TkqOAOrKb-1tukKs",
"sub": "auth0|6059aed4aa7803006a20d824", ==== OK
"iat": 1625761583,
"exp": 1625768783,
"scope": "openid email", <==== ADD by resourceindicator
"client_id": "2843faca-8911-45ac-b605-f15c5556b88e",
"iss": "https://issuer.example.com/oidc/issuers/0ac6d292-1868-44d3-a161-923052e11fb8",
"aud": "https://issuer.example.com" <===== WRONG
}

Useful command

sudo lsof -i :5432

https://coderwall.com/p/b443ng/generating-a-self-signed-wildcard-certificate
openssl genrsa 2048 > host.key
openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.crt

Useful Info