In the docs, the “database ID” is usually represented using a UUID, and was surprised to see the credentials to access storage here. Not only is sensitive data exposed, the “ID” would also change when I rotate the credentials.
Sorry for my inane question asking you to list-databses! I’ve had a long day and I misunderstood the initial post!
Yes, the connection object will show you your connection string with credentials to storage. This is similar to other connection pools in SQL. This is not what I would consider leaking credentials. You cannot share your connection object.
Yes I think you are missing something you are looking at the connection object. The DB is a value and I believe that is what you are after. For instance (d/db conn):
(def db (d/db conn))
=> #'example/db
db
=> {:t 7, :next-t 8, :db-name "test2", :database-id "1a3eb1a4-d05e-4353-83ac-23a217a7be8e", :type :datomic.client/db}
Also worth noting that most our documentation examples assume that you are using DDB and seeing a UUID for the value of :database-id is an implementation detail of DDB.
Looks like this is a behavior of the Peer Server: Using the Datomic Database URI as “Database ID” (unlike the Peer Library)?
I think my concern goes even a bit deeper, as I see the full URI is also logged by datomic, including DB credentials. This just seems unnecessary and a potential security problem to me.