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

Secrets endpoints and encryption #52

Merged
merged 23 commits into from
Feb 23, 2024
Merged

Secrets endpoints and encryption #52

merged 23 commits into from
Feb 23, 2024

Conversation

dukris
Copy link
Collaborator

@dukris dukris commented Feb 21, 2024

closes #51
closes #50


PR-Codex overview

This PR focuses on adding encryption functionality using Jasypt, updating SQL queries, and improving exception handling in GitHub platform tests.

Detailed summary

  • Added Jasypt encryption for secrets
  • Updated SQL queries for better security
  • Improved exception handling in GitHub platform tests

The following files were skipped due to too many changes: src/main/java/git/tracehub/pmo/secret/Keys.java, src/main/java/git/tracehub/pmo/secret/Key.java, src/test/java/it/database/DefaultSecretsIT.java, src/main/java/git/tracehub/pmo/secret/KeyOf.java, README.md, src/main/java/git/tracehub/pmo/secret/DefaultSecrets.java, src/test/java/git/tracehub/pmo/controller/TicketControllerTest.java, src/main/java/git/tracehub/pmo/secret/DefaultKeys.java, src/test/java/git/tracehub/pmo/controller/ProjectControllerTest.java, src/main/java/git/tracehub/pmo/secret/UniqueSecrets.java, src/main/java/git/tracehub/pmo/controller/SecretController.java, src/test/java/git/tracehub/pmo/secret/KeyOfTest.java, src/main/java/git/tracehub/pmo/secret/EncryptedSecrets.java, src/test/java/git/tracehub/pmo/extensions/MkArgumentException.java, src/test/java/it/database/DefaultKeysIT.java, src/test/java/it/web/RetrieveSecretsByProjectITCase.java, src/test/java/git/tracehub/pmo/secret/DefaultSecretsTest.java, src/test/java/git/tracehub/pmo/controller/AdviceControllerTest.java, src/test/java/git/tracehub/pmo/controller/SecretControllerTest.java, src/test/java/git/tracehub/pmo/secret/UniqueSecretsTest.java, src/test/java/git/tracehub/pmo/secret/EncryptedSecretsTest.java, src/test/java/git/tracehub/pmo/secret/DefaultKeysTest.java, src/test/java/it/web/UpdateSecretITCase.java

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

codecov bot commented Feb 21, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 85.28%. Comparing base (786aafb) to head (5fb0db3).

❗ Current head 5fb0db3 differs from pull request most recent head 4878aa1. Consider uploading reports for the commit 4878aa1 to get more accurate results

Files Patch % Lines
...java/git/tracehub/pmo/secret/EncryptedSecrets.java 68.00% 8 Missing ⚠️
...main/java/git/tracehub/pmo/security/WebConfig.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master      #52      +/-   ##
============================================
+ Coverage     82.00%   85.28%   +3.28%     
- Complexity      134      156      +22     
============================================
  Files            44       46       +2     
  Lines           439      503      +64     
  Branches          8       10       +2     
============================================
+ Hits            360      429      +69     
+ Misses           74       69       -5     
  Partials          5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@h1alexbel h1alexbel left a comment

Choose a reason for hiding this comment

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

@hizmailovich take a look, please

src/main/java/git/tracehub/pmo/secret/KeyOf.java Outdated Show resolved Hide resolved
src/main/resources/application.yaml Show resolved Hide resolved
src/test/resources/pre/sql/projects.sql Show resolved Hide resolved
Copy link
Collaborator

@h1alexbel h1alexbel left a comment

Choose a reason for hiding this comment

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

@hizmailovich take a look, please

@@ -31,6 +31,7 @@ VALUES ('04986038-6e38-4928-b12e-644c99f9cadc',
'OPENED')
ON CONFLICT (id) DO NOTHING;

-- value encrypted using algorithm PBEWithHMACSHA512AndAES_256
Copy link
Collaborator

Choose a reason for hiding this comment

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

to document I mean to add useful information to our README.md

@h1alexbel
Copy link
Collaborator

@hizmailovich please update your token

@h1alexbel
Copy link
Collaborator

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Feb 23, 2024

@rultor merge

@h1alexbel Thanks for your request; @hizmailovich please confirm this.

@dukris
Copy link
Collaborator Author

dukris commented Feb 23, 2024

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Feb 23, 2024

@rultor merge

@hizmailovich OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 4878aa1 into master Feb 23, 2024
6 checks passed
@h1alexbel h1alexbel deleted the 49 branch February 23, 2024 15:52
@rultor
Copy link
Collaborator

rultor commented Feb 23, 2024

@rultor merge

@hizmailovich Done! FYI, the full log is here (took me 3min)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants