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

[bitnami/airflow] Escape special characters in Airflow LDAP configuration values #66534

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

zanecodes
Copy link
Contributor

Description of the change

This change fixes #65217 by escaping single quotes and backslashes in AIRFLOW_LDAP_ configuration values that are interpolated into webserver_config.py as Python strings.

However, values that are not interpolated as strings such as AIRFLOW_LDAP_ROLES_MAPPING, AIRFLOW_LDAP_ROLES_SYNC_AT_LOGIN, and AIRFLOW_LDAP_ALLOW_SELF_SIGNED are still susceptible to arbitrary Python injection.

Benefits

AIRFLOW_LDAP_ configuration values that are interpolated as Python strings (e.g. AIRFLOW_LDAP_BIND_PASSWORD) may now contain single quotes and backslashes, and the Airflow container will handle them correctly instead of erroring out on startup.

Possible drawbacks

If for some reason this behavior was being abused by users to inject arbitrary Python into webserver_config.py, that will no longer work; they should instead mount their own webserver_config.py into the container.

Applicable issues

@github-actions github-actions bot added the triage Triage is needed label May 9, 2024
@github-actions github-actions bot requested a review from javsalgar May 9, 2024 21:22
…ingle quotes are escaped correctly in webserver_config.py

Signed-off-by: Zane Geiger <[email protected]>
@carrodher carrodher added verify Execute verification workflow for these changes in-progress labels May 10, 2024
@github-actions github-actions bot removed the triage Triage is needed label May 10, 2024
@github-actions github-actions bot removed the request for review from javsalgar May 10, 2024 07:25
@github-actions github-actions bot requested a review from alemorcuq May 10, 2024 07:25
@zanecodes
Copy link
Contributor Author

Should this and #66535 each be broken up into three separate PRs for airflow, airflow-scheduler, and airflow-worker?

It seems that the CI pipeline skipped checks since this modifies multiple containers at once.

Also, the link to container best practices in CONTRIBUTING.md is currently broken.

Copy link

This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution.

@github-actions github-actions bot added the stale 15 days without activity label May 26, 2024
@alemorcuq
Copy link
Contributor

Sorry for the late reply, @zanecodes. It's fine like this.

Copy link

github-actions bot commented Jun 3, 2024

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Pull Request. Do not hesitate to reopen it later if necessary.

@github-actions github-actions bot added the solved label Jun 3, 2024
@alemorcuq alemorcuq removed stale 15 days without activity solved labels Jun 3, 2024
Copy link

This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution.

@github-actions github-actions bot added the stale 15 days without activity label Jun 19, 2024
Copy link

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Pull Request. Do not hesitate to reopen it later if necessary.

@carrodher carrodher removed stale 15 days without activity solved labels Jun 26, 2024
Copy link

This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution.

@github-actions github-actions bot added the stale 15 days without activity label Jul 12, 2024
Copy link

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Pull Request. Do not hesitate to reopen it later if necessary.

@carrodher carrodher removed stale 15 days without activity solved labels Jul 22, 2024
@carrodher carrodher requested a review from juan131 July 31, 2024 16:25
@carrodher carrodher assigned juan131 and unassigned alemorcuq Jul 31, 2024
@carrodher carrodher removed the request for review from alemorcuq July 31, 2024 16:25
Copy link
Contributor

@juan131 juan131 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for this contribution and sorry for the big delay in the review process! LGTM

@juan131 juan131 merged commit 19c6c90 into bitnami:main Aug 1, 2024
41 checks passed
@juan131
Copy link
Contributor

juan131 commented Aug 1, 2024

New releases including your changes now available:

  • docker.io/bitnami/airflow-worker:2.9.3-debian-12-r4
  • docker.io/bitnami/airflow-scheduler:2.9.3-debian-12-r4
  • docker.io/bitnami/airflow:2.9.3-debian-12-r6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
airflow airflow-scheduler airflow-worker solved verify Execute verification workflow for these changes
Projects
None yet
5 participants