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

[Bug]: Bad ApiKey policy causing crashloopback. #7082

Open
benshalev849 opened this issue Jan 8, 2025 · 4 comments
Open

[Bug]: Bad ApiKey policy causing crashloopback. #7082

benshalev849 opened this issue Jan 8, 2025 · 4 comments
Labels
bug An issue reporting a potential bug needs triage An issue that needs to be triaged

Comments

@benshalev849
Copy link

Version

3.7.0

What Kubernetes platforms are you running on?

Openshift

Steps to reproduce

We have been experimenting with the apiKey policy, when creating it wrong it causes an exception on the Nginx code and it to infinetly crash loop back.
The only fix to this is to completely delete the bad api key policy and roll out the pods, this is a major flaw and bug that can cause entire systems to go down.
This happens when the policy is defined wrong in a namespace that the nginx watches.

Steps to reproduce:

  1. Create an Nginx IC and make it watch your wanted namespace
  2. Create the following yaml:
apiVersion: k8s.nginx.org/v1
kind: Policy
metadata:
  name: test-crash
  namespace: <connected_namespace>
spec:
  apiKey:
    clientSecret: <some name does not matter>

Since there is no Supplied in (Which is not required in order to create the policy) this will cause the nginx to entirely crash and stop working causing downtime to all apps connected and a crashloopbackoff to those pods.

@benshalev849 benshalev849 added bug An issue reporting a potential bug needs triage An issue that needs to be triaged labels Jan 8, 2025
Copy link

github-actions bot commented Jan 8, 2025

Hi @benshalev849 thanks for reporting!

Be sure to check out the docs and the Contributing Guidelines while you wait for a human to take a look at this 🙂

Cheers!

@benshalev849 benshalev849 changed the title [Bug]: Bad ApiKey policy causing crashloopback and nginx pods to not work. [Bug]: Bad ApiKey policy causing crashloopback. Jan 8, 2025
@jjngx
Copy link
Contributor

jjngx commented Jan 8, 2025

@benshalev849 the issue is fixed in NIC v3.7.1

@benshalev849
Copy link
Author

@jjngx
We will test it and go back to this issue, did not find issues for this so thought it was un discovered, thank you :)

@pdabelf5
Copy link
Collaborator

pdabelf5 commented Jan 8, 2025

@benshalev849 we have modified the docs for the APIKey Policy to make it clear that suppliedIn is a required field. Apologies for the confusion.

@shaun-nx shaun-nx moved this from Todo ☑ to Prioritized backlog in NGINX Ingress Controller Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue reporting a potential bug needs triage An issue that needs to be triaged
Projects
Status: Prioritized backlog
Development

No branches or pull requests

3 participants