cockroachdb / cockroachdb/cockroach

sql,storage: storage built-in functions are not available from secondary tenants

Open
#105,597 0 comments 0 reactions 0 assignees View on GitHub
A-multitenancy C-bug T-db-server
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Describe the problem**

Currently `crdb_internal.set_compaction_concurrency` and `compact_engine_span` are not available to secondary tenants.
(and the new `sstable_metrics` introduced by #104739)

In alignment with our multi-tenancy roadmap, we want them to be available to secondary tenants **with sufficient capabilities**.

Currently all the gRPC services that are part of the KV "PerStore" interface are not authorized by the RPC tenant interface.
![image](https://github.com/cockroachdb/cockroach/assets/642886/f47a8bbd-552f-47f1-89ce-28eef0b1d812)

**Expected behavior**

- We want to extend `rpc/auth_tenant.go` with rules that accept requests from the KV "PerStore" API.
- The requests should be allowed subject to a capability.
- The authz code should verify the range bounds to only allow requests that span a tenant's keyspace.
- There should be RU accounting for these request types.
- We also need to test the features actually work from a secondary tenant.

cc @RaduBerinde

Jira issue: CRDB-29115

Epic CRDB-39092

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.