opeida commented on issue #51877:
URL: https://github.com/apache/airflow/issues/51877#issuecomment-2984005645
There is an explicit logic that removes auth info from the Asset's uri field
. Also, the following warning had to be returned to you: `UserWarning: An Asset
URI should not contain auth info (e.g. username or password). It has been
automatically dropped.`
`airflow/sdk/definitions/asset/__init__.py`:
```Python
def _sanitize_uri(inp: str | ObjectStoragePath) -> str:
"""
Sanitize an asset URI.
This checks for URI validity, and normalizes the URI if needed. A fully
normalized URI is returned.
"""
...
_, auth_exists, normalized_netloc = parsed.netloc.rpartition("@")
if auth_exists:
# TODO: Collect this into a DagWarning.
warnings.warn(
"An Asset URI should not contain auth info (e.g. username or "
"password). It has been automatically dropped.",
UserWarning,
stacklevel=3,
)
...
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]