Hello! I’ve implemented the lexicon community’s bookmark lexicon for sill.social, but I’ve been using the transition:generic scope while Bluesky’s permission sets get fully worked out. I’d also like permission sets for the bookmarks lexicon. I’d like to propose two: a read-only scope and a full manage scope. I modeled these roughly after standard.site’s permission set.
First: the read-only scope, community.lexicon.bookmarks.authViewBookmarks:
{
"$type": "com.atproto.lexicon.schema",
"lexicon": 1,
"id": "community.lexicon.bookmarks.authViewBookmarks",
"defs": {
"main": {
"type": "permission-set",
"title": "Read bookmarks",
"detail": "View the account's saved bookmarks.",
"permissions": [
{
"type": "permission",
"resource": "rpc",
"inheritAud": true,
"lxm": [
"community.lexicon.bookmarks.getActorBookmarks"
]
}
]
}
}
}
And the manage scope, community.lexicon.bookmarks.authManageBookmarks:
{
"$type": "com.atproto.lexicon.schema",
"lexicon": 1,
"id": "community.lexicon.bookmarks.authManageBookmarks",
"defs": {
"main": {
"type": "permission-set",
"title": "Manage bookmarks",
"detail": "View, create, edit, and delete the account's saved bookmarks.",
"permissions": [
{
"type": "permission",
"resource": "rpc",
"inheritAud": true,
"lxm": [
"community.lexicon.bookmarks.getActorBookmarks"
]
},
{
"type": "permission",
"resource": "repo",
"collection": [
"community.lexicon.bookmarks.bookmark"
]
}
]
}
}
}
I don’t think there’s a strong case for read and write without delete and update. Since we’re using rpc resources, it does need an aud, so we set inheritAud to true.
One could argue this is unnecessary since adding the RPC/repo scopes are straightforward for a lexicon space this small. However, the OAuth consent screen presents much better when you use permission sets. Rather than a generic message saying my app can publish changes to your repository, it would be clear that the service can only access bookmarks.
Thoughts?
EDIT: renamed to authViewBookmarks and authManageBookmarks to match existing convention.