Skip to content

Add audit-logged query service#2

Draft
argahsuknesib wants to merge 5 commits intomainfrom
feature/audit-logged-query-service
Draft

Add audit-logged query service#2
argahsuknesib wants to merge 5 commits intomainfrom
feature/audit-logged-query-service

Conversation

@argahsuknesib
Copy link
Copy Markdown
Collaborator

Summary\n- Add structured audit log entries for query registration, status transitions, similarity references, and access events.\n- Integrate actor- and scope-aware query reuse into the existing websocket query flow.\n- Expose the audit log through .\n\n## Verification\n-

privacy-preserved-healthcare-stream-monitoring@1.0.0 test
jest --coverage src/service/query-registry/AuditLoggedQueryService.test.ts

-----------------------------|---------|----------|---------|---------|--------------------------------------------------------------------

File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 41.08 25.28 45.83 39.86
service/authorization 31.57 33.33 22.22 31.57
TokenManagerService.ts 31.57 33.33 22.22 31.57 28-85
service/query-registry 57.97 44.18 58.97 55.72
AuditLoggedQueryService.ts 57.97 44.18 58.97 55.72 96,100,108,116,128,142,156,218-226,239-241,253-284,299-328,358-392
utils 18.25 0 8.33 18.4
RdfHttpClient.ts 10 0 0 10 15-65
Util.ts 20.83 0 10 21.05 28-31,44-47,58-67,76-95,105-119,129-154,164-183,193-211
utils/query-registry 64.51 40 58.33 64.51
Mutex.ts 86.66 50 100 86.66 22,38
Util.ts 43.75 0 28.57 43.75 41-84
----------------------------- --------- ---------- --------- --------- --------------------------------------------------------------------\n-

privacy-preserved-healthcare-stream-monitoring@1.0.0 build
npx tsc\n\n## Notes\n- Reuse is conservative: same normalized query is only reused when actor and authorization scope match.\n- Cross-actor submissions keep similarity references for auditability but do not reuse execution results.

- Introduced a new script `webhook_latency_benchmark.js` to measure and log the latency of webhook responses.
- The script supports configuration via environment variables for flexibility in testing different endpoints and parameters.

feat: create temporary query registration script

- Added `tmp-register-query.js` to register a sample query with the WebSocket server.
- This script facilitates testing of query registration functionality.

feat: add exact test commands for UMA authorization

- Created `EXACT_TEST_COMMANDS.sh` to provide validated curl commands for testing derived resource authorization.
- The script includes steps for creating ODRL policies and testing access without tokens.

feat: implement live test for derived resource authorization

- Added `LIVE_TEST_DERIVED_RESOURCE.sh` to validate the authorization flow for derived resources.
- The script checks server availability, creates policies, and verifies access control.

feat: add smoke test for UMA authorization

- Introduced `smoke.js` to perform a basic smoke test for UMA authorization flows.
- The script checks resource accessibility and handles UMA challenges.

feat: create TypeScript test for derived policy

- Added `test-derived-policy.ts` to automate the creation and validation of ODRL policies for derived resources.
- The script fetches UMA configuration and checks for proper policy creation.

feat: add derived resource authorization test script

- Created `test-derived-resource-authorization.sh` to validate the full authorization flow for derived resources.
- The script includes steps for policy creation, ticket extraction, and token exchange.

fix: add default UMA claim configuration

- Introduced `UmaClaim.ts` to manage default UMA claim token and format.
- This ensures consistent claim handling across the application.

feat: implement notification topic resolver

- Added `NotificationTopicResolver.ts` to resolve notification topics from webhook data.
- The function normalizes URLs and extracts relevant topics for processing.
… benchmark runbook

- strict UMA preflight (401 challenge, allow/deny/wrong-target checks)
- REPLAYER benchmark-mode guard against public endpoints
- enforcement proof scripts and artifacts
- latency benchmark harness updates
- reproducible benchmark runbook
…racking

- stop tracking generated benchmark outputs and CSV artifacts

- add ignore rules to prevent artifact recommit

- preserve only source, scripts, and reproducibility docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant