hyperledger-archives / indy-sdk

indy-sdk
https://wiki.hyperledger.org/display/indy
Apache License 2.0
668 stars 735 forks source link

Postgres storage - AWS/RDS concerns #2601

Closed ericvergnaud closed 9 months ago

ericvergnaud commented 1 year ago

Hi,

the Postgres storage assumes that if a database exists, the wallet is already initialized. If it doesn't, it uses the adminAccount/adminPassword to create the database and instantiate the schema. This is fine when using a self-managed PostgreSQL server but doesn't work well with AWS/RDS. AWS/RDS does not support urls of the form: PostgreSQL://account:password@host:port/postgres Fortunately in our case, there seems to be a bug where if the database doesn't exist, and adminAccount/adminPassword are not provided, the storage will create the database using the regular account/password. But this only happens because our security level is currently weak, and our app is provided with the admin account/password. In a more solid implementation, the database should be created upfront, together with various accounts with limited privileges. If that matters, I'm happy to provide detailed specifications, where: