Xpra: Ticket #1645: Authorization Prompts

When attempting to connect to a secured XPRA server, especially through command line (i.e. xpra start ssl/user@host), if no password is specified through either password-file or on the command line, then XPRA should prompt for the password to use rather than exiting with an error.

This would allow for the password to be omitted from any environment variables, command lines or files where they may be sniffed by other processes.

Mon, 18 Sep 2017 08:23:43 GMT - Antoine Martin: owner changed

Done in r16907.

This could be re-used for ssh prompts (#1646).


@vinglya: please close if that works for you.

Wed, 20 Sep 2017 20:07:46 GMT - vinglya:

Works fine for me.

Of note - there's no prompt when doing an xpra info ssl/user@host.

Thu, 21 Sep 2017 04:25:24 GMT - Antoine Martin: status changed; resolution set

Commands like "xpra info", "xpra version", etc are command line utilities with no GUI, adding a GUI prompt would cause problems with scripts.

Thu, 21 Sep 2017 08:15:47 GMT - vinglya:

Just as a note - when I'd mentioned prompting for password in IRC I had thought a simple call to python's getpass module would suffice to request it from stdin of the process rather than a GUI prompt. Either way this at least covers my usecase of only having to provide the password transiently.

Thu, 21 Sep 2017 09:43:59 GMT - Antoine Martin:

@vinglya: you're right about using getpass, r16940 does that for command line tools like "xpra info". We first check to see if we're running from a tty so this should remain compatible with any wrapper scripts.

Some minor related improvements in r16941.

r16942 also uses the same code for "xpra attach": if the user started the command from a terminal, we prompt for the password there instead of using the GUI. (minor gripe: if you just press enter from the getpass prompt, the GUI prompt still comes up..)

Sat, 23 Jan 2021 05:29:57 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1645