pfn / passifox

Extensions to allow Chrome and Firefox (4.0+) to auto form-fill passwords from KeePass (requires KeePassHttp)
GNU General Public License v3.0
907 stars 185 forks source link

Add extension for edge #495

Open Daniel-Svensson opened 8 years ago

Daniel-Svensson commented 8 years ago

It seems like edge extensions will be so similar to chrome extensions that "only a few changes" should be needed. As long as the extension can communicate with the keypass plugin it should be very easy to implement.

The RTM release is expected for this summer (2016) and the first version of extensions are available in the latest windows preview see https://developer.microsoft.com/en-us/microsoft-edge/extensions/

pfn commented 8 years ago

PR accepted

On Wed, Apr 20, 2016 at 1:15 PM Daniel Svensson notifications@github.com wrote:

It seems like edge extensions will be so similar to chrome extensions that "only a few changes" should be needed. As long as the extension can communicate with the keypass plugin it should be very easy to implement.

The RTM release is expected for this summer (2016) and the first version of extensions are available in the latest windows preview see https://developer.microsoft.com/en-us/microsoft-edge/extensions/

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/pfn/passifox/issues/495

Daniel-Svensson commented 8 years ago

In case anyone have the time to look into this the following links might be useful.

The 2 changes required to load adblock: http://bav0.com/converting-any-chrome-extension-to-edge-in-theory/

edge extension documentation https://developer.microsoft.com/en-us/microsoft-edge/platform/documentation/extensions/

Daniel-Svensson commented 8 years ago

@pfn It seems like microsoft has released a tool to perform the conversion. If you or anybody else has managed to install the windows anniversary update it might help porting the extension for edge.

http://mspoweruser.com/microsofts-new-tool-lets-developers-convert-their-chrome-extensions-to-edge-extensions/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+WmPowerUser+%28MSPowerUser%29

zanix commented 8 years ago

Ran it through the conversion tool and here are the suggestions it returns

manifest.json  .author : String is too short (0 chars), minimum 1
appxManifest.xml Replace INSERT-YOUR-PACKAGE-PROPERTIES-PUBLISHERDISPLAYNAME-HERE with the correct names
appxManifest.xml Replace INSERT-YOUR-PACKAGE-IDENTITY-PUBLISHER-HERE with the correct names
appxManifest.xml Replace INSERT-YOUR-PACKAGE-IDENTITY-NAME-HERE with the correct names
jquery-ui-1.10.2.custom.min.css chrome-extension protocol should be replaced. recommend using getExtensionProtocol() - defined in API bridge
chromeipass.css chrome-extension protocol should be replaced. recommend using getExtensionProtocol() - defined in API bridge
chromeipass.jschrome.extension.sendMessage has been bridged.
options.jschrome.app.getDetails has been bridged.
options.jschrome.extension.sendMessage has been bridged.
popup.jschrome.extension.sendMessage has been bridged.
popup_functions.jschrome.extension.sendMessage has been bridged.
popup_httpauth.jschrome.tabs.getSelected has been bridged.
popup_remember.jschrome.extension.sendMessage has been bridged.

It's weird that it suggests to use getExtensionProtocol() in css since that wouldn't be possible. I haven't done anything past this point and I'm sure there are other issues.

vico93 commented 8 years ago

Any updates about this?

zanix commented 8 years ago

I don't know if the devs are looking into this or not. As for me, I haven't had time to look further into this, but I will once I get the chance.

pfn commented 7 years ago

I don't plan on doing this work myself, but if someone is willing to do the legwork and come up with a PR, I will take it.

On Mon, Aug 29, 2016 at 7:59 PM Joshua Clark notifications@github.com wrote:

I don't know if the devs are looking into this or not. As for me, I haven't had time to look further into this, but I will once I get the chance.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pfn/passifox/issues/495#issuecomment-243319482, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfQxWt0mTHzYARWRuwPyLpwWIGnQJn8ks5qk5yDgaJpZM4IMEks .

brookst commented 7 years ago

I gave this a go and it was straight-forwards, however, this plugin can't work on Edge. To save anyone the hassle, here's a stackoverflow question about the problem: http://stackoverflow.com/questions/39905631/error-0x2efd-in-edge-extension-http-request The gist is that Edge blocks any XMLHttpRequest for a local address. This is apparently "by design". So unless Microsoft change their minds, the KeePassHttp approach isn't going to work.

zanix commented 7 years ago

That is quite disappointing.

riedel commented 7 years ago

According to microsoft (https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8984919/) the preferred way for Edge is to include a native messaging UWP companion app: https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/native-messaging .The API is available since the Creators Update

coldacid commented 7 years ago

So long as loopback is allowed or loopback blocking is disabled, a UWP companion app that talks to KeePassHttp could be written and then packaged within the Edge extension.

ChurdCFG commented 6 years ago

I managed to get this partially working, though I'm not sure how useful it would be for general use (hopefully smarter people than me can work it out!)

Anyway, you can expand the attached zip (edgeipass.zip) and load the extension from Edge after enabling the developer option. Then, from PowerShell as admin run the following: CheckNetIsolation LoopbackExempt -a -n="Microsoft.MicrosoftEdge_8wekyb3d8bbwe"

That will allow the loopback connection for XMLHTTPRequests. One caveat, it looks like edge doesn't support the listener for the CTRL+U and CTRL+P keyboard shortcuts (although I didn't look too hard to figure that out).

I should mention, I'm currently running this from the latest Windows Insider build of the upcoming Fall update (build 16291). I'm assuming it will work on the current version, but just in case it doesn't that may be why.

zanix commented 6 years ago

It might be a good idea to have your edits on a fork so the devs have an easier way to see your edits.

ChurdCFG commented 6 years ago

Fair enough - I've forked it and pushed my changes that way (keeping all changes in the chromeipass folder). I've never actually pushed anything to GitHub before (mainly a lurker), so if something's off I can change it, just let me know.

coldacid commented 6 years ago

I tried it against Creators Update and it seems to work fine.

coldacid commented 6 years ago

@ChurdCFG up until now the Edge port has been working fine but since bumping to 16299.19 Edge now crashes whenever I start KeePass and unlock a database (but not on subsequent unlocks).

I suppose I should report this on your forked repo but this seems to be where all the activity's at.

Windows 10 Version 1709 (OS Build 16299.19) Microsoft Edge 41.16299.15.0 Microsoft EdgeHTML 16.16299

coldacid commented 6 years ago

Another thing to note is that the "Settings" button in the extension's dialog works, but the other two (choose own credential fields, redetect fields) do nothing when clicked.

coldacid commented 6 years ago

Considering that loopback is disabled by design for pure-JS extensions, it looks like Edge will need a different solution to connect with KeePass, one that provides a UWP messaging component and possibly even a different plugin in KeePass itself to communicate with it.

sstodd7532 commented 6 years ago

I have been bugged that I did not have an option for a keepass extension so I started to look into it today and found this issue. In downloading the zip from @ChurdCFG and running the powershell command he mention. I was able to get this working correctly on my computer. So to help here are the steps that I did to get this working.

  1. Download zip from https://github.com/pfn/passifox/files/1318748/edgeipass.zip
  2. Enable developer mode for extensions in Edge by going to about:flags
  3. Open the menu and go to Extensions
  4. Click button to load extension
  5. select folder that contains the code from the unpacked zip you downloaded.
  6. Run the following in powershell running as admin CheckNetIsolation LoopbackExempt -a -n="Microsoft.MicrosoftEdge_8wekyb3d8bbwe"
  7. Click extension in edge and open settings >> connect databases
  8. Connect your database and enjoy.

I should add that I am running on Windows 10 Pro Build 17127 on the Insiders Preview.

Thrakorzog commented 5 years ago

... here are the steps that I did to get this working:

  1. Download zip from https://github.com/pfn/passifox/files/1318748/edgeipass.zip
  2. Enable developer mode for extensions in Edge by going to about:flags
  3. Open the menu and go to Extensions
  4. Click button to load extension
  5. select folder that contains the code from the unpacked zip you downloaded.
  6. Run the following in powershell running as admin CheckNetIsolation LoopbackExempt -a -n="Microsoft.MicrosoftEdge_8wekyb3d8bbwe"
  7. Click extension in edge and open settings >> connect databases
  8. Connect your database and enjoy.

I should add that I am running on Windows 10 Pro Build 17127 on the Insiders Preview.

This sounds like a good Chocolaty candidate.

coldacid commented 5 years ago

Only if the edgeipass.zip was getting updated regularly, which as far as I can tell, it isn't.

drveresh commented 5 years ago

Ran it through the conversion tool and here are the suggestions it returns

manifest.json  .author : String is too short (0 chars), minimum 1
appxManifest.xml Replace INSERT-YOUR-PACKAGE-PROPERTIES-PUBLISHERDISPLAYNAME-HERE with the correct names
appxManifest.xml Replace INSERT-YOUR-PACKAGE-IDENTITY-PUBLISHER-HERE with the correct names
appxManifest.xml Replace INSERT-YOUR-PACKAGE-IDENTITY-NAME-HERE with the correct names
jquery-ui-1.10.2.custom.min.css chrome-extension protocol should be replaced. recommend using getExtensionProtocol() - defined in API bridge
chromeipass.css chrome-extension protocol should be replaced. recommend using getExtensionProtocol() - defined in API bridge
chromeipass.jschrome.extension.sendMessage has been bridged.
options.jschrome.app.getDetails has been bridged.
options.jschrome.extension.sendMessage has been bridged.
popup.jschrome.extension.sendMessage has been bridged.
popup_functions.jschrome.extension.sendMessage has been bridged.
popup_httpauth.jschrome.tabs.getSelected has been bridged.
popup_remember.jschrome.extension.sendMessage has been bridged.

It's weird that it suggests to use getExtensionProtocol() in css since that wouldn't be possible. I haven't done anything past this point and I'm sure there are other issues.

@zanix , I am having the same issue of using url() in css, and there's no way to get URL of local font files. Can you please share me your solution if you have?

AaronKelley commented 5 years ago

Wanted to toss out there that the "chromeIPass" extension is working fine in Chromium-based Edge dev builds without modification. Something to consider when weighing how much work should be put into getting it to work on the current Edge.

zanix commented 5 years ago

Ran it through the conversion tool and here are the suggestions it returns

manifest.json  .author : String is too short (0 chars), minimum 1
appxManifest.xml Replace INSERT-YOUR-PACKAGE-PROPERTIES-PUBLISHERDISPLAYNAME-HERE with the correct names
appxManifest.xml Replace INSERT-YOUR-PACKAGE-IDENTITY-PUBLISHER-HERE with the correct names
appxManifest.xml Replace INSERT-YOUR-PACKAGE-IDENTITY-NAME-HERE with the correct names
jquery-ui-1.10.2.custom.min.css chrome-extension protocol should be replaced. recommend using getExtensionProtocol() - defined in API bridge
chromeipass.css chrome-extension protocol should be replaced. recommend using getExtensionProtocol() - defined in API bridge
chromeipass.jschrome.extension.sendMessage has been bridged.
options.jschrome.app.getDetails has been bridged.
options.jschrome.extension.sendMessage has been bridged.
popup.jschrome.extension.sendMessage has been bridged.
popup_functions.jschrome.extension.sendMessage has been bridged.
popup_httpauth.jschrome.tabs.getSelected has been bridged.
popup_remember.jschrome.extension.sendMessage has been bridged.

It's weird that it suggests to use getExtensionProtocol() in css since that wouldn't be possible. I haven't done anything past this point and I'm sure there are other issues.

@zanix , I am having the same issue of using url() in css, and there's no way to get URL of local font files. Can you please share me your solution if you have?

Sorry, I haven't really been working on this and I never found a solution.

Dishavishwakarma commented 3 years ago

Hi @Daniel-Svensson and everyone,

You can now directly port you existing Chrome extension to Microsoft Edge addons website with minimal code changes. Here are all the details to port your Chrome extension - https://docs.microsoft.com/en-us/microsoft-edge/extensions-chromium/developer-guide/port-chrome-extension.

This tool would work for old browser and is obsolete now - http://mspoweruser.com/microsofts-new-tool-lets-developers-convert-their-chrome-extensions-to-edge-extensions/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+WmPowerUser+%28MSPowerUser%29

If you face issues while porting your extension, you can reach out to the relevant teams whose links are mentioned here - https://docs.microsoft.com/en-us/microsoft-edge/extensions-chromium/publish/contact-extensions-team.

Thank you!