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

webhook secret is not checked when k8s secret is not created #2775

Closed
1 task done
0xavi0 opened this issue Aug 26, 2024 · 2 comments
Closed
1 task done

webhook secret is not checked when k8s secret is not created #2775

0xavi0 opened this issue Aug 26, 2024 · 2 comments
Assignees
Labels

Comments

@0xavi0
Copy link
Contributor

0xavi0 commented Aug 26, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When configuring a webhook with a secret it is not checked when the k8s secret is not created in the cluster.
When the user creates the secret in the cluster the next time the webhook is called it DOES check for the secret.

This is because in the code it is creating the webhook checker with secret based on secret events.

As the secret is not created and does not exist, there is no event and the webhook checker is created without any secret at all.

Expected Behavior

Secret should be checked (when it is configured in the webhook) no matter if the cluster secret is created after/before or not created at all.

Steps To Reproduce

  • Configure a webhook with a secret in Github.
  • Trigger the webhook.
  • Fleet will accept the payload without checking the secret at all.
@rancherbot rancherbot added this to Fleet Aug 26, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Fleet Aug 26, 2024
@0xavi0 0xavi0 self-assigned this Aug 26, 2024
@0xavi0 0xavi0 modified the milestone: v2.9-Next2 Aug 26, 2024
@rancher rancher deleted a comment Aug 26, 2024
@0xavi0
Copy link
Contributor Author

0xavi0 commented Aug 26, 2024

Waiting on #2776 to be defined.

@weyfonk weyfonk changed the title webhook secret is not checked when k8s secret is not creataed webhook secret is not checked when k8s secret is not created Aug 27, 2024
@manno
Copy link
Member

manno commented Aug 27, 2024

should be fixed by #2776

@manno manno closed this as not planned Won't fix, can't repro, duplicate, stale Aug 27, 2024
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Fleet Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

2 participants