Repository navigation
test(identity-lab): Add security and integration test suite - #124
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #124 +/- ##
===========================================
- Coverage 86.75% 72.96% -13.79%
===========================================
Files 681 775 +94
Lines 18902 23766 +4864
Branches 2291 3045 +754
===========================================
+ Hits 16398 17341 +943
- Misses 1760 5619 +3859
- Partials 744 806 +62
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:
|
mckaragoz
marked this pull request as ready for review
October 30, 2026 08:49
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.
Adds an independent Identity Lab xUnit project at
tests/CodeBeam.UltimateAuth.IdentityLab.Teststo verify sandbox isolation, role boundaries, provisioning integrity, and lifecycle behavior through actual services and policies.The suite uses PostgreSQL 17 with Testcontainers 4.16.0, a separate database per test, and production migrations. Integration tests compose both Lab and framework persistence; focused tests replace selected framework stores/clients and authenticated-context sources. The project is included in the solution and a dedicated .NET 10 CI job uploads TRX results, including on failure.
Production source is unchanged. The failing regression remains enabled and is included in normal local and CI runs.
Test execution
Executed locally in Release with .NET SDK 10.0.403:
All 67 Identity Lab cases executed; the final run took 33 seconds after build. All 3,132 existing tests passed.
git diff --checkpassed. Initial SDK/network/Docker access issues were resolved. The external PostgreSQL connection-string alternative was not separately exercised; remote CI results are not claimed.Coverage matrix
Detailed matrix: security-coverage.md
Execution report and reproduction: execution-report.md
Known failing regression
Regression/SystemRoleIdentityTests.Owner_name_with_admin_id_must_be_rejected_before_assignmentreproduces a system-role ID validation gap:OWNERto a role withLabRoleIds.Admin.LabRoleService.AssignAsync(singleTenant, target, "Owner").This requires malformed role data or a compromised store. Admin seed validation normally rejects mismatched IDs, and the helper is not a public role-mutation endpoint. It is a reproduced defense-in-depth integrity defect, not a demonstrated ordinary-user escalation. No production fix, test disabling, known-defect exclusion, or continue-on-error was added.
Remaining gaps and CI readiness
Full hosted HTTP/cookie identity authenticity, diagnostics transport, standalone identifier availability, complete deletion cleanup, owner/admin repair, registration failure recovery, and cancellation/restart boundaries remain partial or untested. Some services trust actor-key arguments supplied by callers; direct service tests do not establish transport-level authenticity.
This draft is not ready to become a required green CI gate: the preserved regression fails and needs separate triage and explicitly approved production work. Passing the other tests does not establish complete security coverage.