Several people on one instance: limits, first-run setup, and whether anything may be shared #268
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Postulo/postulo#268
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Postulo is already multi-user, and more completely than this issue's title suggests. What is
missing is four things, filed together because two of them require amending a promise stated
in the README, and that amendment should be made once rather than twice.
What exists, so that none of it is rebuilt
Invite: one signup, optionally bound to one address, expiring on its own. An instance isinvite-only unless the operator opens registration deliberately
(
config/settings/base.py:347).last sign-in, and per-person actions for username, plugins, recovery and deletion.
anyone's applications or documents."
OwnedModelandfor_user()on every query;OwnedObjectMixinmakes a foreign object a404 rather than a 403.
Administration is not the gap. The gap is what one account may consume, how an operator
starts, and whether anything may ever be shared.
Part 1 — Per-person limits and fair use
Nothing caps what one account consumes. There is no quota anywhere in the tree: not for
documents, not for logos, not for exports, not for captures per person.
On a single-person instance that is correct and should stay the default. On an instance with
a dozen people it means one account can fill the disk and the first anybody knows is that
everybody's uploads start failing — and on SQLite, that a write fails at an unpredictable
place.
What it needs:
load, and shown to the person themselves as well as to the operator;
POSTULO_CAPTURE_RATEis alreadyspent against the owner's account (#194), so this is closer than the rest — what is missing
is an instance-wide view of it;
page, with what to delete;
Depends on nothing. Could be built first and independently of everything below.
Part 2 — First-run setup for an instance
Bringing up an instance today means environment variables, a
createsuperuser, and thenfinding the right pages in Server settings. Each step is documented; nothing walks anybody
through them, and the order is only obvious to somebody who already knows it.
What it needs:
choose invite-only or open registration, set the instance's name and default language, test
mail, issue the first invitation;
account-creation hole, and this is the one part of this issue with a sharp security edge;
wizard that will not let somebody in without an SMTP server;
Depends on nothing. Good candidate to land beside Part 1.
Parts 3 and 4 need one decision made first
The README promises one person's data never reaches another's.
for_user()is not aconvention that implements that promise — it is the promise, expressed as the only
authorisation model the application has.
Both of the parts below require an object to be legitimately visible to somebody who does not
own it. That cannot be added twice, in two shapes, by two issues. The primitive is one
thing: an explicit, scoped, revocable grant, visible to the person who gave it.
The promise it becomes, and this wording should be settled here before any code:
That is still a strong promise. It is a different one, and the README,
docs/THREAT-MODEL.mdand the wiki all state the current version.
Part 3 — Shared access between people
An employment-service caseworker, a coach, or an advisor seeing a job seeker's record. This
is a real use of a self-hosted instance and
CompanyKind.EMPLOYMENT_SERVICEalready showsthe domain is understood.
An administrator who could grant themselves access is the whole promise gone.
profile, no.
my file, and when" is the question this feature creates and must answer.
Part 4 — Household or team instance
Several people on one instance sharing the reference data while keeping their searches
private: companies, listings, industries, contacts perhaps.
This is a different shape from Part 3 — not a grant from one person to another, but a pool
some records belong to instead of to a person. It is the more invasive of the two, because it
changes what an object's owner is, and
OwnedModelis on everything.plausible; an application never.
loud, and probably an event trail.
cascade reasoning, with a second owner in the picture).
What both parts break, and must be answered before either is built
for_user()becomesvisible_to(), with the grant consulted. Every queryset in theapplication goes through it, and the ones that do not are the bugs.
current rule is right and gets more important, because a 403 would confirm the record
exists.
tests/security/needs a whole new isolation sweep, which is exactly what #232 says ismissing today. #232 should land first; building sharing on top of an untested isolation
boundary is the wrong order.
docs/PLUGINS.mdand the plugin API tell authorstheir data is one person's. A grant model changes what a plugin may be handed, and #229 is
already reworking that surface.
person's own export contain when some of it is pooled?
Suggested order
instance with more than one person, and both could be done well before 1.0.0 if they turn
out to be wanted sooner.
means.
Parts 1 and 2 may well deserve moving to an earlier milestone once someone starts; they are
here because this issue is one conversation, not because they need to wait.