Skip to content

Commit

Permalink
multitenant: make AdminMerge onlySystemTenant
Browse files Browse the repository at this point in the history
Fixes #95138

AdminMerge is currently only called by the system tenant even though it is
named similarly to other Admin* functions so it does not need its own
capability for now.

This changes its required capability from noCapCheckNeeded to onlySystemTenant
to prevent secondary tenants from calling it.

Release note: None
  • Loading branch information
ecwall committed Mar 15, 2023
1 parent 70b2cb3 commit 0619746
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,9 @@ var reqMethodToCap = map[kvpb.Method]tenantcapabilities.CapabilityID{
kvpb.AdminRelocateRange: tenantcapabilities.CanAdminRelocateRange,
kvpb.AdminTransferLease: tenantcapabilities.CanAdminRelocateRange,

// TODO(ecwall): The following should also be authorized via specific capabilities.
kvpb.AdminMerge: noCapCheckNeeded,

// TODO(knz,arul): Verify with the relevant teams whether secondary
// tenants have legitimate access to any of those.
kvpb.AdminMerge: onlySystemTenant,
kvpb.AdminVerifyProtectedTimestamp: onlySystemTenant,
kvpb.CheckConsistency: onlySystemTenant,
kvpb.ComputeChecksum: onlySystemTenant,
Expand Down

0 comments on commit 0619746

Please sign in to comment.