Self Issued IDs - Draft 2
Sam Goto
This is an early exploration of a protocol that uses OPRF to enable identity federation on the Web.
The protocol assumes:
- An
IDPwith a logged in useridᴵᴰᴾ(say,3) that it desires to keep private. - The IDP's
nameᴵᴰᴾ=https://idp.exampleand apublicᴵᴰᴾ/privateᴵᴰᴾkey pair. - An
RPwith anameᴿᴾ=https://rp.examplethat it desires to keep private. - An
agentthat is trusted by the RP and the IDP to represent the user's best interest.
At the end of the protocol:
- The RP gets a directed
idᴿᴾwithout learning about the IDP'sidᴵᴰᴾ - The IDP never learns the
nameᴿᴾin the exchange - The user is able to reconstruct
idᴿᴾto recover their account without the original agent
The basic idea is to run OPRFs for two things:
- first, to generate
audᴿᴾrunningOPRF∘keyᴿᴾ(nameᴿᴾ)which the IDP can use to define the scope without learningnameᴿᴾ - second, to generate
idᴿᴾrunningOPRF∘idᴵᴰᴾ(to generate a shared directed identifier without revealing to the RP the globalaudᴿᴾ)idᴵᴰᴾ
Sign-in
- The
agentstarts by asking and confirming that the user wants theagentto facilitate signing-in to theRPwith theirIDPaccount. - If so, the
agentstarts by generatingaudᴿᴾby runningOPRF∘keyᴿᴾ(nameᴿᴾ)which is guaranteed to represent thenameᴿᴾwhile still making it opaque to the IDP. - The agent constructs a directed identifier
idᴿᴾby runningOPRF∘idᴵᴰᴾ(without revealing theaudᴿᴾ)idᴵᴰᴾto the RP (how?). - The agent generates a
publicᴬᴳᴱᴺᵀ/privateᴬᴳᴱᴺᵀkey pair. - The agent sends to the IDP:
- The
idᴿᴾ. - The
audᴿᴾ. - The
publicᴬᴳᴱᴺᵀ.
- The
- The IDP checks if
idᴿᴾhasn't been revoked (see revocation) - The IDP issues a signed
JWTᴵᴰᴾwith:subᴵᴰᴾ=idᴿᴾ, a directed identifieraudᴵᴰᴾ=audᴿᴾ, scoping tonameᴿᴾagentᴵᴰᴾ=publicᴬᴳᴱᴺᵀ, delegating the presentation to the agentexpᴵᴰᴾ= an expiration time of its choice (see revocation)sigᴵᴰᴾsigned with theprivateᴵᴰᴾ
- The IDP stores
audᴿᴾ - The agent issues a new
JWTᴬᴳᴱᴺᵀ:subᴬᴳᴱᴺᵀ=idᴿᴾaudᴬᴳᴱᴺᵀ=audᴿᴾexpᴬᴳᴱᴺᵀ= an expiration time of its choicesigᴬᴳᴱᴺᵀsigned with theprivateᴬᴳᴱᴺᵀ
- The agent sends the
JWTᴬᴳᴱᴺᵀand theJWTᴵᴰᴾto the RP. - The RP verifies that:
sigᴵᴰᴾis signed withpublicᴵᴰᴾagentᴵᴰᴾmatches thepublicᴬᴳᴱᴺᵀsigᴬᴳᴱᴺᵀis signed with apublicᴬᴳᴱᴺᵀsubᴵᴰᴾmatchessubᴬᴳᴱᴺᵀaudᴵᴰᴾmatchesaudᴬᴳᴱᴺᵀ- Neither
expᴵᴰᴾnorexpᴬᴳᴱᴺᵀare expired
- The RP then runs
OPRF∘keyᴿᴾ(nameᴿᴾ)and checks if it matchesaud. - The RP uses
idᴿᴾ=subᴬᴳᴱᴺᵀto uniquely identify the user in its service, such that- the IDP never learns about
nameᴿᴾand - the RP never learns about
idᴵᴰᴾand - the agent is confident that
idᴿᴾis directed
- the IDP never learns about
Recovery
- In the absence of an agent capable of intermediating this exchange, the IDP plays the role of the agent and asks for the RP to reveal its
nameᴿᴾ. It then runs the same Sign-in algorithm described above.
Revocation
- When a user decides to unregister from RP, they revoke
idᴿᴾby asking their agent to tell the IDP to stop renewingJWTᴵᴰᴾwith the foridᴿᴾ.