Skip to content

Commit

Permalink
Pyic 7650 international address fraud route (#2803)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanCorderIPV authored Dec 18, 2024
2 parents fcdf16c + 3d672c9 commit f4b63d5
Show file tree
Hide file tree
Showing 40 changed files with 548 additions and 152 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pre-merge-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ jobs:
- name: Local API tests
env:
ASYNC_QUEUE_NAME: ${{ steps.extract_queue_name.outputs.queue_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MANAGEMENT_CIMIT_STUB_API_KEY: ${{ secrets.MANAGEMENT_CIMIT_STUB_API_KEY }}
EVCS_STUB_API_KEY: ${{ secrets.API_KEY_EVCS }}
CRI_STUB_GEN_CRED_API_KEY: ${{ secrets.CRI_STUB_GEN_CRED_API_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion api-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ There are 3 presets that can be used:
- `npm run test:local` - runs against an already-running local instance of core-back
- `npm run test:ci` - starts a new local instance of core-back and tests against it

Additional arguments can be passed to cucumber, e.g. to include specific tests: `npm test:local -- --name 'F2F'`
Additional arguments can be passed to cucumber, e.g. to include specific tests: `npm run test:local -- --name 'F2F'`

If you are using custom configuration, then you can use `npm test` to invoke cucumber without any presets.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"checkMethod": "bvr"
}
],
"validityScore": 2,
"validityScore": 3,
"strengthScore": 4,
"type": "IdentityCheck"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"checkMethod": "bvr"
}
],
"validityScore": 2,
"validityScore": 3,
"strengthScore": 4,
"type": "IdentityCheck"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"checkMethod": "bvr"
}
],
"validityScore": 2,
"strengthScore": 3,
"validityScore": 3,
"strengthScore": 4,
"type": "IdentityCheck"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"checkMethod": "bvr"
}
],
"validityScore": 2,
"validityScore": 3,
"strengthScore": 4,
"type": "IdentityCheck"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type": "IdentityCheck",
"validityScore": 2,
"validityScore": 3,
"strengthScore": 4,
"failedCheckDetails": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"address": [
{
"addressCountry": "GB",
"uprn": 100120012047,
"buildingName": "",
"streetName": "King Road",
"postalCode": "BS9 6NR",
"buildingNumber": "28",
"addressLocality": "BRISTOL",
"validFrom": "1000-01-01",
"subBuildingName": ""
}
],
"name": [
{
"nameParts": [
{
"type": "GivenName",
"value": "KENNETH"
},
{
"type": "FamilyName",
"value": "SMITH"
}
]
}
],
"birthDate": [
{
"value": "1965-07-08"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"failedCheckDetails": [
{
"checkMethod": "data",
"fraudCheck": "applicable_authoritative_source"
}
],
"txn": "RB000117420948",
"type": "IdentityCheck"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"address": [
{
"addressCountry": "GB",
"uprn": 100120012047,
"buildingName": "",
"streetName": "King Road",
"postalCode": "BS9 6NR",
"buildingNumber": "28",
"addressLocality": "BRISTOL",
"validFrom": "1000-01-01",
"subBuildingName": ""
}
],
"name": [
{
"nameParts": [
{
"type": "GivenName",
"value": "KEN"
},
{
"type": "FamilyName",
"value": "DECERQUEIRA"
}
]
}
],
"birthDate": [
{
"value": "1965-07-08"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"failedCheckDetails": [
{
"checkMethod": "data",
"fraudCheck": "applicable_authoritative_source"
}
],
"txn": "RB000117420948",
"type": "IdentityCheck"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"address": [
{
"addressCountry": "GB",
"buildingName": "",
"streetName": "HADLEY ROAD",
"postalCode": "BA2 5AA",
"buildingNumber": "8",
"addressLocality": "BATH",
"subBuildingName": ""
}
],
"name": [
{
"nameParts": [
{
"type": "GivenName",
"value": "KENNETH"
},
{
"type": "FamilyName",
"value": "DECERQUEIRA"
}
]
}
],
"birthDate": [
{
"value": "1965-07-08"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"failedCheckDetails": [
{
"checkMethod": "data",
"fraudCheck": "applicable_authoritative_source"
}
],
"txn": "RB000117420948",
"type": "IdentityCheck"
}
5 changes: 3 additions & 2 deletions api-tests/features/p2-international-journey.feature
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Feature: P2 App journey
Then I get an OAuth response
When I use the OAuth response to get my identity

Scenario: Successful P2 identity via DCMAW using passport
Scenario: Successful P2 international identity via DCMAW using passport
When I submit an 'international' event
Then I get a 'non-uk-app-intro' page response
When I submit a 'useApp' event
Expand All @@ -45,12 +45,13 @@ Feature: P2 App journey
| Attribute | Values |
| context | "international_user" |
Then I get a 'fraud' CRI response
When I submit 'kenneth-score-2' details to the CRI stub
When I submit 'kenneth-no-applicable' details to the CRI stub
Then I get a 'page-ipv-success' page response
When I submit a 'next' event
Then I get an OAuth response
When I use the OAuth response to get my identity
Then I get a 'P2' identity
And I get 'fraud-check-unavailable' return codes
And an 'IPV_IDENTITY_ISSUED' audit event was recorded [local only]

Scenario: User looks for alternative methods to prove identity without using the app
Expand Down
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
@Build
Feature: Identity reuse update details
Feature: International identity reuse update details

Background:
Given the subject already has the following credentials
| CRI | scenario |
| dcmaw | kenneth-driving-permit-valid |
| address | kenneth-current |
| fraud | kenneth-score-2 |
| CRI | scenario |
| dcmaw | kenneth-passport-valid |
| address | kenneth-current |
| fraud | kenneth-no-applicable |
When I start a new 'medium-confidence' journey
And I activate the 'internationalAddress' feature sets
Then I get a 'page-ipv-reuse' page response
When I submit a 'update-details' event
When I activate the 'internationalAddress' feature sets
And I submit a 'update-details' event
Then I get a 'update-details' page response

Scenario: Address Change
Scenario: International Address Change
When I submit a 'address-only' event
Then I get a 'address' CRI response
When I submit 'kenneth-changed' details with attributes to the CRI stub
| Attribute | Values |
| context | "international_user" |
Then I get a 'fraud' CRI response
When I submit 'kenneth-score-2' details to the CRI stub
When I submit 'kenneth-no-applicable' details to the CRI stub
Then I get a 'page-ipv-success' page response with context 'updateIdentity'
When I submit a 'next' event
Then I get an OAuth response
When I use the OAuth response to get my identity
Then I get a 'P2' identity
And my address 'buildingNumber' is '28'

Scenario: Address and Family Name Change
Scenario: International Address and Family Name Change
When I submit a 'family-name-and-address' event
Then I get a 'page-update-name' page response
When I submit a 'update-name' event
Then I get a 'dcmaw' CRI response
When I submit 'kenneth-changed-family-name-driving-permit-valid' details to the CRI stub
When I submit 'kenneth-changed-family-name-passport-valid' details to the CRI stub
Then I get a 'page-dcmaw-success' page response with context 'coiAddress'
When I submit a 'next' event
Then I get a 'address' CRI response
When I submit 'kenneth-changed' details with attributes to the CRI stub
| Attribute | Values |
| context | "international_user" |
Then I get a 'fraud' CRI response
When I submit 'kenneth-changed-family-name-score-2' details to the CRI stub
When I submit 'kenneth-changed-family-name-and-address-no-applicable' details to the CRI stub
Then I get a 'page-ipv-success' page response with context 'updateIdentity'
When I submit a 'next' event
Then I get an OAuth response
Expand All @@ -50,20 +50,20 @@ Feature: Identity reuse update details
And my identity 'FamilyName' is 'Smith'
And my address 'addressLocality' is 'Bristol'

Scenario: Address and Given Name Change
Scenario: International Address and Given Name Change
When I submit a 'given-names-and-address' event
Then I get a 'page-update-name' page response
When I submit a 'update-name' event
Then I get a 'dcmaw' CRI response
When I submit 'kenneth-changed-given-name-driving-permit-valid' details to the CRI stub
When I submit 'kenneth-changed-given-name-passport-valid' details to the CRI stub
Then I get a 'page-dcmaw-success' page response with context 'coiAddress'
When I submit a 'next' event
Then I get a 'address' CRI response
When I submit 'kenneth-changed' details with attributes to the CRI stub
| Attribute | Values |
| context | "international_user" |
Then I get a 'fraud' CRI response
When I submit 'kenneth-changed-given-name-score-2' details to the CRI stub
When I submit 'kenneth-changed-given-name-and-address-no-applicable' details to the CRI stub
Then I get a 'page-ipv-success' page response with context 'updateIdentity'
When I submit a 'next' event
Then I get an OAuth response
Expand Down
32 changes: 16 additions & 16 deletions api-tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions api-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
"lint-fix": "eslint --fix . && prettier . --write"
},
"devDependencies": {
"@cucumber/cucumber": "^11.1.0",
"@govuk-one-login/data-vocab": "^1.7.2",
"@types/eslint__js": "^8.42.3",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"jose": "^5.9.2",
"jsonschema": "^1.4.1",
"@cucumber/cucumber": "11.1.0",
"@govuk-one-login/data-vocab": "1.9.0",
"@types/eslint__js": "8.42.3",
"dotenv": "16.4.5",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"jose": "5.9.2",
"jsonschema": "1.4.1",
"prettier": "3.4.1",
"start-server-and-test": "^2.0.4",
"ts-node": "^10.9.2",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.0",
"yaml": "^2.6.0"
"start-server-and-test": "2.0.4",
"ts-node": "10.9.2",
"typescript": "5.7.2",
"typescript-eslint": "8.18.0",
"yaml": "2.6.0"
}
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ awsSdkSqs = { module = "software.amazon.awssdk:sqs" }
awsSdkUrlConnectionClient = { module = "software.amazon.awssdk:url-connection-client" }
commonsCodec = "commons-codec:commons-codec:1.17.0"
commonsCollections = "org.apache.commons:commons-collections4:4.5.0-M2"
diVocab = "uk.gov.di.model:di-data-model-jackson:v1.7.1"
diVocab = "uk.gov.di.model:di-data-model-jackson:v1.9.0"
hamcrest = "org.hamcrest:hamcrest:3.0"
jacksonDatabind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "jackson" }
jacksonDataformatYaml = { module = "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", version.ref = "jackson" }
Expand Down
Loading

0 comments on commit f4b63d5

Please sign in to comment.