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

Federated user accounts and organisation membership #10

Open
jlabusch opened this issue Sep 10, 2017 · 1 comment
Open

Federated user accounts and organisation membership #10

jlabusch opened this issue Sep 10, 2017 · 1 comment

Comments

@jlabusch
Copy link
Owner

jlabusch commented Sep 10, 2017

To get this off the ground we added a Django layer with its own isolated user management... But that created a bunch of extra user management. Which is nice and simple, but a constant drain.
Let's just auth against WRMS instead, and look at the user's organisation membership there to send them to the right dashboard.

For now we won't attempt to make non-default systems safe; not everyone should necessarily be able to see every system even within "their" org. api/config/default.json will still define the "safe" SLA systems for now.

How about:

  • Initial auth using https://wrms.catalyst.net.nz/api2/login
  • See success, response.fullname and response.organisation_id
  • Store the auth token as a cookie
  • Refresh the token when needed
  • Every so often, validate the token somehow (maybe with a hack like a no-op /api2/user_update call.) Doing it on every API call is probably excessive.
  • Do something sane about CSRF
  • Probably no persistent storage needed (i.e. nothing like the django_session table); we can get by with a single application instance (i.e. no load balancing to worry about) and don't care if server restarts force everyone to log in again.
@jlabusch
Copy link
Owner Author

Do we keep Django at all? Other than auth, it's doing a teeny tiny bit of HTML templating which we could move into JS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant