-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Open
Labels
area:helm-chartAirflow Helm ChartAirflow Helm Chartarea:secretskind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet
Description
Official Helm Chart version
1.15.0 (latest released)
Apache Airflow version
2.9.3
Kubernetes Version
1.31.4
Helm Chart configuration
createUserJob:
applyCustomEnv: false
useHelmHooks: false
dags:
gitSync:
branch: main
credentialsSecret: airflow-git-credentials
enabled: true
repo: https://github.com/dacamposol/kg-infra.git
subPath: dags
extraEnv: |
- name: AIRFLOW__API__AUTH_BACKENDS
value: 'airflow.api.auth.backend.basic_auth'
migrateDatabaseJob:
applyCustomEnv: false
jobAnnotations:
'argocd.argoproj.io/hook': Sync
useHelmHooks: false
useStandardNaming: true
Docker Image customizations
No response
What happened
Important
This is an instance managed via ArgoCD.
- I created a connection from type HTTP directly from the Web Server UI.
- I modified a field in the Argo Application in regards of adding the
.extraEnv
to allow REST API calls. - I accessed again to the Web Server UI.
- Cannot open the Connections section (all others work fine).
Error in the webserver
Pod:
File "/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/mapper.py", line 3702, in _event_on_load
instrumenting_mapper._reconstructor(state.obj())
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/models/connection.py", line 213, in on_db_load
if self.password:
^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/attributes.py", line 606, in __get__
retval = self.descriptor.__get__(instance, owner)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/models/connection.py", line 340, in get_password
return fernet.decrypt(bytes(self._password, "utf-8")).decode()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/cryptography/fernet.py", line 211, in decrypt
raise InvalidToken
cryptography.fernet.InvalidToken
When I go to my Argo CD deployment, I can indeed see how for the Airflow application, the airflow-fernet-key
got recreated at the same time than the sync happened.
I am assuming the Secret got recreated and somehow the rotation process failed, so the Connections are now encrypted with the old key, and thus cannot be accessed anymore.
What you think should happen instead
No response
How to reproduce
- Have an Airflow Cluster managed by Argo CD.
- Create a connection in that cluster.
- Modify settings in the Application, and wait for Sync.
- Attempt to access again to the Connections in the aforementioned cluster.
Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
area:helm-chartAirflow Helm ChartAirflow Helm Chartarea:secretskind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet