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

fix(sync): search for certificates in sync certDir #2558

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eusebiu-constantin-petu-dbk
Copy link
Collaborator

instead of expecting certain filenames

What type of PR is this?

Which issue does this PR fix:

What does this PR do / Why do we need it:

If an issue # is not available please add repro steps and logs showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

instead of expecting certain filenames

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
Copy link

codecov bot commented Jul 22, 2024

Codecov Report

Attention: Patch coverage is 58.97436% with 16 lines in your changes missing coverage. Please review.

Project coverage is 92.66%. Comparing base (26be383) to head (9316f99).

Files Patch % Lines
pkg/extensions/sync/httpclient/client.go 58.97% 13 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2558      +/-   ##
==========================================
- Coverage   92.72%   92.66%   -0.06%     
==========================================
  Files         169      169              
  Lines       22467    22502      +35     
==========================================
+ Hits        20832    20851      +19     
- Misses       1018     1031      +13     
- Partials      617      620       +3     

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

Copy link
Contributor

@andaaron andaaron left a comment

Choose a reason for hiding this comment

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

I am a little sceptical about guessing file purpose by extension, but otherwise looks good.

Why is this better than documenting the required file names?

@rchincha
Copy link
Contributor

rchincha commented Aug 6, 2024

cert filenames should be relative to the cert dir and the user can specify them in the config explicitly, else fallback to defaults (current behavior)

And instead of looking at the extension, maybe we first assume PEM format, try and load and if that fails try DER format, if that fails, then return error.

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.

3 participants