admin@glassfish.java.net

Re: How can console pass a password or password alias to a command

From: Tim Quinn <tim.quinn_at_oracle.com>
Date: Tue, 16 Nov 2010 10:38:25 -0600

I don't know if this will help.

To handle an aspect of secure admin I enhanced asadmin so it could
read sensitive information from stdin that we don't want on the
command line. The hidden option _auxinput identifies a file path, a
URL, or the hyphen (meaning stdin).

NodeRunner in cluster/ssh uses this today if you want to take a look.
The format of the input stream is expected to be a first line containing

version=1.0

and the rest is in property file format of the form

option.(option-name)=(value)

and asadmin will automatically process the command as if

--option-name value

had been part of the command line in the first place.


- Tim



On Nov 16, 2010, at 10:21 AM, Tom Mueller wrote:

> Can the REST interface write the password to a temporary file, and
> pass in the --passwordfile option?
>
> Tom
>
> On 11/16/2010 10:15 AM, Joe Di Pol wrote:
>>
>> I'm looking at this bug:
>>
>> https://glassfish.dev.java.net/issues/show_bug.cgi?id=14710
>>
>> Basically we have a case where the console needs to pass
>> a password (or password alias) to a remote command.
>> create-node-ssh defines the sshpassword option as:
>>
>> @Param(name = "sshpassword", optional = true, password = true)
>> private String sshpassword;
>>
>> This gives us the ability to get the password (or password alias)
>> via the password file. But how does the console pass this parameter
>> via REST?
>>
>> Is there something I need to do in the command? Or is this something
>> that needs to be handled via the REST layer?
>>
>> As a last resort I guess I could define a second hidden option
>> that is not defined "password = true", but was hoping for a
>> cleaner solution.
>>
>> Thanks,
>>
>> Joe
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>