Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Aqua Data Studio provides three different ways to retrieve user credentials outside the application: Invoke an executable, Instantiate the Java classname specified, or Retrieve password from Secure Storage. All of these methods allow you to use multiple connections from multiple databases. For all of these methods, in your register server dialog, instead of entering an actual username and password, you enter a token that tells Aqua Data Studio to retrieve the credentials outside of the application. For instance, a company could have its usernames and passwords for DBs stored in a central LDAP repository. Then they code use the mechanism provided below in Aqua Data Studio to lookup the user's correct username and password for their DB.


Table of Contents
maxLevel4

Method 1 (Invoke an executable)

In your register server dialog, for Login Name and/or password, you specify the value in the format:

Code Block
~`c:\path_of_exe\exe_name_to_launch`~
Info
The use of backticks ` is required. Do NOT use single quotes '

When a user uses Aqua Data Studio to connect to a DB server with such a value, Aqua Data Studio invokes the specified executable and whatever value is returned by the .exe in stdout (standard out) is what Aqua Data Studio uses for the username/password.

Below is an example in OS X.

Method 1 (Invoke an executable) - Registration Dialog - OS X example

The contents of retrieve_username.sh (hard-coded for illustration purposes). This file echoes "root" which is passed to Aqua Data Studio and then Aqua Data Studio passes "root" for the "Login Name" credential.

method 1 file contents

Below is an example in Windows showing the Login Name referring to retrieve_username.bat and a command prompt showing the contents of the retrieve_username.bat file.

Method 1 (Invoke an executable) - Registration Dialog - Windows Example

Method 2 (Instantiate the Java classname specified)

In your register server dialog, for Login Name, you specify the value in the format:

Code Block
~`creduser::JavaClassName`~

For password, you specify in the format:

Code Block
~`credpass::JavaClassName`~
Info
The use of backticks ` is required. Do NOT use single quotes '

With this approach, Aqua Data Studio will attempt to instantiate the classname specified. If instantiated successfully, Aqua Data Studio will then invoke the class's getUserName() / getPassword() method. The value returned from this method will be used for username/password.

method 2 registration dialog

Contents of Java class CredentialPrototype: (hard-coded the username for illustration purposes)

method 2 java contents

Method 3 (Retrieve password or username from Secure Storage)

In this method first navigate to File->Options:Secure Storage and add a Secure Storage entry for your database username or password.

As an example, let us add a password in Secure Storage and make its property hidden. Next, in the Server Registration window, specify ~`credsecure::password`~ in the Password field, to retrieve the credentials from Secure Storage. Once you try to connect to the Database Server, Aqua Data Studio will decrypt the value for the password field specified in Secure Storage, use it as the password and connect to the Database Server.

method 3 secure storage option

In your register server dialog, for a corresponding entry for your database Username, you specify the value in the format:

Code Block
~`credsecure::username`~

Similarly, in your register server dialog, for your database Password, you specify the value in the format:

Code Block
~`credsecure::password`~
Info
The use of backticks ` is required. Do NOT use single quotes '
Info
To use this method for the username field, the secure storage entry must not be hidden

With this approach, Aqua Data Studio will then look up the specified Secure Storage Field Name & decrypt it & use its value for the username or password field specified.