Skip to content

Cn 40 case api initial version#1

Open
onsabdulkalam wants to merge 15 commits into
mainfrom
CN-40-case-api-initial-version
Open

Cn 40 case api initial version#1
onsabdulkalam wants to merge 15 commits into
mainfrom
CN-40-case-api-initial-version

Conversation

@onsabdulkalam

Copy link
Copy Markdown

No description provided.

@gitguardian

gitguardian Bot commented Jun 11, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
9566081 Assigned Generic Password 22cb6be src/test/resources/docker-compose.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@onsabdulkalam onsabdulkalam added the enhancement New feature or request label Jun 12, 2026
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Warnings Elapsed time
⚠️ BASH shfmt 1 1 0 0.01s
⚠️ MARKDOWN markdownlint 2 15 0 0.53s
✅ MARKDOWN markdown-table-formatter 2 0 0 0.26s
⚠️ YAML prettier 5 1 6 0.52s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

Comment thread .github/CODEOWNERS Outdated
@onsabdulkalam onsabdulkalam added feature and removed enhancement New feature or request labels Jun 12, 2026
Comment thread pom.xml Outdated
Comment thread Makefile Outdated
Comment thread Makefile Outdated
Comment thread pom.xml
Comment thread pom.xml Outdated
Comment thread pom.xml Outdated
Comment thread pom.xml Outdated
Comment thread pom.xml Outdated
Comment thread src/main/java/uk/gov/ons/census/caseapisvc/model/dto/CaseContainerDTO.java Outdated
Comment thread src/main/java/uk/gov/ons/census/caseapisvc/model/dto/CaseDetailsDTO.java Outdated
Comment thread src/main/java/uk/gov/ons/census/caseapisvc/model/dto/CaseDetailsDTO.java Outdated
Comment thread src/main/java/uk/gov/ons/census/caseapisvc/endpoint/QidEndpoint.java Outdated
Comment thread src/main/java/uk/gov/ons/census/caseapisvc/endpoint/CaseEndpoint.java Outdated
Comment thread src/main/java/uk/gov/ons/census/caseapisvc/service/UacQidService.java Outdated
Comment thread .github/dependabot.yml Outdated
Comment thread src/main/java/uk/gov/ons/census/caseapisvc/config/AppConfig.java Outdated
Comment thread src/main/java/uk/gov/ons/census/caseapisvc/model/dto/CaseDetailsDTO.java Outdated
Comment thread src/main/java/uk/gov/ons/census/caseapisvc/endpoint/CaseEndpoint.java Outdated
Comment thread src/main/java/uk/gov/ons/census/caseapisvc/endpoint/CaseEndpoint.java Outdated
Comment thread src/main/java/uk/gov/ons/census/caseapisvc/endpoint/CaseEndpoint.java Outdated
Comment thread src/main/java/uk/gov/ons/census/caseapisvc/model/dto/CaseContainerDTO.java Outdated
Comment thread src/test/java/uk/gov/ons/census/caseapisvc/endpoint/CaseEndpointIT.java Outdated
Comment thread src/test/java/uk/gov/ons/census/caseapisvc/endpoint/CaseEndpointIT.java Outdated
Comment thread src/test/java/uk/gov/ons/census/caseapisvc/endpoint/CaseEndpointUnitTest.java Outdated
Comment thread README.md Outdated

@AdamHawtin AdamHawtin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments around sending messages which need some more discussion.

Comment thread src/main/resources/application.yml Outdated


queueconfig:
questionnaire-linked-event-routing-key: event.questionnaire.update No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think rather than a routing key for these events we'll need a new topic. We're not currently using routing keys for different event types, we're just using a different topic for each event. A new topic will need to be set up in docker dev for this too, otherwise the case processor will error when it tries to send.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified the logic to use the PubSub for now. with put endpoint response NOT_IMPLEMENTED Status

Comment on lines +17 to +24
public void sendMessage(String destinationTopic, Object message) {
MessageToSend messageToSend = new MessageToSend();
messageToSend.setId(UUID.randomUUID());
messageToSend.setDestinationTopic(destinationTopic);
messageToSend.setMessageBody(JsonHelper.convertObjectToJson(message));

messageToSendRepository.save(messageToSend);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be something to have a discussion about, this way of sending messages requires the case processor to pick up the messages from the database and the send them to itself via PubSub, which may create more of a delay in the eventual processing than we want. The reason we have this pattern is to ensure we have a way to send messages fully transactionally (which the PubSub API doesn't support) which we need when sending messages during the processing of other messages to ensure we have fully transactional behaviour when acknowledging messages, I think in the context of an API call it should be safe to send directly via PubSub instead.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified the logic to use the PubSub for now. with put endpoint response NOT_IMPLEMENTED Status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants