Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
9e292bd
Add migration script for CCD-4769 LogStash Queue
muhammad-umerji01 Jan 30, 2024
c40a1f5
Merge branch 'master' into CCD-4769-Create-Index-Table
muhammad-umerji01 Feb 19, 2024
bdf1d98
Merge branch 'master' into CCD-4769-Create-Index-Table
patelila Jun 17, 2024
4329cc5
Ccd 4775 modify db trigger insert update (#2436)
patelila Jun 18, 2024
097957d
change validateToken http code to 403
aktaskaan Jun 5, 2024
2253dd8
fix event token claim validation
aktaskaan Jun 10, 2024
d7c498d
Removed CCD-4790 Drop marked_by_logstash field in the case_data table…
patelila Jun 19, 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
1c7618b
Updates to migration script.
patelila Jun 24, 2024
f7abba6
Merge branch 'master' into CCD-4769-Create-Index-Table
patelila Jun 25, 2024
e2ce7a0
Only insert if case_data_id does not exist in case_data_logstash_queu…
patelila Jun 25, 2024
1007a22
Merge remote-tracking branch 'origin/CCD-4769-Create-Index-Table' int…
patelila Jun 25, 2024
0400145
Changes so data is written to new table to be picked up for ES indexing
patelila Jun 28, 2024
0fe9a91
Merge branch 'master' into CCD-4769-Create-Index-Table
patelila Jul 1, 2024
55fb8aa
Fix for ERROR: cannot truncate a table referenced in a foreign key c…
patelila Jul 1, 2024
f3b7332
Fix for ERROR: testSaveFailsIfCaseIdDoesNotExist()testSaveFailsIfCase…
patelila Jul 4, 2024
b1a7393
Temporary Disable Test for testSaveFailsIfCaseIdDoesNotExist()testSa…
patelila Jul 4, 2024
4abf194
Merge branch 'master' into CCD-4769-Create-Index-Table
patelila Jul 4, 2024
ae47776
empty commit to trigger build
dinesh1patel Jul 5, 2024
1ff1b8a
reverted change as was seeing if it made a difference in test failing.
patelila Jul 5, 2024
0f6834a
Merge remote-tracking branch 'origin/CCD-4262-4769-Create-Index-Table…
patelila Jul 5, 2024
47886b9
To try to fix com.zaxxer.hikari.pool.HikariPool$PoolInitializationExc…
patelila Jul 5, 2024
8a6dcbe
To try to fix com.zaxxer.hikari.pool.HikariPool$PoolInitializationExc…
patelila Jul 5, 2024
c315c47
Ccd 4262 4769 unit test failure fix (#2451)
patelila Jul 10, 2024
32fd9c6
Merge branch 'master' into CCD-4262-4769-Create-Index-Table
patelila Jul 16, 2024
fb56469
Merge branch 'master' into CCD-4262-4769-Create-Index-Table
RebeccaBaker Nov 7, 2024
0e854da
fixed checkstyle
RebeccaBaker Nov 7, 2024
5e64d30
checkstyle
RebeccaBaker Nov 7, 2024
1c28221
Update AbstractBaseIntegrationTest.java
RebeccaBaker Nov 7, 2024
71ae5d1
Update V20240617_4775__CCD-4775_modify_db_trigger_for_IU.sql
RebeccaBaker Nov 12, 2024
0b1969c
Merge branch 'master' into CCD-4262-4769-Create-Index-Table
RebeccaBaker Nov 12, 2024
a32aa38
Update V20240617_4775__CCD-4775_modify_db_trigger_for_IU.sql
RebeccaBaker Nov 12, 2024
63c1019
empty commit to trigger build
patelila Nov 14, 2024
6821b2c
fix foreign key constraint error
patelila Nov 14, 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
7dbb397
Merge branch 'refs/heads/master' into CCD-4262-4769-Create-Index-Table
aktaskaan Jul 29, 2025
172b466
update the helm preview template with the logstash changes
aktaskaan Jul 29, 2025
0f57cd8
update the helm preview template with the logstash changes
aktaskaan Jul 29, 2025
6326686
Merge branch 'master' into CCD-4262-4769-Create-Index-Table
patelila Aug 4, 2025
03110d8
Update values.preview.template.yaml
aktaskaan Aug 5, 2025
57f08fa
Merge branch 'master' into CCD-4262-4769-Create-Index-Table
patelila Aug 6, 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
c2d1b9d
Merge branch 'master' into combined_ccd_6395_ccd_4311
patelila Jul 1, 2026
1cec8bb
Update Jenkinsfile_CNP
patelila Jul 1, 2026
ccf6506
Merge branch 'master' into CCD-4262-4769-Create-Index-Table
patelila Jul 1, 2026
019199d
Update CaseDetailsEndpointIT.java
patelila Jul 1, 2026
3fdf48f
Update CaseDetailsEndpointIT.java
patelila Jul 1, 2026
583963b
Merge branch 'master' into combined_ccd_6395_ccd_4311
patelila Jul 2, 2026
621b3b4
Merge branch 'master' into CCD-4262-4769-Create-Index-Table
patelila Jul 2, 2026
db46f58
Fix case pointer test fixtures for logstash marker constraint
patelila Jul 2, 2026
b9e55ef
CCD-6936 Align case pointer Logstash handling with queue flow Drop th…
patelila Jul 2, 2026
6ef1900
CCD-6936 Use Logstash queue id for ES external versioning Use the cas…
patelila Jul 3, 2026
8faaf62
Revert "CCD-6936 Use Logstash queue id for ES external versioning Use…
patelila Jul 3, 2026
eef651b
CCD-6936 Remove external ES versioning from preview Logstash
patelila Jul 3, 2026
40dba31
Update AAT fixtures for callback_error_message field
patelila Jul 3, 2026
52d50b5
Merge remote-tracking branch 'origin/combined_ccd_6395_ccd_4311' into…
patelila Jul 3, 2026
e67701d
CCD-6024 Restore Logstash external versioning.
patelila Jul 6, 2026
25f5d21
Merge branch 'master' into CCD-7841_4262-4769_ccd_6395_ccd_4311
patelila Jul 8, 2026
5317d74
Merge branch 'master' into CCD-7841_4262-4769_ccd_6395_ccd_4311
patelila Jul 9, 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 @@ -114,6 +114,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 hmctsprod ACR
env.TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX = "hmctsprod.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
7 changes: 6 additions & 1 deletion charts/ccd-data-store-api/values.preview.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ logstash:
jdbc_driver_library => "/usr/share/logstash/ccd/postgresql.jar"
jdbc_driver_class => "org.postgresql.Driver"
jdbc_default_timezone => "UTC"
statement => "UPDATE case_data SET marked_by_logstash = true WHERE marked_by_logstash = false RETURNING id, created_date, last_modified, jurisdiction, case_type_id, state, last_state_modified_date, data::TEXT as json_data, data_classification::TEXT as json_data_classification, reference, security_classification, supplementary_data::TEXT as json_supplementary_data"
statement => "DELETE FROM case_data_logstash_queue USING case_data WHERE case_data_logstash_queue.case_data_id = case_data.id RETURNING case_data.id, created_date, last_modified, jurisdiction, case_type_id, state, last_state_modified_date, data::TEXT as json_data, data_classification::TEXT as json_data_classification, reference, security_classification, supplementary_data::TEXT as json_supplementary_data, version"
clean_run => false
schedule => "* * * * * *"
}
Expand Down Expand Up @@ -335,5 +335,10 @@ logstash:
document_type => "_doc"
document_id => "%{id}"
timeout => 60
# External versioning configuration
version => "%{version}"
version_type => "external"
# Handle version conflicts gracefully
retry_on_conflict => 0
}
}
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,63 @@
{
"_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,
"callback_error_message": 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,34 @@
{
"_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,
"callback_error_message": 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,63 @@
{
"_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,
"callback_error_message": 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
Loading