-
Notifications
You must be signed in to change notification settings - Fork 360
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
userspace permissions #6493
Open
tinnus-napbus
wants to merge
137
commits into
develop
Choose a base branch
from
tinnus/more-userspace-permissions
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
userspace permissions #6493
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
And todo's in gall.
Adds a permission configuration to each running gall agent, based on the recent additions to lull. Whenever a gall agent emits effects, they are checked against its current permission set, and... allow through regardless. An agent may inspect its current permission set from the bowl. A couple obvious challenges immediately arise, mostly surrounding what agents should do when they are not allowed to emit effects they want to emit. This gets especially nasty in +on-init, ie the install-new-app case. To prevent major breakage while we work on solving these issues, we simply printf when we would drop cards, instead of actually dropping them. Includes simple |free and |lock generators for manually tweaking permissions on an agent. More work to follow. Co-authored-by: drbeefsupreme <drbeefsupreme@users.noreply.github.com>
Clay and gall perms can now be limited to individual desks and agents respectively.
We punt on the question of agent->desk resolution during +cred calls.
Affected agents always get them. Agents may subscribe to all permission notifications using %ward, with %wink to unsubscribe.
In a similar vein to /desk/bill, contains the required and optional permissions for agents on a desk. These will eventually be used during installation, upgrade, and for managing permissions on demand. Includes minimal logic for reading out these files from specific desks.
this adds some prepared gall cores and utilities, mostly intended for testing userspace permissions, but will also be useful more broadly. interfaces for +call, +take, and +scry to gall cores are added several arms for creating a dummy agent named %bunt in the %test desk, as well as poking it, and scrying its bowl, are added also adds a scry endpoint to the dbug agent wrapper for the bowl. previously, you could only poke the agent to request its bowl, which just printed it to terminal and didnt return it. the scry endpoint actually returns the bowl
adds gall unit test that performs a %free task on a dummy agent and checks to see that the dummy agent's bowl has the correct permissions
Separate pokes, subscriptions, and scrying.
should probably be squashed with other commits adding tests
Adds a permission updating task to clay (%visa) and makes sure permissions get included in gall's %load task. Squashed commit of the following: commit 7713932 Author: fang <git@fang.io> Date: Thu Aug 4 15:56:08 2022 +0200 clay, gall: include permissions on loadout comms commit afdd03b Author: drbeefsupreme <jon@tlon.io> Date: Wed Aug 3 18:46:35 2022 -0400 wip: fill in clay userspace permissions todos commit eebf84d Author: fang <git@fang.io> Date: Wed Aug 3 23:47:22 2022 +0200 wip: permissions-via-clay todos Co-authored-by: drbeefsupreme <drbeefsupreme@users.noreply.github.com>
tinnus-napbus
changed the title
add missing arvo tasks to userspace perms
userspace perms: resolve merge conflicts with develop, add missing perms
May 11, 2023
3 tasks
belisarius222
changed the title
userspace perms: resolve merge conflicts with develop, add missing perms
userspace permissions
May 16, 2023
3 tasks
3 tasks
also tweak gall state migration function
tomholford
added a commit
to tloncorp/landscape
that referenced
this pull request
Jun 9, 2023
This implements the first draft of types as specified by the backend implementations: - urbit/urbit#6493 - master...tinnus-napbus:landscape:tinnus/userspace-permissions Based on out-of-band conversation with @tinnus-napbus, there is possibly some changes coming to this interface. (to be addressed in a follow up commit).
tomholford
added a commit
to tloncorp/landscape
that referenced
this pull request
Jun 9, 2023
This implements the first draft of types as specified by the backend implementations: - urbit/urbit#6493 - master...tinnus-napbus:landscape:tinnus/userspace-permissions Based on out-of-band conversation with @tinnus-napbus, there is possibly some changes coming to this interface. (to be addressed in a follow up commit).
tomholford
added a commit
to tloncorp/landscape
that referenced
this pull request
Jun 9, 2023
This implements the first draft of types as specified by the backend implementations: - urbit/urbit#6493 - master...tinnus-napbus:landscape:tinnus/userspace-permissions Based on out-of-band conversation with @tinnus-napbus, there is possibly some changes coming to this interface. (to be addressed in a follow up commit).
tomholford
added a commit
to tloncorp/landscape
that referenced
this pull request
Jun 9, 2023
This implements the first draft of types as specified by the backend implementations: - urbit/urbit#6493 - master...tinnus-napbus:landscape:tinnus/userspace-permissions Based on out-of-band conversation with @tinnus-napbus, there is possibly some changes coming to this interface. (to be addressed in a follow up commit).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Long-awaited userspace permission PR.
This is one of three fully separate prongs that aim to provide better privacy & security within userspace. This prong aims to restrict the effects Gall agents may emit based on permissions they have requested either statically as prerequisites (in a
/desk.seal
file), or dynamically as opt-in during runtime.The other prongs are: 2) some form of userspace provenance (of which #6499 is a proposal), and 3) a permissioning scheme for Eyre/frontends. We intentionally exclude those two prongs here, because they can and should be implemented fully independently.
For the initial release, userspace permissions will only be warned about, but they will not block agent installation.
The latest announcement for this work was made here, but some changes have been made since then. A brief summary of the current form of this work follows:
%pass
cards emitted by agents, and all.^
scries made by agents are now subject to permission control. Only agents running on the%base
desk are fully exempt from this.%pass
and.^
requires a corresponding permission. Even when%pass
ing to an agent that runs off the same desk./desk.seal
file on an app's desk. When agents run off that desk, they are guaranteed to have these permissions.%pass
ing a%pine
to Clay. Users may grant or revoke optional permissions at any time.bowl
given to Gall agents when they run now contains the set of permissions they have been granted.+cred:gall
and+rite:gall
may be used by agents to check for permission on a card or scry, respectively.%pass
or scry through as normal. In a future, this will become a crash. Developers are encouraged to adopt permissions for their apps as soon as possible. The urbit-dev announcement contains instructions on how to find the permissions your app needs, those remain accurate.The
%treaty
agent has already been updated to propagate the required permissions as part of apps' metadata, see tloncorp/landscape#164.Differences from the now-defunct #6560: resolve merge conflicts with develop (mostly gall/clay state migration functions), fix tests and add missing arvo tasks to perms:
[%ames %block ~]
perm to allowblocking/unblocking ships
[%clay %creds ~]
perm[%clay %write `desk ~]
- can't rive this intopaths unfortunately cos of complexity with the unified
rang
. Canonly set by desk.
[%clay %liven `desk]
[%clay %grave ship=(unit ship) desk=(unit desk)]
. For theclue
: %lobe, %all, %seek %pick and %seekrequire
[%clay %grave ~ ~]
global tombstoning perms, while%norm
and%worn
can be take specific ship and desk ifdesired.
[%clay %liven ~]
. Can't only bump aparticular desk so require null desk.
[%ames %order ship=(unit ship) =path]
. Can remote-scry any ship if shipis null, otherwise specified ship. Simple all-subpaths of given path logic is applied to the
path.
in the first place.
[%ames %whack ship=(unit ship) =path]
, samebehaviour as %keen.
[%press =spur]
to$perm-gall
with all-subpaths of given path logic applied tospur.
TODOs before merge:
|free
generator to grant all requested perms|free
and|lock
generators::TODO PERM
to enable enforcement and test it correctly crashes on unapproved scries & tasks./tests
suite, make sure all pass.tests/sys/vane/gall
test where it says::TODO PERM
so it'll test enforcement correctly.