Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to obtain DB url without masked password #1695

Open
whatnick opened this issue Jan 7, 2025 · 0 comments
Open

Unable to obtain DB url without masked password #1695

whatnick opened this issue Jan 7, 2025 · 0 comments
Assignees
Labels
v1.9 Target for version 1.9

Comments

@whatnick
Copy link
Member

whatnick commented Jan 7, 2025

Expected behaviour

We have some legacy code which obtains DB url from the index using db.index.url. It expects unmasked password for establishing a secondary connection to implement dataset/product deletes.

Actual behaviour

URL obtained via SQLAlchemy has password masked.

Steps to reproduce the behaviour

from psycopg2.extensions import parse_dsn
pg_url = dc.index.url
self._logger.debug(pg_url)
pg_dsn = parse_dsn(str(pg_url))
conn = psycopg2.connect(**pg_dsn)

Establishing connection fails

Proposed solutions

  • Short term : Use render_as_string with hide password false.
  • Long term : Internally implement dataset and product deletion to avoid such issues.

Environment information

  • Which datacube --version are you using? - 1.9.0
  • What datacube deployment/enviornment are you running against? - Local Devcontainer
@whatnick whatnick added the v1.9 Target for version 1.9 label Jan 7, 2025
@whatnick whatnick self-assigned this Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.9 Target for version 1.9
Projects
None yet
Development

No branches or pull requests

1 participant