fix(microbiology): secure analyzer event ingress - #4116
Open
pmanko wants to merge 9 commits into
Open
Conversation
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 24, 2026 08:36
0d4e0b3 to
350dc56
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 24, 2026 13:25
350dc56 to
1fd94e9
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 24, 2026 15:25
1fd94e9 to
b86972f
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Secures normalized microbiology analyzer-event ingress by enforcing stateless HTTP Basic auth + existing “Analyser Import” authority, while updating tests/tooling and documenting the contract and roadmap status.
Changes:
- Refactors backend user/audit resolution to prefer request-scoped identity without creating HTTP sessions; updates controller tests accordingly.
- Updates Playwright microbiology seeding to use a storage-free Basic-auth client and adds coverage for browser-session rejection.
- Repairs dev-stack submodule initialization determinism; updates OpenAPI/spec documentation and pins analyzer-mock-server tooling.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/analyzer-mock-server | Pins mock-server submodule to updated revision. |
| src/test/java/org/openelisglobal/sampletyperequest/controller/SampleTypeRequestRestControllerTest.java | Updates tests to model request-scoped user identity (no session). |
| src/test/java/org/openelisglobal/qachecklist/controller/SampleQaChecklistRestControllerTest.java | Removes session mocking from QA checklist tests. |
| src/test/java/org/openelisglobal/microbiology/MicrobiologyArchitectureTest.java | Broadens Liquibase-related exclusions in fixture SQL-guard architecture test. |
| src/test/java/org/openelisglobal/eqa/controller/rest/EQADistributionRestControllerTest.java | Updates EQA tests to use request attributes instead of sessions. |
| src/test/java/org/openelisglobal/eqa/controller/EQAProgramRestControllerTest.java | Updates EQA tests to use request attributes instead of sessions. |
| src/test/java/org/openelisglobal/eqa/controller/EQAMyProgramsRestControllerTest.java | Updates EQA tests to use request attributes instead of sessions. |
| src/test/java/org/openelisglobal/eqa/controller/EQAEnrollmentRestControllerTest.java | Updates EQA tests to use request attributes instead of sessions. |
| src/test/java/org/openelisglobal/common/util/ControllerUtillsTest.java | Adds regression tests ensuring audit actor lookup does not create sessions. |
| src/test/java/org/openelisglobal/common/rest/provider/SampleEntryTestsForTypeProviderRestControllerTest.java | Updates provider controller test to use request-scoped user identity. |
| src/test/java/org/openelisglobal/alert/service/AlertNotificationServiceTest.java | Fixes timezone-dependent cutoff logic in alert test. |
| src/test/java/org/openelisglobal/FixtureLoaderSequenceSynchronizationTest.java | Adds regression test for DbUnit fixture sequence synchronization. |
| src/main/java/org/openelisglobal/common/util/ControllerUtills.java | Resolves sys user id from request attribute first, then existing session only. |
| src/main/java/org/openelisglobal/common/rest/provider/SampleEntryTestsForTypeProviderRestController.java | Uses shared sys-user resolver rather than session-only lookup. |
| specs/782-ogc-782-microbiology-mvp-spec/tasks.md | Marks analyzer ingress security slice as complete; updates iteration text. |
| specs/782-ogc-782-microbiology-mvp-spec/plan.md | Documents Basic-auth + role approach for normalized ingress. |
| specs/782-ogc-782-microbiology-mvp-spec/evidence/code-qa-r10-2026-08-22.md | Adds Code QA evidence writeup for the slice. |
| specs/782-ogc-782-microbiology-mvp-spec/contracts/microbiology-openapi.yaml | Adds Basic security scheme + 401/403 responses for ingress endpoints. |
| scripts/tests/test_dev_stack.py | Adds coverage for safe/forceful submodule initialization behavior. |
| scripts/dev-stack | Implements safer deterministic per-submodule initialization with guarded force. |
| frontend/src/components/microbiology/tests/MicrobiologyCaseView.test.jsx | Switches interaction from keyboard Enter to click for Carbon action. |
| frontend/playwright/tests/foundational/core/microbiology-worklist-grains.spec.ts | Adds explicit 401 assertion for browser ingress attempt; updates helper calls. |
| frontend/playwright/helpers/seed-microbiology-data.ts | Introduces storage-free Basic-auth request context for analyzer ingress seeding. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 24, 2026 17:06
b86972f to
b08cfa1
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 24, 2026 17:26
b08cfa1 to
5209096
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 24, 2026 18:57
5209096 to
eb313e1
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 24, 2026 19:40
eb313e1 to
6ef691e
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 24, 2026 21:47
6ef691e to
c79cdb3
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 24, 2026 22:01
c79cdb3 to
5513108
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 24, 2026 22:15
5513108 to
acc330d
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 24, 2026 22:41
acc330d to
3dec7b6
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 25, 2026 18:02
8c7fc23 to
b6eb880
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 25, 2026 18:10
b6eb880 to
7de81e5
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 25, 2026 20:17
7de81e5 to
28b99c0
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 25, 2026 22:16
28b99c0 to
dbb7c82
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 25, 2026 23:34
dbb7c82 to
7ef3756
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 25, 2026 23:48
7ef3756 to
c705b8d
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 25, 2026 23:56
c705b8d to
c0cf94a
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 26, 2026 00:44
c0cf94a to
ef286dc
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 26, 2026 02:03
ef286dc to
3740325
Compare
pmanko
force-pushed
the
feat/782-ogc-782-microbiology-r10-analyzer-ingress-security
branch
from
August 26, 2026 02:26
3740325 to
3a0bc3c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack
Behavior
The Bridge already supports configured outbound Basic credentials. Deployments must configure an OpenELIS account with the existing Analyser Import role; this PR does not add a role, hardcode an account, or claim to reroute existing raw ASTM/HL7 traffic through the normalized microbiology endpoints.
Development tooling repaired
Validation
observation_history_seqafter explicit fixture IDs; a focused regression proves the next generated ID follows the loaded rows. No analyzer-specific sequence reset was added.python3 -m unittest scripts.tests.test_dev_stackscripts/run-java21 mvn spotless:checkcd frontend && npm run check-formatCI repair
Data and compatibility
Review evidence
specs/782-ogc-782-microbiology-mvp-spec/evidence/code-qa-r10-2026-08-22.mdAMR-S31(R10 analyzer ingress security)819a60fb919d31bbc6ceb025b2be18ec50035d9620260822T175834Z-819a60fb919d, stateready; health and smoke verification passed./and/Microbiology/worklistreturn200; application container is healthy.Analyzer AST results expose QC evidence, resolve explicitly, and become reviewablepasses, including browser-session rejection with401, machine submission, QC evidence, explicit override, acceptance, and reviewed state.Unmatched analyzer AST results remain visible for admin reconciliationpasses through the configured Admin -> Stuck analyzer events path.This PR contains the analyzer-ingress security behavior, shared fixture-loader repair, Playwright helper contract, and focused regression coverage described above; it is not a tasks-only update. The deployment evidence remains pinned to the exact implementation SHA above until these review fixes are deployed. Human UAT remains separate, and R10 is not marked
[✓].Known separate issue
During startup, the Horiba Pentra 60 analyzer CSV initializer attempts to create a duplicate
LYM#(Whole Blood)test description and aborts that configuration transaction. The application still becomes healthy and both R10 journeys pass. This is not introduced by R10, but the analyzer configuration import should be made idempotent in separate work.Known analyzer-navigation warnings (dynamic analyzer names used as translation identifiers and duplicate React menu keys) are documented in the evidence and are also not introduced by this slice.