feat: add LOOKUP authorization for lookup endpoints #20687
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.66) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.66 · 358 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.352
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.066
Real PR Conversation Timeline
1 comments
"Review active on #20687"
general
weight: 0.35
maytasm
Description
Lookup HTTP endpoints currently use
CONFIG:CONFIG, which also grants access to cluster configuration endpoints. This PR adds theLOOKUPresource type and the default-falsedruid.auth.enableLookupAuthorizationsetting. With the setting disabled, lookup endpoints retain their existing authorization behavior.When enabled, requests for a named lookup check
LOOKUP:tier/lookup_name. Bulk GET responses omit lookups withoutREADauthorization. Bulk writes checkWRITEon every affected lookup before making changes. Deleting an empty tier checks its tier name. An empty write checksLOOKUP:LOOKUP.The resource filter handles names present in the route. For bulk requests, resource methods pass parsed request bodies or fetched results to the filter once the lookup names are available. Other CONFIG endpoints and lookup use during query execution are unchanged.
Release note
Administrators can enable lookup-specific HTTP permissions with
druid.auth.enableLookupAuthorization. The setting is disabled by default, preserving existing authorization behavior on upgrade. Enabling it changes lookup API authorization from CONFIG permissions to LOOKUP permissions.Upgrade: First upgrade all nodes with the flag disabled and add the required LOOKUP grants. Then enable druid.auth.enableLookupAuthorization through a rolling restart. Wait until every relevant node uses the enabled flag before removing CONFIG grants that are no longer needed.
Downgrade: Review current users and restore required CONFIG grants, including for users added since migration. CONFIG grants provide broader access, so do not blindly restore historical grants or permissions for removed users. Disable the flag through a rolling restart and wait until all relevant nodes use the disabled flag before downgrading.
##### Key changed/added classes in this PR
LookupResourceFilterResourceTypeAuthConfigLookupCoordinatorResourceLookupIntrospectionResourceLookupListeningResourceThis PR has: