Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1692 Extend the plugin architecture to allow plugins to provide URL protocol implementations

KeePass_2.x
closed
nobody
None
5
2013-02-05
2013-02-05
Devin Martin
No

Allow plugins to create protocol handlers for alternate URLs.

For example, it is possible now to open ftp://myserver.com/myfile.kdbx and supply credentials.
This can also be done with WEBDav and of course local files.

There are plugins that allow syncing with s3, skydrive, dropbox and others. These plugins are all well and good, but one must rely on their implementation of syncing and not the standard one. Furthermore, other plugins that need to access files can't piggyback on their work.

I am proposing (and I am willing to implement it too) adding the ability for plugins to register a protocol handler with KeePass so that KeePass's standard syncing technology, triggers, or any other plugins can make use of it.

For example, opening a URL of
dropbox://myfile.kdbx

with a password of: {dropbox api key}

could be handled by a plugin if a handler is registered with the "dropbox" protocol.

The IOConnectionInfo object already has credentials and there is already the concept of protocols for http:// and ftp://. We could simply have protocol handlers that plugins can put into a protocol handler pool. In this way users can still set up synchronization triggers and use the standard official synchronization rather than hope that the plugin implementation is correct. More importantly other plugins can leverage this support, or the user can set up their own triggers that make use of custom remote URLs.

Example (This is just a thought)

IProtocolHandler
{
// this would be the protocol prefix. Ex dropbox would handle "dropbox://somefile"
string Protocol { get; }
Stream Open(string uri, string username, string password);
void Save(Stream stream, string uri, string username, string password);
}

Implementations can be added to the pool by the plugin and the IOConnection can look through this pool to get handlers for any protocol prefixes that it doesn't naively know how to handle.

Related

Feature Requests: #1692

Discussion

  • Dominik Reichl
    Dominik Reichl
    2013-02-05

    • status: open --> closed
     
  • Dominik Reichl
    Dominik Reichl
    2013-02-05

    It already is possible for plugins to register own protocol handlers. For an example, see the 'IOProtocolExt' plugin (which adds support for scp://, sftp://, ftps://, and overwrites the ftp:// handler):
    http://keepass.info/plugins.html#ioprotocolext

    Best regards,
    Dominik

     
  • Devin Martin
    Devin Martin
    2013-02-05

    Now I feel silly for having missed that. I was even looking through the KeePass source for something like that (but it is a rather large codebase.) The plugins that I looked at did their own syncing rather than registering prefixes so I made an incorrect assumption. Thanks!

     
  • Devin Martin
    Devin Martin
    2013-02-05

    Now I feel silly for having missed that. I was even looking through the
    KeePass source for something like that (but it is a rather large codebase.)
    The plugins that I looked at did their own syncing rather than registering
    prefixes so I made an incorrect assumption. Thanks!

    On Tue, Feb 5, 2013 at 10:07 AM, Dominik Reichl dreichl@users.sf.netwrote:

    It already is possible for plugins to register own protocol handlers. For
    an example, see the 'IOProtocolExt' plugin (which adds support for scp://,
    sftp://, ftps://, and overwrites the ftp:// handler):
    http://keepass.info/plugins.html#ioprotocolext

    Best regards,
    Dominik


    Status: closed
    Created: Tue Feb 05, 2013 04:50 PM UTC by Devin Martin
    Last Updated: Tue Feb 05, 2013 04:50 PM UTC
    Owner: nobody

    Allow plugins to create protocol handlers for alternate URLs.

    For example, it is possible now to open ftp://myserver.com/myfile.kdbxand supply credentials.
    This can also be done with WEBDav and of course local files.

    There are plugins that allow syncing with s3, skydrive, dropbox and
    others. These plugins are all well and good, but one must rely on their
    implementation of syncing and not the standard one. Furthermore, other
    plugins that need to access files can't piggyback on their work.

    I am proposing (and I am willing to implement it too) adding the ability
    for plugins to register a protocol handler with KeePass so that KeePass's
    standard syncing technology, triggers, or any other plugins can make use of
    it.

    For example, opening a URL of
    dropbox://myfile.kdbx

    with a password of: {dropbox api key}

    could be handled by a plugin if a handler is registered with the "dropbox"
    protocol.

    The IOConnectionInfo object already has credentials and there is already
    the concept of protocols for http:// and ftp://. We could simply have
    protocol handlers that plugins can put into a protocol handler pool. In
    this way users can still set up synchronization triggers and use the
    standard official synchronization rather than hope that the plugin
    implementation is correct. More importantly other plugins can leverage this
    support, or the user can set up their own triggers that make use of custom
    remote URLs.

    Example (This is just a thought)

    IProtocolHandler
    {
    // this would be the protocol prefix. Ex dropbox would handle
    "dropbox://somefile"
    string Protocol { get; }
    Stream Open(string uri, string username, string password);
    void Save(Stream stream, string uri, string username, string password);
    }

    Implementations can be added to the pool by the plugin and the
    IOConnection can look through this pool to get handlers for any protocol
    prefixes that it doesn't naively know how to handle.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/keepass/feature-requests/1692/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/prefs/

     

    Related

    Feature Requests: #1692