Skip to content

Conversation

@stevesloka
Copy link
Contributor

@stevesloka stevesloka commented Dec 6, 2021

What type of PR is this?
/kind bug

Optionally add one or more of the following kinds if applicable:
/kind api-change

What this PR does / why we need it:

Update the HTTPRequestRedirectFilter.Hostname to use a Hostname type which validates the value cannot
contain wildcard characters. Updates all other references which used Hostname to use WildcardHostname
which does allow for wildcard characters.

Signed-off-by: Steve Sloka [email protected]

Which issue(s) this PR fixes:
Fixes #949

Does this PR introduce a user-facing change?:

Introduced PreciseHostname which prevents wildcard characters in relevant Hostname values. 

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Dec 6, 2021
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please sign in with your organization's credentials at https://identity.linuxfoundation.org/projects/cncf to be authorized.
  • If you have done the above and are still having issues with the CLA being reported as unsigned, please log a ticket with the Linux Foundation Helpdesk: https://support.linuxfoundation.org/
  • Should you encounter any issues with the Linux Foundation Helpdesk, send a message to the backup e-mail support address at: [email protected]

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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 6, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @stevesloka. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 6, 2021
@hbagdi
Copy link
Contributor

hbagdi commented Dec 6, 2021

Can we add a test case 'wildcard hostname on the redirect filter fails'? You can do so by adding it to hack/invalid-examples.

@hbagdi
Copy link
Contributor

hbagdi commented Dec 6, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-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 Dec 6, 2021
@robscott
Copy link
Member

robscott commented Dec 7, 2021

/check-cla
/lgtm
/hold for @jpeach to comment on thread

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Dec 7, 2021
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 7, 2021
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 7, 2021
@stevesloka
Copy link
Contributor Author

@hbagdi I added an invalid test case for the redirect hostname.

@youngnick
Copy link
Contributor

LGTM once the field name changes are done as discussed.

@robscott
Copy link
Member

@stevesloka I was about to release 0.4.1, but realized this change also probably belongs in that release. Agree with @youngnick that this PR LGTM once that final name change gets in.

@stevesloka
Copy link
Contributor Author

@robscott sorry for loosing track of this one, I've updated the PR with the PreciseHostname. Thanks!

…card value and precise value for hostnames.

Updates the HTTPRequestRedirectFilter.Hostname to use the new PreciseHostname type which validates the value cannot
contain wildcard characters.

Signed-off-by: Steve Sloka <[email protected]>
Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

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

Thanks!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 4, 2022
Signed-off-by: Steve Sloka <[email protected]>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 4, 2022
@robscott
Copy link
Member

robscott commented Jan 4, 2022

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 4, 2022
Copy link
Contributor

@jpeach jpeach left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jpeach, robscott, stevesloka

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

@robscott
Copy link
Member

robscott commented Jan 7, 2022

Woops, we missed the hold on this.

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 7, 2022
@k8s-ci-robot k8s-ci-robot merged commit 9ff755c into kubernetes-sigs:master Jan 7, 2022
k8s-ci-robot added a commit that referenced this pull request Jan 11, 2022
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTPRequestRedirectFilter allows for wildcard hostnames

6 participants