Skip to content

Commit 23ab8c3

Browse files
authored
ID v2 (#126)
* Initial rewrite * Some stuff * More updates
1 parent 9328d9f commit 23ab8c3

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

engineering/passports/id/DESIGN_DOC.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Objective
66

7-
Creating a universal authentication system for Purdue Hackers.
7+
Create a universal authentication system for Purdue Hackers.
88

99
## Background
1010

@@ -14,30 +14,37 @@ Many Purdue Hackers projects necessitate keeping track of people’s identities
1414

1515
### Stakeholders
1616

17-
Anyone with a passport and all Purdue Hackers projects that require signing in.
17+
Anyone with a passport and all Purdue Hackers projects that require consistent identity tracking.
1818

1919
### Existing Solutions
2020

21-
- Using other auth providers (Google, Github)
21+
- Continuing to use our self-hosted Authentik instance: High friction, does not fit the Purdue Hackers ethos of making our own solution for the fun of it
2222

2323
### Alternative Solutions
2424

25-
- Using other auth providers
25+
- Using public OAuthproviders (Google, Github): Have usage limits and other restrictions that would make them a pain to deal with.
26+
- Integrate into Authentik: This is something that was considered but we would still rely on Authentik and this solution would likely end up with ID becoming irrelevant as more people would likely rely on Authentik's other options.
2627

2728
## Requirements
2829

2930
### Goals
3031

31-
- OAuth compatibility
32+
- OAuth & [OIDC](https://openid.net/specs/openid-connect-core-1_0.html) compatibility
3233
- Usable with popular JS auth libs
3334
- Easy to implement
34-
- Uses passports in a fun and interesting way
35-
- Usable in a secure manner when necessary
35+
- Usable in a secure manner when necessary, configurable on a per-client basis
36+
- Some site could require 2FA for all sign ins and force users without it to add it before continuing
37+
- Use either TOTP or Webauthn (https://github.com/kanidm/webauthn-rs)
3638
- Store passport data and manage which one is active for each user
39+
- A user management interface
40+
- Metrics and event logging (metrics exportable to some TBD software, events with a webhook)
41+
- Exact contents of metrics and event logging to be determined later
42+
- Groups integration through OIDC spec (allows any application with the `user:read` scope to query a user's groups and take action on them)
43+
- Future: Hook system, execute python code on certain events (ex. on:login, on:logout, on:usermanage) to modify data or deny request
3744

3845
### Non-Goals
3946

40-
- Be cryptographically secure with just passports (out of scope, complicated, and expensive)
47+
- Be cryptographically secure with just passports (unnecessary when secure 2FA is available)
4148
- Be the central hub for data storage with regards to each Hack Night attendee.
4249

4350
### Constraints
@@ -59,20 +66,28 @@ Each user can have an arbitrary number of passports associated with them but onl
5966

6067
A basic interface reminiscent of other current sign in platforms will ask the user if they want to approve the connection with the target app and list the scopes the app is requesting after they verify ownership of their passport. Passport ownership is verified by entering the passport number then scanning the passport with a phone to contact the server and allow the sign in.
6168

69+
The user management system will allow a user to enroll/unenroll from 2FA and manage aspects of their profile as well as adding their own clients to work with ID (with some restrictions on scopes to protect sensitive information). The admin side will allow arbitrary user operations (enable/disable, see 2FA, etc).
70+
71+
The metrics and events system, groups, and (future) policies will be customizable from the admin dashboard.
72+
6273
### Deployment
6374

6475
Users can integrate with ID using the example repo as a base.
6576

6677
## Milestones
6778

68-
- Full OAuth support within a month
69-
- Easy integration instructions/example within a week afterwards
79+
- User management
80+
- Arbitrary user 2FA enrollment
81+
- Advanced client management system
82+
- Metrics and events active
83+
- Groups API
84+
- Future: Policies system
7085

7186
## Additional Considerations
7287

7388
### Security
7489

75-
Passports are not secure since they just use basic NFC tags. For most things this is fine but for high-security apps it is possible to swipe an administrator’s passport and scan it when asked. Therefore administrators will be required to have two-factor authentication (TOTP specifically) enabled on their account for all integrations.
90+
Passports on their own are not secure since they just use basic NFC tags. For most applications this is fine but for high-security apps it is possible to swipe an administrator’s passport and scan it when asked. Therefore, apps can require two-factor authentication if they necessitate secure authentication but if the session is 2FA authenticated then the cached version will be accepted. If the session is not 2FA authenticated then an upgrade will be attempted.
7691

7792
### Performance
7893

0 commit comments

Comments
 (0)