OpenMetadata icon indicating copy to clipboard operation
OpenMetadata copied to clipboard

bug: Service password gets overwritten with '********' when editing connection details (any!)

Open mgorsk1 opened this issue 1 year ago • 0 comments

Affected module UI

Describe the bug If i define a service connection (for example Trino) and after some time change any property of this service, the connection details are updated but as a side-effect password (or actually any secret within this form) gets overwritten in the db with it's masked form (*******).

To Reproduce

  1. Register service with any user and password. Save.
  2. Go into 'Edit Connection' form.
  3. Edit any connection attribute. Save.
  4. Collect encrypted password from openmetadata db (for postgresql: select * from dbservice_entity)
  5. Run in python:
from cryptography.fernet import Fernet

f = Fernet('myfernetkey')  # fill out with your fernet key
p = 'myserviceconnectionpassword'  # fill out with encrypted password collected from previous point

print(f.decrypt(p))

It will return ******** and your service connection will fail when connecting to underlying service.

Screenshots or steps to reproduce

Expected behavior Secret values are not overwritten when editing connection details (unless you edit secrets themselves).

Version:

  • OS: [e.g. iOS]
  • Python version:
  • OpenMetadata version: [e.g. 0.8] 1.3.0
  • OpenMetadata Ingestion package version: [e.g. openmetadata-ingestion[docker]==XYZ]

Additional context This is true for any secret field that is available in service connection password - all of them will be updated with ******.

mgorsk1 avatar Feb 13 '24 12:02 mgorsk1