Closed
Bug 1307852
Opened 8 years ago
Closed 7 years ago
Add origin of caller to arguments for native messaging host
Categories
(WebExtensions :: Compatibility, defect, P3)
WebExtensions
Compatibility
Tracking
(firefox55 fixed)
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: robwu, Assigned: robwu)
References
Details
(Keywords: dev-doc-complete, Whiteboard: triaged, [awe:onepassword4@agilebits.com])
Attachments
(1 file)
Chrome has always started native messaging hosts with the origin parameter (and now it is also documented - https://crbug.com/1271663). Firefox should also add the parameter.
In Chrome, the parameter looks like: chrome-extension://[extension id = 32 characters a-p]/
In Firefox, the extension ID must be deterministic, and then it should be:
moz-extension://[extension id]/.
When origins are deterministic, then there should be no objection to also support allowed_origins in the native messaging manifest.
Assignee | ||
Comment 2•8 years ago
|
||
Oops sorry. This is the right one: https://crbug.com/651496
Flags: needinfo?(rob)
Updated•8 years ago
|
Priority: -- → P3
Whiteboard: triaged
Updated•8 years ago
|
webextensions: --- → ?
Updated•8 years ago
|
webextensions: ? → ---
Assignee | ||
Comment 3•7 years ago
|
||
Since WebExtensions have no deterministic (origin) URL (e.g. bug 1257989), another parameter should be used.
E.g. --sender-extension-id=[extension id here]
Andy, does this approach sound OK?
(extension ID per https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/applications )
Flags: needinfo?(amckay)
Updated•7 years ago
|
Flags: needinfo?(amckay) → needinfo?(aswan)
Comment 4•7 years ago
|
||
Seems fine to me. I would skip the whole --sender-extension-id= bit and just pass the id in a fixed position in the arguments array.
Flags: needinfo?(aswan)
Comment 5•7 years ago
|
||
Rob offered to take this bug. Since it looked relatively minor and 1password needed to finish their WE we are good to add this.
Assignee: nobody → rob
Whiteboard: triaged → triaged, 1password
Comment hidden (mozreview-request) |
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8873516 [details]
Bug 1307852 - Pass ID of calling add-on to native messaging app
https://reviewboard.mozilla.org/r/144902/#review148872
Attachment #8873516 -
Flags: review?(aswan) → review+
Updated•7 years ago
|
Keywords: dev-doc-needed
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/5ae487045afb
Pass ID of calling add-on to native messaging app r=aswan
Comment 9•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Comment 10•7 years ago
|
||
I've added a bit on this here: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Native_messaging#Native_app_arguments
Let me know if this covers it.
Flags: needinfo?(rob)
Assignee | ||
Comment 11•7 years ago
|
||
Some WebExtensions articles on MDN have compatibility notes that highlight the differences between implementations in browsers.
The native messaging docs do not, even though there are differences with Chrome's implementation:
- Command line argument (see link in this initial report).
- Native messaging host locations (the structure is very similar, but the exact names of paths/registry keys differ).
- Chrome uses allowed_origins, whereas Firefox uses allowed_extensions
Is the omission of these differences intentional? I think that such information can be valuable for developers who wish to distribute a cross-browser native messaging host.
Flags: needinfo?(rob) → needinfo?(wbamberg)
Comment 12•7 years ago
|
||
It's tricky to use compat data for this, because that get attached to API reference docs, and this is more of a conceptual type of article.
Maybe the best thing for now would be to add a section into the "Chrome incompatibilities" page, and include it in this page. So that's what I've done: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Native_messaging#Chrome_incompatibilities.
I'd like to revise the "Chrome incompatibilities" page, and the way it's used in these docs. But that will have to wait for a bit.
Flags: needinfo?(wbamberg)
Updated•7 years ago
|
Keywords: dev-doc-needed → dev-doc-complete
Comment 13•7 years ago
|
||
This was the blocker for 1password. Landed in Firefox 55. They are on track to migrate for Firefox 57.
Whiteboard: triaged, 1password → triaged, [awe:onepassword4@agilebits.com]
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•