I have an application that connects to integrity through the java mks api. To test the application functionalities I hardcoded the user and the password for my computer, but now after testing I want to make the app generic so more users can use it.
Normally, each user has a user (this information I can get it from ENV) and a password configured in the Integrity
interface. Is there a possibility to tell the mksapi
to get the password from those preferences?
There is no option to get the password from Client preferences. You don't need to have the password if the connection already exist and you are using localintegration.
e.g.
si projects --hostname={SI_HOST} --port={SI_PORT} --user={USERNAME}
The previous command will work without password if there is an active connection for the provided info: {USERNAME}@{SI_HOST}:{SI_PORT}
Another option is to use a user with impersonate permission. if you cannot use any of this option, the only way is to prompt the user for a password.