Open Bug 1960904 Opened 2 months ago Updated 3 days ago

Integrity-Policy header prototype

Categories

(Core :: DOM: Security, task)

task

Tracking

()

ASSIGNED

People

(Reporter: tschuster, Assigned: fkilic)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

(Whiteboard: [domsecurity-active])

Attachments

(4 files, 45 obsolete files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
No description provided.
Summary: Integrity-Policy header parsing prototype → Integrity-Policy header prototype

In part 1, I understood the need and could tell when and where to make changes, but in this patch, I'm not sure about it at all. I blindly copied every CSP change/inhertance, but in all honesty, I'm not sure which ones we need and which ones we don't.

I also haven't covered all the codepaths. The following are still missing (and these are the ones I could trace, there could be even more):

Assignee: nobody → fkilic
Status: NEW → ASSIGNED
Whiteboard: [domsecurity-active]
Attachment #9479376 - Attachment description: Bug 1960904 -Parse and store Integrity-Policy(-Report-Only) header(s) → WIP: Bug 1960904 -Parse and store Integrity-Policy(-Report-Only) header(s)
Attachment #9479380 - Attachment description: Bug 1960904 - Check Integrity-Policy when loading external script → WIP: Bug 1960904 - Check Integrity-Policy when loading external script

Well I'm glad no one is cc'd on this bug.. My moz-phab is acting up, sorry for the disturbance.

Attachment #9484562 - Attachment is obsolete: true
Attachment #9484558 - Attachment is obsolete: true
Attachment #9484557 - Attachment is obsolete: true
Attachment #9484546 - Attachment is obsolete: true
Attachment #9484533 - Attachment is obsolete: true
Attachment #9484532 - Attachment is obsolete: true
Attachment #9479382 - Attachment is obsolete: true
Attachment #9479381 - Attachment is obsolete: true
Attachment #9479376 - Attachment description: WIP: Bug 1960904 -Parse and store Integrity-Policy(-Report-Only) header(s) → WIP: Bug 1960904 - Parse and store Integrity-Policy(-Report-Only) header(s)
Attachment #9479380 - Attachment is obsolete: true
Attachment #9486329 - Attachment description: WIP: Bug 1960904 - Add nsIntegrityPolicy as a content-policy → WIP: Bug 1960904 - Add IntegrityPolicy as a content-policy
Attachment #9486392 - Attachment is obsolete: true
Attachment #9486349 - Attachment description: WIP: Bug 1960904 - Make IntegrityPolicy nsISerializable → WIP: Bug 1960904 - Make IntegrityPolicy serializable
Attachment #9484563 - Attachment is obsolete: true
Attachment #9484564 - Attachment is obsolete: true
Attachment #9484560 - Attachment is obsolete: true
Attachment #9484567 - Attachment is obsolete: true
Attachment #9484568 - Attachment is obsolete: true
Attachment #9484570 - Attachment is obsolete: true
Attachment #9484571 - Attachment is obsolete: true
Attachment #9484572 - Attachment is obsolete: true
Attachment #9484575 - Attachment is obsolete: true
Attachment #9484577 - Attachment is obsolete: true
Attachment #9484578 - Attachment is obsolete: true
Attachment #9484579 - Attachment is obsolete: true
Attachment #9484580 - Attachment is obsolete: true
Attachment #9484581 - Attachment is obsolete: true
Attachment #9484582 - Attachment is obsolete: true
Attachment #9484584 - Attachment is obsolete: true
Attachment #9484586 - Attachment is obsolete: true
Attachment #9484585 - Attachment is obsolete: true
Attachment #9484587 - Attachment is obsolete: true
Attachment #9484588 - Attachment is obsolete: true
Attachment #9484600 - Attachment is obsolete: true
Attachment #9484601 - Attachment is obsolete: true
Attachment #9484602 - Attachment is obsolete: true
Attachment #9484603 - Attachment is obsolete: true
Attachment #9484605 - Attachment is obsolete: true
Attachment #9484609 - Attachment is obsolete: true
Attached file WIP: Bug 1960904 - Check for CORS (obsolete) —

This patch is loaded with multiple changes. I couldn't really split it. Sorry :/

In summary

  1. Added CORSMode to LoadInfo. It is only populated in ScriptLoader. When we want to extend this, we will need to do the same for other destinations.
  2. About using the request mode instead of CORS mode, I looked into it and it looks like we compute security flags based on CORS mode and pass it into nsIChannel. We could change content policy check method to something similar to ProcessCrossOriginResourcePolicyHeader, and get request mode there, but then we'll lose other properties. I could be wrong, but I think this method is good enough.
  3. Changed IntegrityPolicy::ShouldLoad a bit. It now matches 100% with the spec and Chrome's implementation.
Attachment #9487839 - Attachment is obsolete: true
Depends on: 1966691

Comment on attachment 9488363 [details]
WIP: Bug 1960904 - Add RequestMode to LoadInfo

Revision D249807 was moved to bug 1966691. Setting attachment 9488363 [details] to obsolete.

Attachment #9488363 - Attachment is obsolete: true

Comment on attachment 9488364 [details]
WIP: Bug 1960904 - Set request mode for script loads

Revision D249808 was moved to bug 1966691. Setting attachment 9488364 [details] to obsolete.

Attachment #9488364 - Attachment is obsolete: true
Attachment #9489476 - Attachment is obsolete: true
Attachment #9479376 - Attachment description: WIP: Bug 1960904 - Parse and store Integrity-Policy(-Report-Only) header(s) → Bug 1960904 - Parse and store Integrity-Policy(-Report-Only) header(s) r=tschuster
Attachment #9486329 - Attachment description: WIP: Bug 1960904 - Add IntegrityPolicy as a content-policy → Bug 1960904 - Add IntegrityPolicy as a content-policy r=tschuster
Attachment #9486349 - Attachment description: WIP: Bug 1960904 - Make IntegrityPolicy serializable → Bug 1960904 - Make IntegrityPolicy serializable r=tschuster
Attachment #9487042 - Attachment description: WIP: Bug 1960904 - Prototype PolicyContainer → Bug 1960904 - Prototype PolicyContainer r=tschuster
Attachment #9487101 - Attachment description: WIP: Bug 1960904 - Populate PolicyContainer in Document → Bug 1960904 - Populate PolicyContainer in Document r=tschuster
Attachment #9487560 - Attachment description: WIP: Bug 1960904 - Part 1: Copy PolicyContainer Similar to CSP → Bug 1960904 - Part 1: Copy PolicyContainer Similar to CSP r=tschuster
Attachment #9488443 - Attachment description: WIP: Bug 1960904 - Part 2: Copy PolicyContainer Similar to CSP → Bug 1960904 - Part 2: Copy PolicyContainer Similar to CSP r=tschuster
Attachment #9489093 - Attachment description: WIP: Bug 1960904 - Part 3: Copy PolicyContainer Similar to CSP → Bug 1960904 - Part 3: Copy PolicyContainer Similar to CSP r=tschuster
See Also: → 1968607

Comment on attachment 9487042 [details]
Bug 1960904 - Prototype PolicyContainer r=tschuster

Revision D248908 was moved to bug 1968607. Setting attachment 9487042 [details] to obsolete.

Attachment #9487042 - Attachment is obsolete: true

Comment on attachment 9487101 [details]
Bug 1960904 - Populate PolicyContainer in Document r=tschuster

Revision D248949 was moved to bug 1968607. Setting attachment 9487101 [details] to obsolete.

Attachment #9487101 - Attachment is obsolete: true

Comment on attachment 9487560 [details]
Bug 1960904 - Part 1: Copy PolicyContainer Similar to CSP r=tschuster

Revision D249248 was moved to bug 1968607. Setting attachment 9487560 [details] to obsolete.

Attachment #9487560 - Attachment is obsolete: true

Comment on attachment 9488443 [details]
Bug 1960904 - Part 2: Copy PolicyContainer Similar to CSP r=tschuster

Revision D249868 was moved to bug 1968607. Setting attachment 9488443 [details] to obsolete.

Attachment #9488443 - Attachment is obsolete: true

Comment on attachment 9489093 [details]
Bug 1960904 - Part 3: Copy PolicyContainer Similar to CSP r=tschuster

Revision D250286 was moved to bug 1968607. Setting attachment 9489093 [details] to obsolete.

Attachment #9489093 - Attachment is obsolete: true
See Also: → 1969279
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: