finos / kdb-studio

Studio for kdb+ / Rapid execution environment for q
Apache License 2.0
18 stars 12 forks source link

Programmatically import server list #140

Open audetto opened 1 year ago

audetto commented 1 year ago

Feature Request

Description of Problem:

In our organisation the password used to connect to kdb servers expires every couple of days.

We have tools to regenerate the server list (json or qpad format), but all users must manually reimport it each time with numerous clicks which after a while become very tedious.

I would like to have a way to programmatically import the new server list into kdb studio settings with minimal user interaction.

Potential Solutions:

I would like to have a command line switch to import server list which does not require any click. Or a separate main like https://github.com/finos/kdb-studio/blob/20616f69ee9b92533c5e1e6b124e625eb2613f83/src/main/studio/ui/QPadImportDialog.java#L222 to do it.

dzmipt commented 1 year ago

In your use-case, is it possible to centrally manager the server configuration? I have the following proposal (which requires development)...

I think it might be useful if the Studio loads the configuration from the remote location. The user only needs to register the remote location to load the configuration. Probably the server can return different configuration to different users (e.g. depending on their roles).

Here are a list of points/questions which makes sense to think about in such design

audetto commented 1 year ago

That would be the ultimate integration. What worries me is that it might become a project across N teams and eventually going nowhere. And servers configuration is not so stable that can be managed centrally.

One thing I did not mention is that passwords are user-specific and there is a fully automated way for a user logged in a machine to retrieve her own password (or token if you prefer) programmatically.

If I may, I could turn your proposal upside down:

I can see in the qpad import dialog that there is a drop down "authentication method". What if I could write my own java plugin and enter a class name? implementing a get_credentials_for(server, port) method.

If this were called on each startup (or each server change), I think it could work.