apple / apple/foundationdb

Allow clients to be given key range restrictions

Open
#1,419 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
16.7k
Forks
1.6k
Avg merge
1d 20h
Merged PRs (30d)
126

Description

To try and provide some layer of safety for use cases that have multiple different applications sharing an FDB cluster, it'd be nice to be able to forcefully restrict clients to only be able to interact with keys owned by their application.

I'm envisioning something like adding to the environment of clients
FDB_NETWORK_OPTION_MINIMUM_KEY_PERMITTED=\x02
FDB_NETWORK_OPTION_MAXIMUM_KEY_PERMITTED=\x03

It's possible that for layers, we'd need to allow multiple ranges of restrictions, to allow the layer metadata subspace to be accessed as well as the data subspace.

And we would likely need to always permit access to \xff keys if ACCESS_SYSTEM_KEYS is set, and potentially also the directory layer subspace as well.

Clients that access a key outside of [min, max) would receive a non-retryable error `restricted_key_accessed()`.

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Begin by locating client network-option handling and key-access validation; done means clients can enforce the proposed key ranges, handle permitted system or layer keys, and return the specified non-retryable error for restricted access.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases, distributed-systems, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.