ansible/awx

CORS errors after upgrading to AWX 22.3.0

Open

#14,024 opened on May 18, 2023

View on GitHub
 (20 comments) (0 reactions) (0 assignees)Python (3,333 forks)batch import
communityhelp wantedtype:bug

Repository metrics

Stars
 (13,071 stars)
PR merge metrics
 (Avg merge 24d 6h) (30 merged PRs in 30d)

Description

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that the AWX Operator is open source software provided for free and that I might not receive a timely response.

Bug Summary

We have an external load balancer in from of our kubernetes based install that terminates SSL, and passes it to the host. URL configured for ingress on external load balancer: https://vip.example.com backend server load balancer sends traffic to (the kubernetes node): http://awx.example.com:30080 After upgrading from version 21.x, we are now seeing the following error: POST api/v2/job_templates/31/launch/ 403 CSRF Failed: Origin checking failed - https://vip.example.com does not match any trusted origins. As a work-around we are using http://awx.example.com:30080 URL to login.

AWX Operator version

2.2.1

AWX version

22.3.0

Kubernetes platform

kubernetes

Kubernetes/Platform version

Major:"1", Minor:"25"

Modifications

no

Steps to reproduce

awx.yaml file I deployed with:

apiVersion: awx.ansible.com/v1beta1 kind: AWX metadata: name: awx-kubernetes spec: service_type: nodeport

Expected results

Expect to allow CORS headers

Actual results

giving error. Even tried updating the awx.yaml with:

apiVersion: awx.ansible.com/v1beta1 kind: AWX metadata: name: awx-kubernetes spec: service_type: nodeport hostname: vip.example.com extra_settings: - setting: MIDDLEWARE value: "['corsheaders.middleware.CorsMiddleware'] + MIDDLEWARE" - setting: CORS_ORIGIN_ALLOW_ALL value: "True"

Additional information

No response

Operator Logs

No response

Contributor guide