Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
097957d
change validateToken http code to 403
aktaskaan Jun 5, 2024
2253dd8
fix event token claim validation
aktaskaan Jun 10, 2024
faae9da
replace master.caseworker@gmail.com credentials with alias BeftaMaste…
aktaskaan Jun 19, 2024
4796b0b
Merge branch 'master' into ccd_4311
aktaskaan Jun 19, 2024
0772e61
Merge branch 'master' into ccd_4311
aktaskaan Nov 20, 2024
951abd7
remove unused import
aktaskaan Nov 20, 2024
d7e0655
improve exceptions
aktaskaan Nov 22, 2024
67f383f
Merge branch 'master' into ccd_4311
patelila Nov 27, 2024
f3c7f8e
Merge branch 'master' into ccd_4311
aktaskaan Dec 10, 2024
3622da3
make ACL and ComplexACL immutable with shallow cloning to reduce memo…
aktaskaan Jun 13, 2025
342a2b1
Merge branch 'master' into ccd_6395
aktaskaan Jun 17, 2025
b4abbc5
Merge branch 'master' into ccd_6395
aktaskaan Jun 17, 2025
6fff695
Merge branch 'refs/heads/master' into ccd_6395
aktaskaan Jul 16, 2025
07f9f44
fix conflicts
aktaskaan Jul 16, 2025
e6a5891
Merge branch 'master' into ccd_6395
aktaskaan Jul 16, 2025
0168608
Merge branch 'master' into ccd_6395
aktaskaan Dec 29, 2025
07fff46
fix: failing test cases in conditional field restoration tests
aktaskaan Dec 29, 2025
e59c6b5
Merge branch 'master' into ccd_4311
aktaskaan Dec 29, 2025
0d3f4e6
refactor: replace deprecated JWT methods with updated implementation …
aktaskaan Dec 30, 2025
ddf3bd6
Merge branch 'ccd_4311' into combined_ccd_6395_ccd_4311
aktaskaan Jan 2, 2026
e18aa79
combine ccd-6395 and ccd-4311
aktaskaan Jan 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ env.BEFTA_RETRY_MAX_DELAY = "1000"
env.BEFTA_RETRY_NON_RETRYABLE_HTTP_METHODS = "POST,PUT"
// Prevent Docker hub rate limit errors by ensuring that testcontainers uses images from hmctspublic ACR
env.TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX = "hmctspublic.azurecr.io/imported/"
env.TOKEN_CLAIM_VALIDATION_ENABLED="true"

withPipeline(type, product, component) {
onMaster {
Expand Down
1 change: 1 addition & 0 deletions Jenkinsfile_nightly
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ env.BEFTA_RETRY_MAX_ATTEMPTS = "3"
env.BEFTA_RETRY_STATUS_CODES = "500,502,503,504"
env.BEFTA_RETRY_MAX_DELAY = "1000"
env.BEFTA_RETRY_NON_RETRYABLE_HTTP_METHODS = "POST,PUT"
env.TOKEN_CLAIM_VALIDATION_ENABLED="true"

withNightlyPipeline(type, product, component) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"request": {
"pathVariables": {
"ctid": "AAT_AUTH_8"
}
},
"body": {
"event_token": "${[scenarioContext][parentContext][childContexts][S-156_Case_Creation_Data_Token_Creation][testData][actualResponse][body][token]}"
}
},

"expectedResponse": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"_guid_": "S-156_Case_Creation_Data_Token_Creation",

"productName": "CCD Data Store",
"operationName": "Start event creation as Case worker",

"method": "GET",
"uri": "/caseworkers/{uid}/jurisdictions/{jid}/case-types/{ctid}/event-triggers/{etid}/token",

"specs": [
"to create a token for case creation"
],

"users": {
"invokingUser": {
"_extends_": "PrivateCaseworker"
}
},

"request": {
"headers": {
"_extends_": "Common_Request_Headers"
},
"pathVariables": {
"uid": "[[DEFAULT_AUTO_VALUE]]",
"jid": "AUTOTEST1",
"ctid": "AAT_AUTH_8",
"etid": "CREATE"
}
},

"expectedResponse": {
"_extends_": "Common_200_Response",
"headers": {
"Content-Encoding": "gzip",
"Content-Length": "[[ANY_INTEGER_NOT_NULLABLE]]"
},
"body": {
"token": "[[ANY_STRING_NOT_NULLABLE]]",
"case_details": {
"id": null,
"jurisdiction": "[[ANYTHING_PRESENT]]",
"state": null,
"version": null,
"case_type_id": "[[ANYTHING_PRESENT]]",
"created_date": null,
"last_modified": null,
"last_state_modified_date": null,
"security_classification": null,
"case_data": {},
"data_classification": {},
"supplementary_data": null,
"after_submit_callback_response": null,
"callback_response_status_code": null,
"callback_response_status": null,
"delete_draft_response_status_code": null,
"delete_draft_response_status": null
},
"event_id": "CREATE"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"_guid_": "Case_Creation_Using_Caseworker1_Role",
"_extends_": "Case_Creation_Data_Base",
"_extends_": "F-042_Case_Creation_Data_Base",

"users": {
"invokingUser": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"_guid_": "F-042_Case_Creation_Data_Base",
"_extends_": "Case_Creation_Base",

"request": {
"body": {
"event_token": "${[scenarioContext][parentContext][childContexts][Case_Creation_Using_Caseworker1_Role_Token_Creation][testData][actualResponse][body][token]}"
}
},

"expectedResponse": {
"_extends_": "Common_201_Response",
"headers": {
"Content-Encoding": "gzip",
"vary": "accept-encoding",
"Content-Length": "[[ANYTHING_PRESENT]]"
},
"body": {
"id": "[[ANYTHING_PRESENT]]",
"state": "TODO",
"version": 0,
"last_state_modified_date": "[[ANYTHING_PRESENT]]",
"created_date": "[[ANYTHING_PRESENT]]",
"last_modified": "[[ANYTHING_PRESENT]]",
"security_classification": "PUBLIC",
"after_submit_callback_response": null,
"callback_response_status_code": null,
"callback_response_status": null,
"delete_draft_response_status_code": null,
"delete_draft_response_status": null
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"_guid_": "Case_Creation_Using_Caseworker1_Role_Token_Creation",

"productName": "CCD Data Store",
"operationName": "Start event creation as Case worker",

"method": "GET",
"uri": "/caseworkers/{uid}/jurisdictions/{jid}/case-types/{ctid}/event-triggers/{etid}/token",

"specs": [
"to create a token for case creation"
],

"users": {
"invokingUser": {
"_extends_": "BeftaCaseworker1"
}
},

"request": {
"headers": {
"_extends_": "Common_Request_Headers"
},
"pathVariables": {
"uid": "[[DEFAULT_AUTO_VALUE]]",
"jid": "BEFTA_JURISDICTION_1",
"ctid": "BEFTA_CASETYPE_1_1",
"etid": "CREATE"
}
},

"expectedResponse": {
"_extends_": "Common_200_Response",
"headers": {
"Content-Encoding": "gzip",
"Content-Length": "[[ANY_INTEGER_NOT_NULLABLE]]"
},
"body": {
"token": "[[ANY_STRING_NOT_NULLABLE]]",
"case_details": {
"id": null,
"jurisdiction": "[[ANYTHING_PRESENT]]",
"state": null,
"version": null,
"case_type_id": "[[ANYTHING_PRESENT]]",
"created_date": null,
"last_modified": null,
"last_state_modified_date": null,
"security_classification": null,
"case_data": {},
"data_classification": {},
"supplementary_data": null,
"after_submit_callback_response": null,
"callback_response_status_code": null,
"callback_response_status": null,
"delete_draft_response_status_code": null,
"delete_draft_response_status": null
},
"event_id": "CREATE"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ Scenario: must return 409 when case is altered out of the transaction
And the response has all other details as expected.

#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@S-283
# After the event token validation fix(ccd-5521), we get the same error in the token creation process since the token
# creation has to be with the same eventId; STOP_PROGRESS, which is not valid for the event process. That's why S-283
# is not a valid scenario anymore
@S-283 @Ignore
Scenario: must return 422 when event submission has failed

Given a user with [an active profile in CCD],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"data_classification": "[[ANYTHING_PRESENT]]"
},

"event_id": "updateCaseSubmitTTL"
"event_id": "[[ANYTHING_PRESENT]]"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"_guid_": "S-1016.21_GetUpdateSuspendedCaseTokenCitizen",
"_extends_": "F-1016_GetEventTokenBase",

"users": {
"invokingUser": {
"_extends_": "BeftaCitizen2"
}
},

"request": {
"pathVariables": {
"cid": "${[scenarioContext][parentContext][childContexts][F-1016_CreateSuspendedCasePreRequisiteCitizen][testData][actualResponse][body][id]}",
"etid": "updateCaseSubmitSuspendedTTL"
}
},

"expectedResponse": {
"body": {
"event_id": "updateCaseSubmitSuspendedTTL"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"_guid_": "S-1016.7_GetUpdateSuspendedCaseTokenCaseworker",
"_extends_": "F-1016_GetEventTokenBase",

"users": {
"invokingUser": {
"_extends_": "BeftaMasterCaseworker"
}
},

"request": {
"pathVariables": {
"cid": "${[scenarioContext][parentContext][childContexts][F-1016_CreateSuspendedCasePreRequisiteCaseworker][testData][actualResponse][body][id]}",
"etid": "updateCaseSubmitSuspendedTTL"
}
},

"expectedResponse": {
"body": {
"event_id": "updateCaseSubmitSuspendedTTL"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"title": "TTL.Suspended changed to \"No\", SystemTTL and OverrideTTL greater than Guard value using v2 '/cases/{cid}/events'",

"prerequisites" : [ {
"Token_Creation": "S-1016_GetUpdateSuspendedCaseTokenCaseworker"
"Token_Creation": "S-1016.7_GetUpdateSuspendedCaseTokenCaseworker"
}
],

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"title": "TTL.Suspended changed to \"No\", SystemTTL and OverrideTTL greater than Guard value using '/citizens/{uid}/jurisdictions/{jid}/case-types/{ctid}/cases/{cid}/events'",

"prerequisites" : [{
"Token_Creation": "S-1016_GetUpdateSuspendedCaseTokenCitizen"
"Token_Creation": "S-1016.21_GetUpdateSuspendedCaseTokenCitizen"
}],

"specs": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"title": "TTL.Suspended changed to \"No\", SystemTTL and OverrideTTL greater than Guard value using '/caseworkers/{uid}/jurisdictions/{jid}/case-types/{ctid}/cases/{cid}/events'",

"prerequisites" : [ {
"Token_Creation": "S-1016_GetUpdateSuspendedCaseTokenCaseworker"
"Token_Creation": "S-1016.7_GetUpdateSuspendedCaseTokenCaseworker"
}
],

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"request": {
"pathVariables": {
"cid": "${[scenarioContext][siblingContexts][CreateCase_TTLCaseType_PreRequisiteCitizen][testData][actualResponse][body][id]}",
"etid": "updateCaseTTLInc"
"etid": "updateCaseTTLIncHidden"
}
},

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"title": "should create an event token for correct inputs",
"_guid_": "S-1018.11-GetUpdateEventToken",
"_extends_": "Token_Creation_Data_For_Master_Caseworker_Case_Creation",

"users": {
"invokingUser": {
"_extends_": "BeftaMasterCaseworker"
}
},

"request": {
"pathVariables": {
"cid": "${[scenarioContext][siblingContexts][F-1018_CreateAnotherCasePreRequisiteCaseworkerBase][testData][actualResponse][body][id]}"
}
},

"expectedResponse": {
"_extends_": "Common_200_Response",
"headers": {
"Content-Encoding": "gzip",
"Content-Length": "[[ANYTHING_PRESENT]]"
},
"body": {
"token": "[[ANYTHING_PRESENT]]",
"case_details": "[[ANYTHING_PRESENT]]",
"event_id": "updateCase"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"title": "should create an event token for correct inputs",
"_guid_": "S-1018.21-GetCitizenUpdateEventToken",
"_extends_": "F-1018-GetCitizenUpdateEventTokenBase",

"request": {
"pathVariables": {
"cid": "${[scenarioContext][siblingContexts][F-1018_CreateAnotherCasePreRequisiteCitizenBase][testData][actualResponse][body][id]}"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Feature: F-1018: Submit Event Creation Handle Case Links
And a successful call [to create a case] as in [F-1018_CreateCasePreRequisiteCaseworkerBase]
And another successful call [to create a case] as in [F-1018_CreateAnotherCasePreRequisiteCaseworkerBase]
And another successful call [to create a case with a different case_type] as in [F-1018_CreateThirdCaseDifferentCaseTypePreRequisiteCaseworkerBase]
And a successful call [to get an event token for the case just created] as in [F-1018-GetUpdateEventToken]
And a successful call [to get an event token for the case just created] as in [S-1018.11-GetUpdateEventToken]
When a request is prepared with appropriate values
And the request [contains correctly configured CaseLink field as a collection]
And the request [specifying the case to be updated, as created in F-1018_CreateLinkedCasePreRequisiteCaseworkerBase, does not contain a CaseLink field]
Expand Down Expand Up @@ -314,7 +314,7 @@ Feature: F-1018: Submit Event Creation Handle Case Links
Given a user with [an active profile in CCD]
And a successful call [to create a case] as in [F-1018_CreateCasePreRequisiteCitizenBase]
And another successful call [to create a case] as in [F-1018_CreateAnotherCasePreRequisiteCitizenBase]
And a successful call [to get an update event token for the case just created as a Citizen] as in [F-1018-GetCitizenUpdateEventToken]
And a successful call [to get an update event token for the case just created as a Citizen] as in [S-1018.21-GetCitizenUpdateEventToken]
When a request is prepared with appropriate values
And the request [contains correctly configured CaseLink field with Case Reference created in F-1018_CreateCasePreRequisiteCitizenBase]
And the request [specifying the case to be updated, as created in F-1018_CreateAnotherCasePreRequisiteCaseworkerBase, does not contain a CaseLink field]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"description": ""
},
"security_classification": "PUBLIC",
"event_token" : "${[scenarioContext][childContexts][F-1018-GetUpdateEventToken][testData][actualResponse][body][token]}",
"event_token" : "${[scenarioContext][childContexts][S-1018.11-GetUpdateEventToken][testData][actualResponse][body][token]}",
"ignore_warning": true
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"description": ""
},
"security_classification": "PUBLIC",
"event_token" : "${[scenarioContext][childContexts][F-1018-GetCitizenUpdateEventToken][testData][actualResponse][body][token]}",
"event_token" : "${[scenarioContext][childContexts][S-1018.21-GetCitizenUpdateEventToken][testData][actualResponse][body][token]}",
"ignore_warning": true
}
},
Expand Down
Loading