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
IDP
with a logged in useridᴵᴰᴾ
(say,3
) that it desires to keep private. - The IDP's
nameᴵᴰᴾ
=https://idp.example
and apublicᴵᴰᴾ
/privateᴵᴰᴾ
key pair. - An
RP
with anameᴿᴾ
=https://rp.example
that it desires to keep private. - An
agent
that 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
agent
starts by asking and confirming that the user wants theagent
to facilitate signing-in to theRP
with theirIDP
account. - If so, the
agent
starts 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ᴿᴾ
.