You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "rawwar (via GitHub)" <gi...@apache.org> on 2025/02/28 05:40:14 UTC
[PR] AIP 84 - Add Auth to Pools [airflow]
rawwar opened a new pull request, #47192:
URL: https://github.com/apache/airflow/pull/47192
related to #42360
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] AIP 84 - Add Auth to Pools [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #47192:
URL: https://github.com/apache/airflow/pull/47192#discussion_r1977301997
##########
airflow/api_fastapi/core_api/openapi/v1-generated.yaml:
##########
@@ -4061,12 +4061,16 @@ paths:
summary: Delete Pool
description: Delete a pool entry.
operationId: delete_pool
+ security:
+ - OAuth2PasswordBearer: []
parameters:
- name: pool_name
in: path
required: true
schema:
- type: string
+ anyOf:
+ - type: string
+ - type: 'null'
Review Comment:
This change is not accurate, the `pool_name` cannot be `null` here. We want to fix that I think. Same for other spec update, those should not be here.
##########
airflow/api_fastapi/core_api/openapi/v1-generated.yaml:
##########
@@ -4061,12 +4061,16 @@ paths:
summary: Delete Pool
description: Delete a pool entry.
operationId: delete_pool
+ security:
+ - OAuth2PasswordBearer: []
parameters:
- name: pool_name
in: path
required: true
schema:
- type: string
+ anyOf:
+ - type: string
+ - type: 'null'
Review Comment:
For instance retrieving directly from the `Request` object. (path params and query_params), so this will not update the openapi spec.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] AIP 84 - Add Auth to Pools [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun merged PR #47192:
URL: https://github.com/apache/airflow/pull/47192
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] AIP 84 - Add Auth to Pools [airflow]
Posted by "rawwar (via GitHub)" <gi...@apache.org>.
rawwar commented on code in PR #47192:
URL: https://github.com/apache/airflow/pull/47192#discussion_r1977407295
##########
airflow/api_fastapi/core_api/openapi/v1-generated.yaml:
##########
@@ -4061,12 +4061,16 @@ paths:
summary: Delete Pool
description: Delete a pool entry.
operationId: delete_pool
+ security:
+ - OAuth2PasswordBearer: []
parameters:
- name: pool_name
in: path
required: true
schema:
- type: string
+ anyOf:
+ - type: string
+ - type: 'null'
Review Comment:
Thanks. Updated it accordingly
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] AIP 84 - Add Auth to Pools [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #47192:
URL: https://github.com/apache/airflow/pull/47192#discussion_r1977324152
##########
airflow/api_fastapi/core_api/openapi/v1-generated.yaml:
##########
@@ -4061,12 +4061,16 @@ paths:
summary: Delete Pool
description: Delete a pool entry.
operationId: delete_pool
+ security:
+ - OAuth2PasswordBearer: []
parameters:
- name: pool_name
in: path
required: true
schema:
- type: string
+ anyOf:
+ - type: string
+ - type: 'null'
Review Comment:
For instance retrieving directly from the `Request` object. (path params and query_params), so this will not update the openapi spec.
```python
def requires_access_pool(method: ResourceMethod) -> Callable:
def inner(
user: Annotated[BaseUser | None, Depends(get_user)] = None,
request: Request,
) -> None:
pool_name_path_param = request.path_params....
pool_name_query_param = request.query_params...
pool_name = ...
def callback():
return get_auth_manager().is_authorized_pool(
method=method, details=PoolDetails(name=pool_name), user=user
)
_requires_access(
is_authorized_callback=callback,
)
return inner
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org