AWX + Minikube+/etc/tower/settings.py edit (ro)

279 views
Skip to first unread message

vanda...@gmail.com

unread,
Nov 22, 2021, 7:35:53 AM11/22/21
to AWX Project
How to change awx's CSRF to false?

I know it's in /etc/tower/settings.py .
The default directory is /var/lib/awx/projects, and I want to change this to a different directory.

However, there is an issue because I installed it with kubernates like the guide  following.

Even though I enter the container with root privileges, I can not edit settings.py because settings.py is READ ONLY.

When I see kubectl describe podI guess it is because the following files are mounted.
/etc/tower/settings.py from awx-settings (ro,path="settings.py")

Is there any other way? Please help me solve it.

The Vandyy Vines

unread,
Nov 30, 2021, 3:00:55 PM11/30/21
to AWX Project
i have used configmap with changes and  mounted the same in .



---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
  name: awx-demo
spec:
  service_type: nodeport
  extra_volumes: |
    - name: awx-demo-awx-configmapy
      configMap:
        name: awx-demo-awx-configmapy
        items:
          - key: settings
            path: settings.py
  web_extra_volume_mounts: |
    - name: awx-demo-awx-configmapy
      mountPath: /etc/tower/settings.py
      subPath: settings.py
      readOnly: false


 and it fails with 


both inclusive\\\",\\\"field\\\":\\\"spec.template.spec.volumes[13].configMap.defaultMode\\\"},{\\\"reason\\\":\\\"FieldValueNotFound\\\",\\\"message\\\":\\\"Not found: \\\\\\\\\\\\\\\"\\\",\\\"field\\\":\\\"spec.template.spec.containers[1].volumeMounts[4].name\\\"}]},\\\"code\\\":422}\\\\n'\", \"reason\": \"Unprocessable Entity\", \"status\": 422}\n\

--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/a19c2da2-434c-440b-b67a-be97c4a4593fn%40googlegroups.com.

The Vandyy Vines

unread,
Dec 7, 2021, 7:20:17 AM12/7/21
to AWX Project
Hello Experts.
 I managed to add the CSRF token as httponly in setting.py file , But the flag ( httponly) is still off for cookies CSRF userloggedin and currentuser token.

there is no httponly flag set in config js file .

Can anyone help.

Just need to make the httponly flag up for 3 cookies(CSRF userloggedin and currentuser token) in AWX 19.4

Thanks in advance :)


The Vandyy Vines

unread,
Dec 17, 2021, 5:45:51 AM12/17/21
to AWX Project
Reply all
Reply to author
Forward
0 new messages