Closed momiji closed 3 years ago
Can Save credentials option be enabled when you entered credentials?
Not sure to understand the question here. Do you mean that "save credentials" purpouse is to keep credentials even after disconnecting all?
If so I totally didn't mis-understand it :)
Yes, Save credentials option allows you to open the database without entering credentials after disconnect or re-login.
My bad... In that case does it make sens to add a new feature to forget all credentials?
I see you have already created the feature request for it. It can be implemented in the future. As a workaround you can clear passwords in JSON file now.
Please ask to reopen the ticket, if you have some additional questions about it.
Describe the bug
Disconnect closes the connection but does not forget associated credentials.
To Reproduce
Open a new connection for a database (like mssqlserver, but this will do the same for all), which requires credentials to be entered. Go to SQL ot whatever, and then close it (Disconnect all from menu). Then if you open again the connection, it will not ask for credentials.
Solution
I guess this is related to closeAndDeleteConnection() method that does not call webSession.removeConnection(connectionInfo);
https://github.com/dbeaver/cloudbeaver/blob/ec6eaf4899db7d28277bd4b637c32c4093d75d1e/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/core/impl/WebServiceCore.java#L389-L392
The fix seems to move the
webSession.removeConnection(connectionInfo);
out of the condition:Regards, Christian