Add Other Authentication Credentials

We are not limited to storing only Oracle connection strings in v_app_conn_registry. Recall that the HashMap is simply a list of string keys and associated string values. Once you get the HashMap back to your application, you can request a specific value based on any key you please.

Of course you could store connection strings or at least passwords for connections to non-Oracle databases. You might also store such things as passwords for secure FTP connections. Our current methods in OracleJavaSecure are tailored for storing Oracle connection strings, but you could add a method for storing, for example, secure FTP passwords. Listing 11-39 shows a sample method you might employ.

Listing 11-39. Example Method ...

Get Expert Oracle and Java Security: Programming Secure Oracle Database Applications with Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.