youyesyet/docs/authorisation.html
Simon Brooke ae0c383365 Intentionally added documentation to repository
So that it can be automatically deployed to github.io
2019-05-02 11:16:38 +01:00

19 lines
13 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>Security and authorisation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Youyesyet</span> <span class="project-version">0.2.2-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 current"><a href="authorisation.html"><div class="inner"><span>Security and authorisation</span></div></a></li><li class="depth-1 "><a href="competitors.html"><div class="inner"><span>Competitor Analysis</span></div></a></li><li class="depth-1 "><a href="database.html"><div class="inner"><span>Database Specification</span></div></a></li><li class="depth-1 "><a href="scaling.html"><div class="inner"><span>YouYesYet: Scaling</span></div></a></li><li class="depth-1 "><a href="userspec.html"><div class="inner"><span>YouYesYet: User-oriented specification</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>youyesyet</span></div></div></li><li class="depth-2 branch"><a href="youyesyet.cache.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cache</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>canvasser-app</span></div></div></li><li class="depth-3 branch"><a href="youyesyet.canvasser-app.ajax.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ajax</span></div></a></li><li class="depth-3 branch"><a href="youyesyet.canvasser-app.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-3 branch"><a href="youyesyet.canvasser-app.gis.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gis</span></div></a></li><li class="depth-3 branch"><a href="youyesyet.canvasser-app.handlers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>handlers</span></div></a></li><li class="depth-3 branch"><a href="youyesyet.canvasser-app.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="youyesyet.canvasser-app.subscriptions.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>subscriptions</span></div></a></li><li class="depth-3 branch"><a href="youyesyet.canvasser-app.ui-utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ui-utils</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>views</span></div></div></li><li class="depth-4 branch"><a href="youyesyet.canvasser-app.views.about.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>about</span></div></a></li><li class="depth-4 branch"><a href="youyesyet.canvasser-app.views.building.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>building</span></div></a></li><li class="depth-4 branch"><a href="youyesyet.canvasser-app.views.dwelling.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dwelling</span></div></a></li><li class="depth-4 branch"><a href="youyesyet.canvasser-app.views.elector.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>elector</span></div></a></li><li class="depth-4 branch"><a href="youyesyet.canvasser-app.views.followup.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>followup</span></div></a></li><li class="depth-4 branch"><a href="youyesyet.canvasser-app.views.gdpr.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gdpr</span></div></a></li><li class="depth-4 branch"><a href="youyesyet.canvasser-app.views.issue.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>issue</span></div></a></li><li class="depth-4 branch"><a href="youyesyet.canvasser-app.views.issues.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>issues</span></div></a></li><li class="depth-4"><a href="youyesyet.canvasser-app.views.map.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>map</span></div></a></li><li class="depth-2 branch"><a href="youyesyet.config.html"><div class="inner"><span class="tree" style="top: -548px;"><span class="top" style="height: 557px;"></span><span class="bottom"></span></span><span>config</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></div></li><li class="depth-3"><a href="youyesyet.db.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="youyesyet.handler.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>handler</span></div></a></li><li class="depth-2 branch"><a href="youyesyet.layout.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>layout</span></div></a></li><li class="depth-2 branch"><a href="youyesyet.locality.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>locality</span></div></a></li><li class="depth-2 branch"><a href="youyesyet.middleware.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>middleware</span></div></a></li><li class="depth-2 branch"><a href="youyesyet.oauth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>oauth</span></div></a></li><li class="depth-2 branch"><a href="youyesyet.outqueue.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>outqueue</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>routes</span></div></div></li><li class="depth-3 branch"><a href="youyesyet.routes.auto.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auto</span></div></a></li><li class="depth-3 branch"><a href="youyesyet.routes.auto-json.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auto-json</span></div></a></li><li class="depth-3 branch"><a href="youyesyet.routes.home.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>home</span></div></a></li><li class="depth-3 branch"><a href="youyesyet.routes.issue-experts.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>issue-experts</span></div></a></li><li class="depth-3 branch"><a href="youyesyet.routes.logged-in.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>logged-in</span></div></a></li><li class="depth-3 branch"><a href="youyesyet.routes.manual.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manual</span></div></a></li><li class="depth-3 branch"><a href="youyesyet.routes.oauth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>oauth</span></div></a></li><li class="depth-3 branch"><a href="youyesyet.routes.rest.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>rest</span></div></a></li><li class="depth-3 branch"><a href="youyesyet.routes.roles.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>roles</span></div></a></li><li class="depth-3"><a href="youyesyet.routes.services.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>services</span></div></a></li><li class="depth-2 branch"><a href="youyesyet.utils.html"><div class="inner"><span class="tree" style="top: -331px;"><span class="top" style="height: 340px;"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-2"><a href="youyesyet.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#security-and-authorisation" name="security-and-authorisation"></a>Security and authorisation</h1>
<p>Essentially we have six levels of authorisation, at essentially increasing levels of sensitivity.</p>
<ol>
<li>
<p><em>Canvassers:</em> Any authenticated user essentially has this level of authorisation. Hence users of the app can all share the same database connections without problem. Therefore there will be one first-class database user for all canvassers, and they will not have individual real database logins.</p></li>
<li>
<p><em>Issue experts:</em> Issue experts respond to followup requests. Therefore they must be able to see the queue of requests and the details of the elector making the request. They dont need to see voter intentions and I dont believe the information they do need to see is particularly sensitive. So they too can share a single database-layer login and connection pool; whether this is the same login as used by the canvassers is an implementation detail but I dont believe that its critical.</p></li>
<li>
<p><em>Issue editors:</em> Dont need to see much sensitive data (although they do need to see, in aggregate, what issues are being raised by electors in the field), but they do have the power to dictate the initial responses canvassers make to issues raised, so the information they can <em>write</em> is pretty sensitive. We need to be very sure that unauthorised users dont have the power to write this data. So I suggest that issue editors probably should have individual first class database logins.</p></li>
<li>
<p><em>Team leaders:</em> Need to be able to monitor the performance of their teams, to invite new users to the system and to block abusive users from the system. Again, these are significant functions which should be well protected from abuse. But we will have at least hundreds, probably thousands of team leaders across Scotland. I would prefer that they each had first class logins, but this may be impractical. But in any case, even if they use a shared login, it should not be the same shared login as used by canvassers.</p></li>
<li>
<p><em>Analyists</em> Need broad authorisation to read, but not write or edit, all sensitive data held by the system. They must have individual first class database logins.</p></li>
<li>
<p><em>Admins</em> Can necessarily read and write everything. They should definitely each have individual first class database logins.</p></li>
</ol>
<p>This means we have a hybrid authentication scheme; for lower levels, application layer security and shared connection pools are adequate. For higher levels, individual connections and database layer authorisation are required. It implies that the routes at the different layers should be separated into separate namespaces with separate authentication functions.</p></div></div></div></body></html>