Background
The go-trust PDP (PR #22) has added support for action.parameters.credential_types. The E2E test suite should include test scenarios that verify credential type filtering works correctly.
Current State
The trust integration tests in specs/vc/trust-integration.spec.ts test basic trust evaluation but do not cover credential type constraints.
New Test Scenarios Needed
1. Credential Type Filtering
Test that the PDP correctly handles credential type constraints:
test('should permit issuer with matching credential_types', async () => {
const result = await evaluateTrust(
'pid', // tenant with PID issuer whitelisted
issuerId,
'credential-issuer',
{ credential_types: ['eu.europa.ec.eudi.pid.1'] }
);
expect(result.decision).toBe(true);
expect(result.context.reason.credential_types).toContain('eu.europa.ec.eudi.pid.1');
});
test('should deny issuer for unauthorized credential_types', async () => {
const result = await evaluateTrust(
'pid', // tenant that only allows PID
issuerId,
'credential-issuer',
{ credential_types: ['org.iso.18013.5.1.mDL'] } // mDL not allowed
);
expect(result.decision).toBe(false);
});
2. Trust Mark Mapping
Test that OIDF registry returns credential_type_trust_marks:
test('should return credential_type_trust_marks for OIDF issuers', async () => {
const result = await evaluateTrust(
'oidf',
oidfIssuerId,
'credential-issuer',
{ credential_types: ['eu.europa.ec.eudi.pid.1'] }
);
expect(result.context.reason.credential_type_trust_marks).toBeDefined();
});
3. Audit Logging
Verify that credential_types appears in all responses (success and failure) for audit purposes.
Tasks
Dependencies
- go-trust PR #22 must be merged
- go-wallet-backend #74 must implement proxy support
Related
Background
The go-trust PDP (PR #22) has added support for
action.parameters.credential_types. The E2E test suite should include test scenarios that verify credential type filtering works correctly.Current State
The trust integration tests in
specs/vc/trust-integration.spec.tstest basic trust evaluation but do not cover credential type constraints.New Test Scenarios Needed
1. Credential Type Filtering
Test that the PDP correctly handles credential type constraints:
2. Trust Mark Mapping
Test that OIDF registry returns credential_type_trust_marks:
3. Audit Logging
Verify that credential_types appears in all responses (success and failure) for audit purposes.
Tasks
evaluateTrusthelper to supportaction.parametersDependencies
Related