Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User token revocation list #29

Open
kaustavdm opened this issue Oct 12, 2017 · 0 comments
Open

User token revocation list #29

kaustavdm opened this issue Oct 12, 2017 · 0 comments
Milestone

Comments

@kaustavdm
Copy link
Contributor

kaustavdm commented Oct 12, 2017

Build a revocation list for user tokens that will have a structure like:

type UserRevocation struct {
    ID uuid.UUID // Primary key
    IAT time.Time
}

User JWT verification will follow this logic:

  • Search for entry in UserRevocation by user id from JWT's iss field.
  • If entry is not present, verify signature
  • If entry is present, verify that UserRevocation.IAT for that entry is less than iat field of JWT.
    • If UserRevocation.IAT is less than iat field of JWT, verify signature
    • Else, fail
  • Verify signature using shared secret.

Entries are added to UserRevocation list when:

  • User changes their password
  • User wants to force log out all connected clients
  • User needs to be forced to reauthenticate.

Each entry should have a TTL of 28 days, which is the validity period of each user JWT.

@dolftax dolftax added this to the v0.1.0 milestone Oct 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants