ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 46781] New: <input><handler type="secure"/></handler> with impl defined by embedder
Date Fri, 27 Feb 2009 21:58:26 GMT

           Summary: <input><handler type="secure"/></handler> with impl
                    defined by embedder
           Product: Ant
           Version: 1.7.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Core tasks

When Ant is run embedded, the container can set a default input handler - there
is a method on Project for this. But it is pretty common for a script to
request SecureInputHandler to read a password. If it does this, the container
no longer has any way to substitute a preferred handler, so is
used whether this makes sense or not.

In the case of the NetBeans IDE (see URL), it would like to pop up a dialog
with a JPasswordField, and you can imagine other GUI embedders (or even CI
servers) wanting to provide their own impls.

Would like to introduce Project.setSecureInputHandler(InputHandler). Since
<input classname="..."> always loads exactly that, should introduce "secure" as
a value for HandlerType. Scripts using this mode would get the handler defined
by the project, SecureInputHandler if not set otherwise.

Old scripts using classname="...SecureInputHandler" would be unaffected; would
be nice to provide the new behavior for these automatically, but that would
mean you could not explicitly request SIH and nothing else. Possible trick:

public class ConsoleSecureInputHandler extends SecureInputHandler {}

(a no-op override), and treat <handler classname="...SecureInputHandler"/> like
<handler type="secure"/>, with <handler
classname="...ConsoleSecureInputHandler"/> available for scripts which really
do not want this to be overridden by a container.

Should probably have CLI

  -secureinputhandler <class>  the class which will handle secure input

as well, useful for containers which fork Ant rather than embedding in-VM.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message