Open wilsonhooi86 opened 1 month ago
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
Airflow REST API able to accept slashes in URL parameter. Example:
It shouldn't. /
have a special meaning for separate paths in URI.
Instead of that it should work with url-encoded values, did you try to provide assumed-role%2Fuser1
instead?
This issue has been automatically marked as stale because it has been open for 14 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.
Airflow REST API able to accept slashes in URL parameter. Example:
It shouldn't.
/
have a special meaning for separate paths in URI. Instead of that it should work with url-encoded values, did you try to provideassumed-role%2Fuser1
instead?
Hi @Taragolis , yes, I tried to pass in as assumed-role%2Fuser1
but it still parse as "/" in the url and produce the same error as below:
{
"detail": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}
Apache Airflow version
Other Airflow 2 version (please specify below)
If "Other Airflow 2 version" selected, which one?
2.8.1
What happened?
MWAA has announced that we can now use Airflow REST API. The goal is to use REST API Patch User to add/remove users' roles programmatically.
MWAA create username with a prefix of
assumed-role/
for each user login. Example {username}:assumed-role/user1
.API Template URL: https://airflow.apache.org/auth/fab/v1/users/assumed_role/{username} Actual URL: https://airflow.apache.org/auth/fab/v1/users/assumed_role/assumed-role/user1
As we call the Airflow REST API https://airflow.apache.org/auth/fab/v1/users/assumed_role/assumed-role/user1 , it will show below error:
We believe the REST API render the slash as an URL path.
Question is, can we enhance the Airflow REST API to accept slashes in URL parameter?
What you think should happen instead?
Airflow REST API able to accept slashes in URL parameter. Example: username:
assumed-role/user1
https://airflow.apache.org/auth/fab/v1/users/assumed-role/user1How to reproduce
Please refer to What Happened? section
Operating System
MWAA
Versions of Apache Airflow Providers
No response
Deployment
Amazon (AWS) MWAA
Deployment details
I am not sure that this issue is specific to the service provider.
Anything else?
No response
Are you willing to submit PR?
Code of Conduct