Skip to content

Commit 2b83fc5

Browse files
fix(tests): Accept both spellings of the DAG id wildcard (#903)
1 parent b08032c commit 2b83fc5

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎tests/templates/kuttl/opa/31-opa-rules.yaml‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,11 @@ data:
104104
is_authorized_dag if {
105105
input.method == "GET"
106106
input.access_entity == "RUN"
107-
# Airflow maps the `~` wildcard to `None` before it calls the auth
108-
# manager, so the DAG id arrives here as null rather than as "~".
109-
input.details.id == null
107+
# Airflow 3.1.0+ maps the `~` wildcard to `None` before it calls the
108+
# auth manager, so the DAG id arrives here as null, while 3.0.x passes
109+
# `~` through unchanged. See
110+
# https://github.com/apache/airflow/blob/3.1.0/airflow-core/src/airflow/api_fastapi/core_api/security.py#L122
111+
input.details.id in [null, "~"]
110112
111113
input.user.name == "jane.doe"
112114
}

0 commit comments

Comments
 (0)