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

Ext auth service : add http/https protocol #786

Merged

Conversation

norbjd
Copy link
Contributor

@norbjd norbjd commented Mar 6, 2022

Changes

🎁 Add http/https protocol for ext auth service

/kind enhancement

Fixes #754

Release Note

An http/https service can now be used as ext auth service

Docs

No docs.

@knative-prow-robot
Copy link

Hi @norbjd. Thanks for your PR.

I'm waiting for a knative-sandbox member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot knative-prow-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 6, 2022
@codecov
Copy link

codecov bot commented Mar 6, 2022

Codecov Report

Merging #786 (c59e34d) into main (a7937d6) will increase coverage by 9.33%.
The diff coverage is 90.00%.

@@            Coverage Diff             @@
##             main     #786      +/-   ##
==========================================
+ Coverage   73.16%   82.49%   +9.33%     
==========================================
  Files          18       18              
  Lines         749      777      +28     
==========================================
+ Hits          548      641      +93     
+ Misses        165       99      -66     
- Partials       36       37       +1     
Impacted Files Coverage Δ
pkg/config/ext_authz.go 83.33% <90.00%> (+81.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7937d6...c59e34d. Read the comment docs.

@norbjd
Copy link
Contributor Author

norbjd commented Mar 6, 2022

Hello 👋

If this feature is ok to add to Kourier, I will of course write tests to increase code coverage (or at least, to not decrease it 😁).

@nak3
Copy link
Contributor

nak3 commented Mar 7, 2022

/ok-to-test

Thank you so much @norbjd
Let's try to add this fix into v1.4 release as v.1.3 will be released tomorrow (8/Mar).

@knative-prow-robot knative-prow-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 7, 2022
Copy link
Contributor

@nak3 nak3 left a comment

Choose a reason for hiding this comment

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

Some refactoring comments but LGM overall. We would like to have tests as @norbjd already mentioned 👍

pkg/config/ext_authz.go Outdated Show resolved Hide resolved
pkg/config/ext_authz.go Outdated Show resolved Hide resolved
pkg/config/ext_authz.go Outdated Show resolved Hide resolved
@knative-prow-robot knative-prow-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 12, 2022
@norbjd
Copy link
Contributor Author

norbjd commented Mar 12, 2022

Hello @nak3 ! Thanks for your review.

I have refactored the code according to your comments, and also added some unit tests and e2e tests.

Also, I don't know if I should test https protocol, since it's the same as http.

Copy link
Contributor

@nak3 nak3 left a comment

Choose a reason for hiding this comment

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

Thank you so much @norbjd ! LGTM, I just left some comments for the style again.

pkg/config/ext_authz_test.go Outdated Show resolved Hide resolved
pkg/config/ext_authz_test.go Outdated Show resolved Hide resolved
pkg/config/ext_authz_test.go Outdated Show resolved Hide resolved
pkg/config/ext_authz_test.go Outdated Show resolved Hide resolved
pkg/config/ext_authz_test.go Outdated Show resolved Hide resolved
pkg/config/ext_authz_test.go Outdated Show resolved Hide resolved
pkg/config/ext_authz_test.go Outdated Show resolved Hide resolved
@nak3
Copy link
Contributor

nak3 commented Mar 14, 2022

Also, I don't know if I should test https protocol, since it's the same as http.

I think current test cases without https are fine. Thank you!

@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-sandbox-net-kourier-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/config/ext_authz.go 9.5% 55.9% 46.4

@nak3
Copy link
Contributor

nak3 commented Mar 16, 2022

/lgtm
/approve

Thank you @norbjd !

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 16, 2022
@knative-prow-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nak3, norbjd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 16, 2022
@knative-prow-robot knative-prow-robot merged commit 41a9fdc into knative-extensions:main Mar 16, 2022
@norbjd norbjd deleted the feat/ext-authz-http branch March 16, 2022 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/enhancement lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP Endpoint for KOURIER_EXTAUTHZ_HOST
4 participants