<div dir="ltr">Hi all,<br><div><br></div><div>I add a layer using an authentification config ID using PyQGIS: </div><div><br></div><div>uri = QgsDataSourceUri() </div><div>uri.setConnection(HOST, PORT, DB, None, None, QgsDataSourceUri.SslPrefer, pg_auth_id) </div><div><br></div><div>In the project, the credentials are written in clear text in the project file:</div><div><br></div><div><datasource>dbname='pub' host=<a href="http://geodb.rootso.org">geodb.rootso.org</a> port=5432 user='xxxxxx' password='xxxxxx'</div><div><br></div><div>Is it possible to avoid this? How?<br></div><div><br></div><div>Cheers,</div><div>Denis</div></div>