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

feat: handle certificates:snis relation for Konnect #978

Merged
merged 2 commits into from
Jul 19, 2023

Conversation

czeslavo
Copy link
Contributor

@czeslavo czeslavo commented Jul 19, 2023

As Konnect does not support the API sugar that allows specifying SNIs on PUT /certificates, we should not fill them when an update of a certificate is performed.

It's still required for regular Kong Gateways as they would treat empty SNIs in a certificate as a signal to remove any existing SNIs associated with a certificate.

@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2023

Codecov Report

Patch coverage: 0.79% and project coverage change: -0.27 ⚠️

Comparison is base (d19b622) 33.97% compared to head (03de312) 33.70%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #978      +/-   ##
==========================================
- Coverage   33.97%   33.70%   -0.27%     
==========================================
  Files         100      100              
  Lines       11906    12000      +94     
==========================================
  Hits         4045     4045              
- Misses       7468     7562      +94     
  Partials      393      393              
Impacted Files Coverage Δ
cmd/common.go 4.29% <0.00%> (-0.81%) ⬇️
cmd/common_konnect.go 6.71% <0.00%> (ø)
cmd/convert.go 0.00% <0.00%> (ø)
cmd/diff.go 0.00% <0.00%> (ø)
cmd/reset.go 0.00% <0.00%> (ø)
cmd/root.go 0.92% <0.00%> (+<0.01%) ⬆️
cmd/sync.go 0.00% <0.00%> (ø)
cmd/validate.go 0.00% <0.00%> (ø)
cprint/color.go 82.85% <0.00%> (-7.77%) ⬇️
diff/diff.go 0.00% <0.00%> (ø)
... and 2 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@czeslavo czeslavo changed the title reproduce a bug with update error on certificate update when snis are specified feat: handle certificates:snis relation for Konnect Jul 19, 2023
@GGabriele GGabriele force-pushed the update-certificate-with-snis branch 2 times, most recently from 659d894 to 03de312 Compare July 19, 2023 12:51
@GGabriele GGabriele force-pushed the update-certificate-with-snis branch from 03de312 to 26a4f49 Compare July 19, 2023 12:56
@GGabriele GGabriele marked this pull request as ready for review July 19, 2023 12:56
@GGabriele GGabriele requested a review from a team as a code owner July 19, 2023 12:56
@GGabriele GGabriele added this to the 1.24.0 milestone Jul 19, 2023
@czeslavo
Copy link
Contributor Author

@GGabriele Thanks for the actual fix! What would you say about such change? I think the only fix needed is to skip the "special" case that backfills SNIs in createUpdateCertificate method when we're running against Konnect.

@GGabriele GGabriele merged commit ab90fbb into main Jul 19, 2023
35 checks passed
@GGabriele GGabriele deleted the update-certificate-with-snis branch July 19, 2023 15:40
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.

None yet

4 participants