feat(compliance): add the deterministic sandbox kyc provider - #284
Merged
Conversation
Provide an in-tree sandbox implementation of the KycProvider port for local and test use. It is off by default and only activates when fincore.compliance.kyc.sandbox.enabled is true, mirroring the sandbox bank provider. The outcome is a pure function of documented case-insensitive markers in the opaque subject reference (reject, pending, insufficient, otherwise approved), so the same reference always yields the same result. It encodes no real provider logic and the returned provider reference is an opaque token, not the input echoed back. Closes #239
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.
E-04 / E-06 #239 - an in-tree sandbox impl of the KycProvider port (unblocked now that port #263 exists). Mirrors the merged SandboxBankProvider (#212).
What
infrastructure/kyc/SandboxKycProvider-@Component @ConditionalOnProperty(prefix="fincore.compliance.kyc.sandbox", name=[enabled], havingValue=true, matchIfMissing=false), off by default. Deterministic, marker-based on the opaquesubjectReference:reject-> Rejected,pending-> Pending,insufficient-> InsufficientData, otherwise Approved. The same reference always yields the same result; the provider reference is an opaque token (sbx-kyc-<hash>), not the input echoed back.Bean-conflict avoidance (the key CI risk - designed out)
Off-by-default + the existing @SpringBootTest ITs (KycApiContextIT/AmlConsumerIT/ComplianceLifecycleIT) do NOT set the flag -> SandboxKycProvider stays inactive there -> their test-fake KycProvider remains the single bean -> no NoUniqueBeanDefinitionException. The ITs are untouched.
Gate chain
All local gates green (unit test; infrastructure/kyc so the domain jacoco gate is unaffected).
Closes #239