Skip to content

Comments

feature/issue-124/Simplify-security-certificate-integration#138

Merged
yi23484 merged 8 commits intodevfrom
optimisation/issue-124/simplify-security-certificate-integration
Jan 28, 2025
Merged

feature/issue-124/Simplify-security-certificate-integration#138
yi23484 merged 8 commits intodevfrom
optimisation/issue-124/simplify-security-certificate-integration

Conversation

@yi23484
Copy link
Contributor

@yi23484 yi23484 commented Jan 22, 2025

Issue(s):

#124

Type of change: (choose required ones)

  • New feature
  • Refactor/Optimization

Description:

check if keystore.p12 file exists in /src/main/resources/ . If not - refuse to start the Spring Boot server and ask user to add the file and try again.

…not - refuse to start the Spring Boot server and ask user to add the file and try again.
@yi23484 yi23484 added the Backend Issue relates to backend code. label Jan 22, 2025
@yi23484 yi23484 self-assigned this Jan 22, 2025
@yi23484 yi23484 changed the title feat: check if keystore.p12 file exists in /src/main/resources/ . If… feature/issue-124/Simplify-security-certificate-integration Jan 22, 2025
…oot, issue is now fixed and project should build correctly
Copy link
Contributor

@vladislav-k1 vladislav-k1 left a comment

Choose a reason for hiding this comment

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

If keystore.p12 file isn't present, the backend fails to start up. We should implement some sort of protection against this. Maybe even an option to start up without HTTPS (eg. for execution on localhost). Logs:

2025-01-24T12:19:46.375Z  INFO 476552 --- [AILearningTool] [           main] c.U.A.AiLearningToolApplication          : No active profile set, falling back to 1 default profile: "default"
2025-01-24T12:19:47.445Z  WARN 476552 --- [AILearningTool] [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server
2025-01-24T12:19:47.453Z  INFO 476552 --- [AILearningTool] [           main] .s.b.a.l.ConditionEvaluationReportLogger : 

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2025-01-24T12:19:47.467Z ERROR 476552 --- [AILearningTool] [           main] o.s.boot.SpringApplication               : Application run failed```

…tps if keystore.p12 does not exist in src/main/resources/keystore.p12
…ncorrectly looked for a different keystore.p12 which was causing backend to launch without SSL, even when keystore.p12 is present
@yi23484
Copy link
Contributor Author

yi23484 commented Jan 24, 2025

I changed it so that the backend launches with SSL disabled if launched without keystore.p12.

@yi23484 yi23484 requested a review from vladislav-k1 January 24, 2025 20:27
vladislav-k1
vladislav-k1 previously approved these changes Jan 26, 2025
Copy link
Contributor

@vladislav-k1 vladislav-k1 left a comment

Choose a reason for hiding this comment

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

Looks good

Copy link
Collaborator

@GerardChabaBristol GerardChabaBristol left a comment

Choose a reason for hiding this comment

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

All good.

@vladislav-k1 vladislav-k1 dismissed stale reviews from GerardChabaBristol and themself via 0ac0eff January 26, 2025 14:16
Copy link
Contributor

@vladislav-k1 vladislav-k1 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@GerardChabaBristol GerardChabaBristol left a comment

Choose a reason for hiding this comment

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

Looks fixed

@yi23484 yi23484 merged commit 1a97d47 into dev Jan 28, 2025
1 check passed
@yi23484 yi23484 deleted the optimisation/issue-124/simplify-security-certificate-integration branch February 19, 2025 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend Issue relates to backend code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify security certificate integration

3 participants