admin@glassfish.java.net

Password de-aliasing in config

From: Joe Di Pol <joe.dipol_at_oracle.com>
Date: Mon, 02 Aug 2010 12:57:38 -0700

I'm adding SSH password support to Nodes. Part of that
is supporting password aliases. I know the basics on how
this stuff works and can de-alias passwords outside
of the config.

But I'm looking into adding a method to the SShAuth
config bean to return the de-aliased password. So in
addition to getPassword() I'd have getDealiasedPassword().
getPassword() returns what is in domain.xml,
getDealisedPassword() returns the password de-aliased
(if needed).

I was thinking I'd implement getDealisedPassword() via
a Duck type.

A couple questions:

In order to de-alias a password I need to do:

         @Inject(name="Security SSL Password Provider Service")
         MasterPassword masterPasswordHelper;

I've only seen injection done with decorators. How can
I do this via a Duck type? Is there a better approach?

Is password de-aliasing going to be added to the
config framework at some point? If so maybe I should just
do the de-aliasing outside of config for now until the
real support is in.

Joe