Repository navigation
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #19236 +/- ##
============================================
+ Coverage 69.82% 70.45% +0.62%
- Complexity 1519 1522 +3
============================================
Files 3558 3575 +17
Lines 235843 240648 +4805
Branches 37848 38993 +1145
============================================
+ Hits 164678 169546 +4868
+ Misses 58464 58061 -403
- Partials 12701 13041 +340
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ca39cb8 to
eec081a
Compare
eec081a to
fe7592a
Compare
fe7592a to
3b6f3dd
Compare
There was a problem hiding this comment.
Pull request overview
Introduces secure, versioned table-configuration representations while preserving safe edit workflows and atomic ZooKeeper updates.
Changes:
- Redacts credentials across APIs, DDL, materialized views, clients, UI, and diagnostics.
- Adds generation-checked envelopes and atomic schema/config updates.
- Adds explicit raw-ZooKeeper authorization and focused compatibility/security tests.
Reviewed changes
Copilot reviewed 64 out of 64 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
pinot-clients/.../TableAdminClient.java |
Parses redacted envelopes. |
pinot-clients/.../PinotAdminClientTest.java |
Tests client parsing. |
pinot-common/.../TableConfigVersionMismatchException.java |
Defines version-conflict failure. |
pinot-common/.../ZKMetadataProvider.java |
Adds versioned schema reads. |
pinot-common/.../SegmentGenerationUtils.java |
Supports envelope responses. |
pinot-common/.../AccessControlUserConfigUtils.java |
Parses fine-grained permissions. |
pinot-common/.../SegmentGenerationUtilsTest.java |
Tests envelope compatibility. |
pinot-common/.../AccessControlUserConfigUtilsTest.java |
Tests permission parsing. |
pinot-controller/.../AuthenticationFilter.java |
Processes authorization-only endpoints. |
pinot-controller/.../BasicAuthAccessControlFactory.java |
Enforces fine-grained actions. |
pinot-controller/.../ZkBasicAuthAccessControlFactory.java |
Enforces ZooKeeper-backed actions. |
pinot-controller/.../CopyTablePayload.java |
Adds credential overrides. |
pinot-controller/.../PinotDdlRestletResource.java |
Redacts SHOW CREATE output. |
pinot-controller/.../PinotMaterializedViewRestletResource.java |
Sanitizes MV details. |
pinot-controller/.../PinotTableRestletResource.java |
Implements envelope GET/PUT and copy handling. |
pinot-controller/.../RedactedTableConfigResponse.java |
Defines single-config envelope. |
pinot-controller/.../RedactedTableConfigsResponse.java |
Defines combined envelope. |
pinot-controller/.../TableConfigValidationUtils.java |
Sanitizes validation diagnostics. |
pinot-controller/.../TableConfigsRestletResource.java |
Adds atomic combined updates. |
pinot-controller/.../ZookeeperResource.java |
Requires raw-read permission. |
pinot-controller/.../PinotHelixResourceManager.java |
Implements versioned atomic persistence. |
pinot-controller/.../PinotTaskManager.java |
Sanitizes task failures. |
pinot-controller/.../TableConfigTunerUtils.java |
Avoids configuration leakage. |
pinot-controller/.../Services.ts |
Handles versioned API responses. |
pinot-controller/.../TaskQueueTable.tsx |
Removes sensitive task details. |
pinot-controller/.../TenantDetails.tsx |
Handles envelope-shaped configs. |
pinot-controller/.../api/PinotTableRestletResourceTest.java |
Tests copy payload behavior. |
pinot-controller/.../AuthenticationFilterTest.java |
Tests authorization filtering. |
pinot-controller/.../PinotDdlRestletResourceMaterializedViewUnitTest.java |
Tests redacted MV DDL. |
pinot-controller/.../PinotDdlRestletResourceUnitTest.java |
Tests redacted table DDL. |
pinot-controller/.../PinotMaterializedViewRestletResourceTest.java |
Tests safe MV details. |
pinot-controller/.../PinotReadOnlyTableConfigResourceTest.java |
Tests read-only security. |
pinot-controller/.../resources/PinotTableRestletResourceTest.java |
Tests table resource behavior. |
pinot-controller/.../TableConfigRedactionResourceTest.java |
Tests envelope edit semantics. |
pinot-controller/.../PinotHelixResourceManagerMaterializedViewBackfillTest.java |
Updates MV backfill coverage. |
pinot-controller/.../PinotHelixResourceManagerMaterializedViewListingTest.java |
Updates MV listing coverage. |
pinot-controller/.../PinotHelixResourceManagerStatelessTest.java |
Tests atomic version checks. |
pinot-controller/.../PinotTaskManagerStatelessTest.java |
Tests sanitized task errors. |
pinot-core/.../Actions.java |
Defines raw ZooKeeper action. |
pinot-core/.../BasicAuthPrincipal.java |
Separates explicit permissions. |
pinot-core/.../BasicAuthPrincipalUtils.java |
Builds fine-grained principals. |
pinot-core/.../FineGrainedAccessControl.java |
Defaults unknown actions to denial. |
pinot-core/.../ZkBasicAuthPrincipal.java |
Supports ZooKeeper-defined actions. |
pinot-core/.../BasicAuthTest.java |
Tests explicit raw-read grants. |
pinot-core/.../FineGrainedAuthUtilsTest.java |
Tests fine-grained authorization. |
pinot-core/.../ZkBasicAuthTest.java |
Tests ZooKeeper-backed grants. |
pinot-integration-tests/.../MultiStageEngineIntegrationTest.java |
Adapts integration consumers. |
pinot-materialized-view/.../MaterializedViewConsistencyManager.java |
Removes sensitive diagnostics. |
pinot-materialized-view/.../GrpcMaterializedViewQueryExecutor.java |
Sanitizes query failures. |
pinot-materialized-view/.../MaterializedViewMetadataCache.java |
Uses safe config representations. |
pinot-materialized-view/.../MaterializedViewTaskScheduler.java |
Removes SQL/config logging. |
pinot-materialized-view/.../GrpcMaterializedViewQueryExecutorTest.java |
Tests safe failures. |
pinot-materialized-view/.../MaterializedViewTaskSchedulerTest.java |
Tests sanitized scheduling. |
pinot-minion/.../TaskFactoryRegistry.java |
Removes task-config diagnostics. |
pinot-minion/.../TaskFactoryRegistryTest.java |
Tests safe task diagnostics. |
pinot-plugins/.../MaterializedViewTaskExecutor.java |
Stops logging SQL/configs. |
pinot-spi/.../ConfigUtils.java |
Removes resolved config bodies. |
pinot-spi/.../TableConfigRedactionUtils.java |
Implements redaction and marker restoration. |
pinot-spi/.../UserConfig.java |
Adds fine-grained permissions. |
pinot-spi/.../Obfuscator.java |
Applies structured credential policy. |
pinot-spi/.../UserConfigBuilder.java |
Builds fine-grained permissions. |
pinot-spi/.../ConfigUtilsTest.java |
Tests diagnostic sanitization. |
pinot-spi/.../TableConfigRedactionUtilsTest.java |
Tests redaction and restoration. |
pinot-spi/.../UserConfigTest.java |
Tests permission serialization. |
pinot-spi/.../ObfuscatorTest.java |
Tests structured obfuscation. |
pinot-sql-ddl/.../PropertyExtractor.java |
Removes values from errors. |
pinot-sql-ddl/.../CanonicalDdlEmitterTest.java |
Tests safe DDL errors. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
25cc6b4 to
a77e8ae
Compare
0131842 to
ea9841a
Compare
f3eb297 to
9bf1279
Compare
36bbe6e to
c28735e
Compare
c28735e to
d45591c
Compare
4642b5c to
4246e2a
Compare
c5a4eec to
bc891ff
Compare
Return edit-safe table configuration representations while preserving unresolved placeholders and ordinary values. Use versioned snapshots for masked round trips, restore unchanged values only when they remain bound to the same configuration identity, and reject stale or ambiguous markers. Commit coordinated schema and hybrid config updates atomically. Keep raw metadata access explicit and remove configuration contents from related diagnostics.
How to reproduce: run the four focused controller test classes on the preceding PR head. Schema incompatibility returns HTTP 500, raw ZK reads are forbidden in the shared test controller, and the schema mock misses the version Stat. The DDL test also expects a diagnostic that redaction now removes. Validation: 60 focused TestNG cases passed with the exact 28-module reactor; controller Spotless, license, and Checkstyle checks passed.
bc891ff to
6562621
Compare
- Allow every fine-grained action by default again so clusters without
authentication keep the ZK browser and instance pages; basic-auth
principals still need an explicit GetZnode grant
- Serve the legacy redacted shapes from GET /tables/{t} and
GET /tableConfigs/{t} unless the versioned envelope media type is
requested; the UI requests the envelope so masked edits still restore
- Accept both the envelope and the legacy map in copyTable so copying
from a controller that predates the envelope works
- Mask ${VAR:default} placeholder defaults under credential keys and
restore them from the stored config; the log obfuscator masks them too
PR flow
GET returns versioned envelope with redacted config; PUT requires envelope with expected version for atomic update.
AI-generated · Green: added · Yellow: modified · Red: removed · Gray: existing
Partial evidence: 31 file patches omitted; 3 truncated.
Diff evidence
Summary
SHOW CREATE TABLE,SHOW CREATE MATERIALIZED VIEW, and materialized-view details.${...}placeholders.get_znodepermission for raw ZooKeeper reads.Update semantics
The GET APIs return a versioned envelope containing the redacted configs and the per-znode ZooKeeper data versions used to produce them. Clients editing a masked response must retain and submit the complete envelope.
*****value restores the stored value only when it remains unambiguously bound to the same property and consumer identity.Connection settings remain part of consumer identity when retaining masked values; stream-array reordering preserves the binding to the matched consumer. Version checks cover existing znode data versions; table-incarnation fencing across delete/recreate and transactional absence checks remain outside their scope.
Compatibility
This changes the default response shape for the two table-configuration GET APIs. The response now has an object-valued table identity, format version, base versions, and nested configs. The Java admin client, controller UI, segment-generation reader, copy flow, and affected integration-test consumers are updated accordingly.
The envelope is intentionally not deserializable as the previous top-level
TableConfigorTableConfigsbody, so replaying a complete masked response through an older controller fails before mutation. Mixed-version clients must preserve the envelope and send it to a controller that supports the new format. Copy requires the matching versioned response media type.How to reproduce
${...}placeholder./tables/{name}and/tableConfigs/{name}as a table READ principal, and inspect both SHOW CREATE forms.*****, the placeholder remains unchanged, and ordinary settings are preserved.Validation
Validated source:
65626210bf, rebased onto Apache master083f293738. All six original commits are retained. The controller conflict resolution preserves the upstream EnumSet validation API and instance-assignment skip gate alongside the versioned update paths.Hosted checks for current head
65626210bfcompleted successfully: both unit shards, both integration shards, linter, quickstart, Java 11 client and all five compatibility jobs. The current Unit workflow logs independently confirm the same 192 targeted invocations, including the credential-destination and stream-array-reordering regressions. Formal maintainer approval remains required.