Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EIP1-11113-EIP1-11114 combined for review #124

Open
wants to merge 15 commits into
base: EIP1-11113-proxy-main
Choose a base branch
from

Conversation

SimPaySW
Copy link
Contributor

@SimPaySW SimPaySW commented Feb 4, 2025

Combination of four PRs to make reviewing easier.
image

Target is set as a proxy main branch so that further PRs can be reviewed against this without requiring a merge to the main branch.

… API project that has merged db migrations already in it; resolve issues arising from address entity field differences between APIs
…h sts:AssumeRole owing to 13-digit test account id causing integer overflow
…web that have been fixed in the current spring/SB version we are using

EIP1-11113: upgrade spring boot to 3.3.8 in line with applications api; delete defunct owasp suppressions
gradlew Outdated
then
die "xargs is not available"
fi
# if ! command -v xargs >/dev/null 2>&1

Choose a reason for hiding this comment

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

Any reason for commenting this out and not deleting it if it's not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have restored this scripting in the next commit

@@ -1,243 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">

Choose a reason for hiding this comment

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

Are there no vulnribilties for this version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All the suppressions that were listed in this file have now been resolved by upgrading SB to 3.3.8. I haven't run a CVE detection tool though. I could do that, trivy or suchlike.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've scanned the EMS projct with trivy and it didn't flag up any vulnerabilities.
brew install trivy
trivy -d fs --scanners vuln,secret /~/dev/eip-ero-ems-integration-api


/**
* Spring Boot application bootstrapping class.
*/
@SpringBootApplication
@ConfigurationPropertiesScan
@EnableJpaAuditing

Choose a reason for hiding this comment

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

This should stay as EmsIntegrationApiApplication as this is for the whole service and not Register Checker specific

Copy link
Contributor Author

Choose a reason for hiding this comment

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

change applied in next commit

@@ -23,7 +24,7 @@ class CachingConfiguration {
return CaffeineCacheManager()
.apply {
setCaffeine(Caffeine.newBuilder().expireAfterWrite(timeToLive))
setCacheNames(listOf(ERO_CERTIFICATE_MAPPING_CACHE, ERO_GSS_CODE_BY_ERO_ID_CACHE))
setCacheNames(listOf(IER_ELECTORAL_REGISTRATION_OFFICES_CACHE))
}

Choose a reason for hiding this comment

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

Do we not still need the ERO_CERTIFICATE_MAPPING_CACHE and ERO_GSS_CODE_BY_ERO_ID_CACHE cache's?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

restored these cache names to the list on next commit

* Class to bind configuration properties for the email client
*/
@ConfigurationProperties(prefix = "email.client")
@ConstructorBinding

Choose a reason for hiding this comment

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

Why did we get rid of the @ConstructorBinding?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See @ConstructingBinding No Longer Needed at the Type Level" for the reason why this has been removed.

@@ -72,8 +72,6 @@ class ProxyVoteApplication(
)
var welshRejectedReasonItems: Set<RejectedReasonItem>? = mutableSetOf(),

var isFromApplicationsApi: Boolean?,

Choose a reason for hiding this comment

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

Why don't we need this anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was needed by the applications api for interaction with the portal to identify applications that are on the OS code but the ems api doesn't have that role, it is a background api.

@@ -39,7 +39,7 @@ class PendingDownloadsMonitoringService(
logPendingDownloads("proxy", pendingProxyDownloads)

if (sendEmail) {
emailService.sendPendingDownloadMonitoringEmail(
emailService .sendPendingDownloadMonitoringEmail(

Choose a reason for hiding this comment

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

space?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in next commit

@tomsdjohnson
Copy link

@SimPaySW Seems like alot of tests have been deleted with out being replaced was this intentinal?

@SimPaySW
Copy link
Contributor Author

SimPaySW commented Feb 6, 2025

@SimPaySW Seems like alot of tests have been deleted with out being replaced was this intentinal?

Hi @tomsdjohnson yes, see PR #120 (a bit of a deja vu from your previous questions)

…figurations to CachingConfiguration; rename application to EmsIntegrationApiApplication; remove space char
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants