Auto-Type login automation

Ctrl Code
2014-02-23
2014-03-08
  • Ctrl Code
    Ctrl Code
    2014-02-23

    I want to automate logins when I click on an entry's URL.

    I've tried KeeFormFF; it has drawbacks, and Firefox refuses to store/use passwords for some sites, so I'd like to do this within KeePass (using two-channel obfuscation where practicable).

    Unfortunately, there doesn't appear to be a way to disable title matching. When I uncheck all matching options, nothing happens on the login page upon using the hotkey.

    I want to:
    1. click an entry's URL
    2. have it open the webpage
    3. fill the fields automagically, according to defined Auto-Type sequences (including custom) for that specific entry

    I've read the KeePass Auto-Type docs. Am I missing something here? If not, please include this functionality in the next release -- i.e., when all matching options are deselected, fill fields using the currently active (the one whose URL was clicked) entry's data; and/or allow per-entry title matching disable.

    Also, what about sites that popup a secondary login prompt which has no associated URL? Is there a way to configure a KeePass entry to deal with that or would that require invoking an external java (or flash) app?

     
  • wellread1
    wellread1
    2014-02-23

    Form filling, and methods of matching login pages using criteria different from an browser's tab title (Window Title), require browser integration. The KeePass developer has made a design decision to exclude browser integration from KeePass in favor of third-party developers providing and supporting this functionality. The known form-filling plugins are available on the plugin page. They offer a variety of degrees of automation.

    KeePass without plugins offers several ways to enter information into webpages using the semiautomatic Auto-Type feature.

    1. The global auto-type hot key (default Ctrl-Alt-A) determines whether to type a keystroke sequence into a webpage, or more generally, into an application Window, by matching the Window Title matching. Disabling all forms of Window Title matching disables the feature except for Custom Auto-Type. There are several browser plugins that can display the webpage URL or domain in the Window Title so that KeePass can use if for webpage matching and auto-type.

    2. KeePass also offers the Perform Auto-Type feature (Ctrl-V) and a variant, Auto-Type selected that is configurable in Tools>Options>Integration, if you wish to use a hot-key to initiate auto-type without the benefit of Window Title matching.

    3. Finally there are convenient drag & drop and cut & paste methods to transfer data from the KeePass View to a web page or application field.

    I want to 1...2....3. fill the fields automagically, according to defined Auto-Type sequences (including custom) for that specific entry

    Parts 1 & 2 of this desire are already possible. Custom Auto-Type sequences are also possible (See the Auto-Type tab on the entry). Automagical form filling is not implemented directly into KeePass for the previous reason cited.

    ...what about sites that popup a secondary login prompt...?

    Pop-ups pages use either the parent Window Title or have their own. If the pop-up Window Title is not obvious, one can ascertain it by navigating to an Entry's "Configure Auto-Type Item" dialog while displaying the pop-up, and select it from the Target Window drop down list (Edit or Add an Entry; Select the Auto-Type tab; Press the Add or Edit button; Examine the dropdown list in the Target Window field)

     
  • Ctrl Code
    Ctrl Code
    2014-02-24

    If matching is unavoidable, it should be possible to automate selection from the match list.

    It should be a simple matter to compare username and/or password of the match returns to the selected (URL-clicked) entry -- if the username and/or password matches, that entry's data gets sent.

    The match list shouldn't need to be displayed, it could be an option. If opted out, the list doesn't popup and it's all done behind the scenes as described.

     
  • Paul
    Paul
    2014-02-24

    KeePass does not read the contents of any web pages so it cannot attempt to match user name or password. KeePass only reads the window title and leaves additional matching up to you.

    cheers, Paul

     
  • Ctrl Code
    Ctrl Code
    2014-02-25

    I was referring to reading its own internal list (the list it brings up when it finds multiple entries for the active window).

    Say I have 3 entries that share a common page title (multiple accounts on the same storage service); all KP entries have different user names and pwords.
    I hit Ctrl-Alt-A.
    Up pops up a window offering manual selection from among the 3.

    KP obviously knows the username and pword of each entry in the match list, since it displays them in the list (assuming those columns are opted in).
    It has pulled this data from the dbase in order to display it.

    It shouldn't be difficult to have KP scan this data (its own list) to locate the entry with user name (and/or pword) which matches that of the entry within which I clicked its URL.
    It only needs to temporarily remember which entry had its URL clicked and take that user name (and/or pword) to run a match on. Once the match is found, KP sends the correct data to the browser.

    Actually, KP shouldn't even need to run a match at all, since it could omit the matching process and simply send the data associated with the specific URL-clicked entry. It knows (or could know) which entry's URL was clicked, since it opens the browser window/tab upon clicking. Ok, so just take THAT entry's data and send it via Auto-Type.

     
    Last edit: Ctrl Code 2014-02-25
  • wellread1
    wellread1
    2014-02-25

    ... since it opens the browser window/tab upon clicking. Ok, so just take THAT entry's data and send it via Auto-Type.

    That sounds like a project for a plugin developer because browser integration is probably required for reliable operation. (e.g. to determine when the page loaded and verify that the focus is a field able to receive input). KeePass doesn't support browser integration natively.

     
    • Ctrl Code
      Ctrl Code
      2014-02-26

      Include a delay in the keystroke sequence which would give the browser sufficient time to open (if not already open). Opening a browser would undoubtedly take more time than opening a new tab in an already existing browser instance, so both scenarios are covered with a single delay value.

      Of course, if not sufficiently long to begin with, the delay might need to be increased as browser add-ons/plugins are installed (or to account for running process-hungry apps or otherwise bogging the system down).

      Or how about a timeout approach: If title window doesn't exist, KP waits for a user-specified delay period then rechecks; rinse, repeat a user-specified number of attempts before it gives up.

      Browser integration is not required. KP only needs to know the window exists, as it does with the match routine and target customizer.
      KP would be doing what it does when Auto-Type is activated via hotkey, the difference being that it would be doing it by itself:

      1. user clicks entry's URL in KP
      2. KP takes data from that entry
      3. KP Auto-Types data from step 2 (with custom keystroke strings, if necessary, including delay(s), to ensure that particular page will be filled correctly)

      In cases of page errors or browser crashes, the benign consequence would be that the data goes to (or stays in) DRAM oblivion. These browser issues would prevent successful hotkey Auto-Type sends as well, so the end result is the same.

       
      • wellread1
        wellread1
        2014-02-26

        The automation you are describing reduces the user required inputs by one. Reducing required user inputs is a very worthy goal but the current semi-automatic processes are reliable, flexible, and nearly universal.

        [double-click URL] vs
        [double-click URL]-[press "global Auto-type" hot key] or
        [double-click URL]-[press "Auto-type selected entry" hot key]

        While I am no developer, given the existing satisfactory semi-automatic built-in options, and the need for a fair amount of logic to handle seamlessly the various situations that can arise after double-clicking on the URL, I believe a plugin is the appropriate avenue for further development of your ideas. I am sure there would be interest if you succeeded.

        While a plugin is more likely to produce a result in the near term, you can also post a feature request.

         
        Last edit: wellread1 2014-02-26
  • Paul
    Paul
    2014-02-25

    KeePass doesn't know the URL because it doesn't read any information from the browser. Even if you click the URL in KeePass, KeePass just asks Windows to open the URL and there is no further interaction, even if opening the URL fails.

    cheers, Paul

     
  • Ctrl Code
    Ctrl Code
    2014-02-26

    @Paul: I meant to reply to general up there, but it also addresses your post. Browser interaction (other than inputting to fields) isn't necessary or desired, for the reasons outlined.

     
  • Ctrl Code
    Ctrl Code
    2014-03-07

    [double-click URL] vs
    [double-click URL]-[press "global Auto-type" hot key] or

    In my case, it's:
    [single-click URL] vs
    [single-click URL]->[press global Auto-Type hot key]->[select entry from match list]

    [double-click URL]-[press "Auto-type selected entry" hot key]

    Custom hot key per entry? How? Actually, even if possible, it wouldn't be the best option for those like me who would have to memorize hot keys for tons of entries that share common page titles (also in different group types).

    given the existing satisfactory semi-automatic built-in options

    satisfactory being a relative term..
    Eliminating the need for keyboard input could be helpful to some disabled users -- I'm not disabled, just sayin'.
    Also, there are many sites on which one can get all work done using only the mouse, such as photo albums -- e.g., I rarely rename pics or folders/sets on-site, other functions are mouse-driven.

    you can also post a feature request.

    I've been looking at the Triggers function, and a request for a simple addition of an Event might be the best way to go -- certainly less hassle to implement, wouldn't need to account for timing variables or problematic pages and would be universally applicable.
    As KP already offers the Perform auto-type with selected entry action, all that's needed is a Entry URL clicked event to trigger that action. The general User interface state updated event doesn't appear to cover URL clicking -- at least, I can't get it to work as such; if anyone else can, please explain how.

    edit: oops, don't know what I was thinking there. It would still open the page and thus need to account for the variables. meh.. anyway, a URL event might be a good place to start (if even for a plugin).

     
    Last edit: Ctrl Code 2014-03-07
  • wellread1
    wellread1
    2014-03-07

    Custom hot key per entry? How?

    "Auto-type selected entry" is not "Custom hot key per entry"
    This single, user defined system hot-key is defined in Tools>Options>Integration(tab)>System-wide hot keys(section). The user presses this hot-key while a webpage field has the focus. The hot-key initiates the auto-type for the entry selected in KeePass (e.g. the one a user just used to open the webpage).

    In my case, it's:
    [single-click URL] vs
    [single-click URL]->[press global Auto-Type hot key]->[select entry from match list]

    You are describing "The Problem of the Identical Window Title"

    Plugins that make the URL available to KeePass can help with this issue:
    1. browser plugins that post the URL to Window Title may distinguish Window Titles that otherwise would be identical.
    2. Extensions that facilitate URL based auto-type may also resolve sites having identical Window Titles.

    Note: URL based auto-type does not solve the problem for sites where the served webpage is based on elements in addition to the URL. Many major websites exhibit this characteristic including login at Google, Yahoo and Microsoft and many banks.

    There are also several ways to differentiate similar Window Titles in KeePass:
    1. custom auto-type
    2. Define separate entries with different Titles

     
    Last edit: wellread1 2014-03-07
  • Ctrl Code
    Ctrl Code
    2014-03-08

    "Auto-type selected entry" is not "Custom hot key per entry"
    This single, user defined system hot-key is defined in >Tools>Options>Integration(tab)>System-wide hot keys(section).

    D'oh! I completely overlooked that. Yeah, that skips the match list, alright.
    Ok, 1 step eliminated, 1 to go. :)

     
    Last edit: Ctrl Code 2014-03-08