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

Consider changing API to not use regexp pattern #32360

Closed
1 task done
Tracked by #39593
potiuk opened this issue Jul 5, 2023 · 7 comments
Closed
1 task done
Tracked by #39593

Consider changing API to not use regexp pattern #32360

potiuk opened this issue Jul 5, 2023 · 7 comments
Assignees
Labels
airflow3.0:breaking Candidates for Airflow 3.0 that contain breaking changes airflow3.0:candidate Potential candidates for Airflow 3.0 area:API Airflow's REST/HTTP API kind:meta High-level information important to the community
Milestone

Comments

@potiuk
Copy link
Member

potiuk commented Jul 5, 2023

Body

Our public REST API specification has the possibility of using regexp pattern (dag_id_pattern). This is potentially dangerous as free regexp patterns might have potentially some problems (like infinite recursion or non-linear performance of some patterns) and regexp parsing libraries might have unknown bugs, We should consider making a backwards-incompatible release of the API with the pattern feature removed.

This wouls be a breaking change, and breaking the promise we made to keep our Stable REST API the most stable part of the Public Airflow Interface that we promised our users to rely on, so should carefully consider if removing it is worth breaking the promise. It would also require strong justification and unsolvable security/performance issue to make such change without bumping the REST API version to new MAJOR version and it would disconnect Airflow MAJOR version from the API MAJOR version, so likely the only good time we can do it, is when we release Airflow 3.

Committer

  • I acknowledge that I am a maintainer/committer of the Apache Airflow project.
@potiuk potiuk added area:API Airflow's REST/HTTP API kind:meta High-level information important to the community involves core breaking change labels Jul 5, 2023
@potiuk
Copy link
Member Author

potiuk commented Jul 5, 2023

cc: @bolkedebruin

@pierrejeambrun
Copy link
Member

Nice, thanks for opening :)

@kaxil kaxil added the airflow3.0:candidate Potential candidates for Airflow 3.0 label Jul 15, 2024
@kaxil kaxil added this to the Airflow 3.0.0 milestone Jul 15, 2024
@kaxil kaxil mentioned this issue Jul 15, 2024
10 tasks
@kaxil kaxil added the airflow3.0:breaking Candidates for Airflow 3.0 that contain breaking changes label Jul 15, 2024
@Bowrna
Copy link
Contributor

Bowrna commented Jul 16, 2024

@kaxil @potiuk Can i take a look into this?

@kaxil
Copy link
Member

kaxil commented Aug 16, 2024

@Bowrna This is now assigned to you :)

@Bowrna
Copy link
Contributor

Bowrna commented Aug 16, 2024

@kaxil I will raise my PR before this weekends

@pierrejeambrun
Copy link
Member

I just saw the Pull request associated to this and it makes me wonder. The actual dag_id_pattern is not used to do regexp matching, but db ilike macthing which does not leverage the standard regexp engine matcher but its own thing which is safer.

For instance for postgres some informations are available here https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-LIKE, and as mentioned in the note just above seems safer from a security point of view. In opposition the paragraph right after highlights the similar to regular expression syntax, which is vulnerable.

I am second guessing if we need to do something here.

@potiuk
Copy link
Member Author

potiuk commented Oct 15, 2024

You are very right @pierrejeambrun ! We can close it.

@potiuk potiuk closed this as completed Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
airflow3.0:breaking Candidates for Airflow 3.0 that contain breaking changes airflow3.0:candidate Potential candidates for Airflow 3.0 area:API Airflow's REST/HTTP API kind:meta High-level information important to the community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants