permitio / opal-fetcher-postgres

An OPAL custom data fetcher to bring authorization state from Postgres
https://opal.ac
Apache License 2.0
21 stars 20 forks source link

postgres fetch request times out for some passwords due to underlying library asyncpg #7

Closed treysidechain closed 2 years ago

treysidechain commented 2 years ago

Requests to a postgres data source can fail if a data source config entry's url uses the format postgresql://<user>:<password>@<host>/<db>, specifically the password field may fail to be parsed by the underlying library asyncpg. There's an issue in the asyncpg repo which helped me figure out that resolving this (if not using the connection_params field) requires changing the format to postgresql://<host>/<db>?user=<user>&password=<password> as referenced in this comment.

No code changes necessary but I think noting that bug in the docs could potentially save other folks some debugging time

filipermit commented 2 years ago

Hey @treysidechain - Thank you for this valuable feedback. I have gone ahead and updated the documentation to reflect this issue and the possible outcome. You can check out the pull request here: #8