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

chore: Do stricter validation of X.509 gossip cert in DAB transactions #16666

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

tinker-michaelj
Copy link
Collaborator

Description:

  • Closes Add more validation to Node's gossipCaCertificate #16645
  • Instead of relying on the permissive CertificateFactory.getInstance("X.509") accepting the client's gossip X509 cert bytes, change AddressBookValidator to serialize the given bytes as a PEM X509 certificate; and validate an X509 cert can be parsed from the resulting PEM.

Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
jsync-swirlds
jsync-swirlds previously approved these changes Nov 19, 2024
Copy link
Member

@Neeharika-Sompalli Neeharika-Sompalli left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @tinker-michaelj

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.35%. Comparing base (4a9dfb7) to head (aa0b34e).
Report is 2 commits behind head on release/0.56.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##             release/0.56   #16666   +/-   ##
===============================================
  Coverage           58.35%   58.35%           
- Complexity          20000    20002    +2     
===============================================
  Files                2738     2738           
  Lines              100489   100491    +2     
  Branches            10378    10378           
===============================================
+ Hits                58643    58645    +2     
  Misses              38214    38214           
  Partials             3632     3632           
Files with missing lines Coverage Δ
...ressbook/impl/validators/AddressBookValidator.java 91.80% <100.00%> (+0.42%) ⬆️
...ode/app/service/addressbook/AddressBookHelper.java 93.93% <100.00%> (-0.18%) ⬇️

Impacted file tree graph

---- 🚨 Try these New Features:

Copy link

codacy-production bot commented Nov 19, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (4a9dfb7) 100306 62138 61.95%
Head commit (aa0b34e) 100308 (+2) 62140 (+2) 61.95% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#16666) 18 18 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Copy link
Contributor

@netopyr netopyr left a comment

Choose a reason for hiding this comment

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

LGTM - thanks @tinker-michaelj

@netopyr netopyr merged commit 81b7849 into release/0.56 Nov 19, 2024
48 checks passed
@netopyr netopyr deleted the 16645-cert-hash-validations branch November 19, 2024 21:33
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.

5 participants