Skip to content

User \"system:anonymous\" cannot get path \"/apis/constraints.gatekeeper.sh/v1beta1// #330

@steve-heslouin

Description

@steve-heslouin

Hello, i wanted to try your dashboard so i could try runing it for my company, but that didn't worked.

On my local machine i used :

docker run -v ~/.kube/config:/home/gpm/.kube/config -p 8080:8080 quay.io/sighup/gatekeeper-policy-manager:v0.5.1

It loaded my kubeconfig file correctly, when i click "Get constraints status", it give me following error:

(403) Reason: Forbidden HTTP response headers: HTTPHeaderDict({'Audit-Id': '2b44e6b7-e43e-449b-a608-83d4347fde9e', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'e8915a47-326c-450c-af43-f297c36367a6', 'X-Kubernetes-Pf-Prioritylevel-Uid': '38bf4b6b-d54e-4289-b143-c225265af301', 'Date': 'Tue, 01 Mar 2022 13:36:38 GMT', 'Content-Length': '225'}) HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"forbidden: User \"system:anonymous\" cannot get path \"/apis/constraints.gatekeeper.sh/v1beta1//\"","reason":"Forbidden","details":{},"code":403}
[2022-03-01 13:27:34 +0000] [1] [INFO] Starting gunicorn 20.1.0
[2022-03-01 13:27:34 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080 (1)
[2022-03-01 13:27:34 +0000] [1] [INFO] Using worker: gthread
[2022-03-01 13:27:34 +0000] [9] [INFO] Booting worker with pid: 9
[2022-03-01 13:27:34 +0000] [11] [INFO] Booting worker with pid: 11
[2022-03-01 13:27:38,405] INFO: RUNNING WITH AUTHENTICATION DISABLED
[2022-03-01 13:27:38,405] INFO: RUNNING WITH AUTHENTICATION DISABLED
[2022-03-01 13:27:38,407] INFO: Attempting init with KUBECONFIG from path '~/.kube/config'
[2022-03-01 13:27:38,407] INFO: Attempting init with KUBECONFIG from path '~/.kube/config'
[2022-03-01 13:27:38,691] ERROR: [Errno 2] No such file or directory: 'aws-iam-authenticator'
[2022-03-01 13:27:38,693] ERROR: [Errno 2] No such file or directory: 'aws-iam-authenticator'

I have gatekeeper 3.7 installed on my EKS cluster and its up and running.

gatekeeper-system   gatekeeper-audit-59d4b6fd4c-lw8hj                1/1     Running   0          82d
gatekeeper-system   gatekeeper-controller-manager-66f474f785-448pz   1/1     Running   0          82d
gatekeeper-system   gatekeeper-controller-manager-66f474f785-895ng   1/1     Running   0          82d
gatekeeper-system   gatekeeper-controller-manager-66f474f785-cl8sz   1/1     Running   0          82d

We use STS assume role and use the aws-auth mechanism provided by AWS, could that be the issue , as it seems the client run by default in anonymous, and ofc we don't provide access to anonymous user in our clusters

Thanks

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or requestgood first issueGood for newcomersquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions