Commit 8e8a383
feat: Stabilisation (#9)
* Add OPA permission calls to all applicable coprocessor hooks with test coverage for most of them
* add claude.md to gitignore and reduce log level to trace for high frequency calls
* bump to hbase 2.6.4
* check default namespace permissions on namespace actions
* added reflection test to confirm coverage
* renamed ctx variable consistently and refactored requirePermission
* introduce OpType to add granularity
* implement Filter-based preCheckAndPut/preCheckAndDelete overloads
* add mutation checks
* pass families to permission checker
* pass map of key + families to permission checker
* check pass-throughs and no-ops
* fix 2 warnings
* Add OPA policy testing layer design doc
Describes a fast intermediate test layer that captures unit-test WireMock
payloads, remaps usernames to Rego-compatible principals, and validates the
Rego policy logic using the opa test CLI — without integration test overhead.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add OPA policy testing implementation plan
Five tasks: OpaFixtureWriter class, test wiring, Rego files,
Maven plugins (download-maven-plugin + exec-maven-plugin), and
end-to-end verification.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add OpaFixtureWriter for capturing WireMock OPA fixtures
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix OpaFixtureWriter concurrency: single monitor, plain int counters
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Wire OpaFixtureWriter into test teardown and WireMock listener
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Filter system-user fixtures; fix listener registration in Variants test
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Use @before for listener registration; document fixture filter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add Rego policy file and OPA test suite
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add download-maven-plugin and exec-maven-plugin for OPA policy testing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Move OPA fixtures to target/, add print counts, untrack plan docs
- OpaFixtureWriter writes to target/test-rego/fixtures.json (was
src/test/rego/fixtures.json) so test runs no longer dirty the working tree
- pom.xml opa-policy-test execution updated to match new path
- hbase_test.rego: add print() calls so --explain notes reports fixture counts
- .gitignore: add /docs/plans/ (plan docs are local-only, not committed)
- Remove stale design doc and completed implementation plan from git
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add unit tests for bulk load and lock hooks
prePrepareBulkLoad, preCleanupBulkLoad, preBulkLoadHFile (region-level),
preLockHeartbeat, and preRequestLock (table, namespace, and region-scope
branches) were implemented but had no unit tests. Brings coverage from
83 to 90 passing tests.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* add final
* clarified comment
* updated interface check test
* make casing consistent with rego rules in integration tests
* added readonly tests to match integration test coverage
* replace lambda with a more readable loop
* bind exec to skip tests so it only runs when the prerequisite files are created
* bump maven plugins
* google-format, error-prone etc. plugins
* bumped opa to 1.12.3
* bump caffeine
* consolidate private method with public one
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 87f7e51 commit 8e8a383
14 files changed
Lines changed: 2601 additions & 443 deletions
File tree
- src
- main/java/tech/stackable/hbase
- opa
- test
- java/tech/stackable/hbase
- rego
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
109 | 116 | | |
110 | 117 | | |
111 | 118 | | |
| |||
133 | 140 | | |
134 | 141 | | |
135 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
136 | 167 | | |
137 | 168 | | |
138 | 169 | | |
| |||
234 | 265 | | |
235 | 266 | | |
236 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
237 | 324 | | |
238 | 325 | | |
239 | 326 | | |
| |||
0 commit comments