Space Membership Checks

I’m working through the technical details and want to confirm my understanding.

Currently it is not possible for a feed server to independently verify the membership of an identity to a space with formal protocol channels or mechanics.

  1. did:plc:foo authenticates with ExampleApp https://example.app/
  2. ExampleApp creates service-auth token for getFeedSkeleton on behalf of did:plc:foo to FeedServer https://feeds.app/
  3. ExampleApp requests getFeedSkeleton from FeedServer https://feeds.app/ for did:plc:foo with the service-auth token
  4. FeedServer has no ability to determine if did:plc:foo is a member of space did:plc:bar/com.example.space/baz

For FeedServer to know if did:plc:foo is a member of space did:plc:bar/com.example.space/baz, one of these must happen:

  • The feed server has its own auth where it gets an identity access token and can mint a space credential to test authentication. This sucks for a lot of reasons.
  • The AppView sends additional data* that must be trusted that says the requesting identity has access to the space. This sucks for different reasons.
  • The space must be configured with a membership-app that can be queried by FeedServer directly. This sucks also sucks for different reasons.

I propose that the checkUserAccess be implemented by the space host and can be queried with service authentication by members of the space. That would allow FeedServer to install a “service account” as a member of the space that could then make service auth requests as needed.

1 Like

Yeah you have the right understanding. But it’s an intentional design decision to not require expose that at the protocol level.

One design goal in the protocol is that readers are not required to be visible to other readers of the space.

From the proposal:

Accounts that may read the space are never enumerated at the protocol-level, though applications may choose to enumerate them through records published in the space.

Introducing a protocol-level checkUserAccess basically introduces a membership oracle that leaks who has read access.

However as you point out, in many cases, you do need to know who has access!

In those cases, that information is communicated through records in the space. For instance member records in simplespaces (now memberspace), and membership + role records in opensocial.group spaces.

If a space wants to be usable by service accounts in the way you’re describing, then it needs to communicate access through records in the space.

Another approach is that a user could login to a feed provider (so the feed provider has an OAuth credential) and grant read access to spaces itself. In that case a feed provider can act as the user and determine if the user has read access to any given space.

This probably warrants a section in the “considerations” section of the proposal! I’ll try and draft something & link it here.

1 Like

Took a stab at describing it here: 0016: Access in applications by dholms · Pull Request #130 · bluesky-social/proposals · GitHub

Let me know what you think!

1 Like

ship it!

(and this text is here because discourse needs at least 20 characters)

2 Likes