? ? ? ? Success

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
18 Apr 2020

Summary of Changes

Add the Report-To (#2) header to the http header config and allow to set the script-dynamic header

Testing Instructions

  • go to the plg_system_httpheaders
  • notice there is no report-to header in the force header option.
  • apply this patch
  • the option is there
  • set the option to any value. (or see here the details + example)
  • revert the patch
  • go to the com_csp options
  • notice there is no strict-dynamic setting
  • apply this patch
  • notice there is now a strict dynamatic setting. (details)
  • enable the strict dynamic setting
  • (when in custom mode make sure you setup a inital script-src dummy rule)
  • and check the generated csp header. (F12 -> Network tab)

Expected result

  • you can set the report-to via the plugin
  • you can set the strict-dynamic option for the CSP

Actual result

  • you can not set the report-to via the plugin
  • you can not set the strict-dynamic option for the CSP

Documentation Changes Required

The script-dynamic options needs to be added to doc pages the Report-To has been added already
https://docs.joomla.org/index.php?title=Help4.x:Components_CSP_Reports_Options
https://docs.joomla.org/J4.x:Http_Header_Management

avatar zero-24 zero-24 - open - 18 Apr 2020
avatar zero-24 zero-24 - change - 18 Apr 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Apr 2020
Category Administration com_csp Language & Strings Front End Plugins
avatar zero-24 zero-24 - change - 18 Apr 2020
The description was changed
avatar zero-24 zero-24 - edited - 18 Apr 2020
avatar zero-24 zero-24 - change - 19 Apr 2020
Labels Added: ? ? ?
avatar zero-24
zero-24 - comment - 19 Apr 2020

Thanks @Quy

avatar zero-24
zero-24 - comment - 21 Apr 2020

Thanks merged @Quy

avatar Quy
Quy - comment - 25 May 2020

Please fix conflicts.

avatar zero-24
zero-24 - comment - 26 May 2020

Done @Quy

avatar zero-24
zero-24 - comment - 20 Jun 2020

Any blockers other than testing at this point?

avatar richard67
richard67 - comment - 21 Jun 2020

@zero-24 I see no blocker and just wanted to test, but I've noticed that Drone status is not ok here, it is hanging on "Waiting for status to be reported". I have no idea why, the branch seems not to have any conflicts to the 4.0-dev branch of the CMS.

avatar richard67
richard67 - comment - 21 Jun 2020

@zero-24 Maybe you can fix the hanging drone by updating your branch to latest 4.0-dev?

avatar zero-24
zero-24 - comment - 26 Jun 2020

Done @richard67

avatar jmeintrup jmeintrup - test_item - 4 Aug 2020 - Tested successfully
avatar jmeintrup
jmeintrup - comment - 4 Aug 2020

I have tested this item successfully on 72ba37c


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28724.

avatar zero-24
zero-24 - comment - 25 Aug 2020

Drone is ok nowdays so nothing bocks testing here right @richard67 ? Maybe @Quy can mark a test as the last commits where just branch updates the test by @jmeintrup still stands.

avatar Quy
Quy - comment - 28 Aug 2020

Is script-dynamic dependent on Nonce and/or Script hashes being enabled?

avatar zero-24
zero-24 - comment - 28 Aug 2020

Is script-dynamic dependent on Nonce and/or Script hashes being enabled?

I dont think that it is a hard requiremet but suggested for sure.

avatar Quy
Quy - comment - 28 Aug 2020

How about make it like frame-ancestors so you don't have to add an entry for it?

avatar zero-24
zero-24 - comment - 28 Aug 2020

How about make it like frame-ancestors so you don't have to add an entry for it?

I think it should be an informed decision to enable script-dynamic or not.

avatar Quy
Quy - comment - 28 Aug 2020

My suggestion is to keep the script-dynamic switch. If enabled, strict-dynamic will be added.

avatar zero-24
zero-24 - comment - 28 Aug 2020

Agree that should be the case right now? Or I'm missing something?

avatar Quy
Quy - comment - 28 Aug 2020

I assume you have to add a Directive entry to activate it.

avatar zero-24
zero-24 - comment - 28 Aug 2020

I assume you have to add a Directive entry to activate it.

Ah i get where you are comming from. frame-ancestors can be compared to script-src in that case it is selfcontained. scrypt-dynamic should be passed as part of the script-src directive.

avatar Quy
Quy - comment - 28 Aug 2020

I am new to CSP so I don't understand it fully, however, I think Yes to your assessment.

avatar zero-24
zero-24 - comment - 28 Aug 2020

I am new to CSP so I don't understand it fully, however, I think Yes to your assessment.

no problem feel free to ask when questions like that come up :)

avatar opn365 opn365 - test_item - 17 Oct 2020 - Tested unsuccessfully
avatar opn365
opn365 - comment - 17 Oct 2020

I have tested this item 🔴 unsuccessfully on 64897e8

the test says : notice there is no script-dynamic setting, the option in j4 says strict-dynamic
so either one or the other is inconsistent (script- or strict- ... which one? )


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28724.

avatar zero-24 zero-24 - change - 17 Oct 2020
The description was changed
avatar zero-24 zero-24 - edited - 17 Oct 2020
avatar zero-24
zero-24 - comment - 17 Oct 2020

@opn365 this has been patched in the description now. It was an typo in the description please retest.

avatar opn365 opn365 - test_item - 17 Oct 2020 - Tested successfully
avatar opn365
opn365 - comment - 17 Oct 2020

I have tested this item successfully on 02826b8

Test successful after description update


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28724.

avatar Bodge-IT
Bodge-IT - comment - 17 Oct 2020

@zero-24 during test the new option in the com_csp is not appearing. something i'm missing?

avatar zero-24
zero-24 - comment - 17 Oct 2020

@zero-24 during test the new option in the com_csp is not appearing. something i'm missing?

hmm can you show me the options screen? And please double check that the correct PR was applied.

avatar Bodge-IT
Bodge-IT - comment - 17 Oct 2020

image
@zero-24 pr correct as first section of test works

avatar zero-24
zero-24 - comment - 17 Oct 2020

@zero-24 pr correct as first section of test works

please enable that option and configure "auto" or "custom" mode to see the new option.

avatar Bodge-IT
Bodge-IT - comment - 17 Oct 2020

@zero-24 pr correct as first section of test works

please enable that option and configure "auto" or "custom" mode to see the new option.

OK, got to the setting, activated it and tested on https://csp-evaluator.withgoogle.com/%7C
getting:
image

avatar zero-24
zero-24 - comment - 17 Oct 2020

OK, got to the setting, activated it and tested on https://csp-evaluator.withgoogle.com/%7C
getting:

Have you setup the script-src and object-src? What are the settings from the component?

avatar Bodge-IT
Bodge-IT - comment - 17 Oct 2020

OK, better question how do I check for "the generated csp header."

avatar richard67
richard67 - comment - 17 Oct 2020

@Bodge-IT In development tools of your browser, network analysis, then inspect the header of the packet. It's something for nerds ;-)

avatar Bodge-IT
Bodge-IT - comment - 17 Oct 2020

thanks @richard67 ,

referrer-policy | strict-origin-when-cross-origin

This what I'm looking for? Am new to CSP.

avatar richard67
richard67 - comment - 17 Oct 2020

referrer-policy | strict-origin-when-cross-origin

This what I'm looking for? Am new to CSP.

At this point @zero-24 can help netter than I do.

avatar zero-24
zero-24 - comment - 17 Oct 2020

This what I'm looking for? Am new to CSP.

Conent-security-poliy(-report-only)

Can you please post the settings you made?

avatar Bodge-IT
Bodge-IT - comment - 17 Oct 2020

com_csp:
image

avatar Bodge-IT
Bodge-IT - comment - 17 Oct 2020

Plugin:
image

avatar Bodge-IT
Bodge-IT - comment - 17 Oct 2020

headers:
image

avatar richard67
richard67 - comment - 17 Oct 2020

@Bodge-IT In your screenshot of the headers I see: "report-to: csp-endpoint". That's one of the headers added by this PR, so success for this point.

For the second point the strict-dynamic option option, your screenshot with the com_csp options shows that this option is there. So success also for this point.

@zero-24 Am I right? Or am I missing something?

avatar zero-24
zero-24 - comment - 17 Oct 2020

@zero-24 Am I right? Or am I missing something?

Yes @Bodge-IT in custom mode you can actually also add a custom rule ("last option") with script-src and some value and notice that the CSP header has that key value as well as script-dynamic.

avatar Bodge-IT
Bodge-IT - comment - 17 Oct 2020

I get this:
image

avatar zero-24
zero-24 - comment - 17 Oct 2020

Ok found the issue please re apply this PR (revert and than apply again via patchtester) or manually apply this changes here: 304c468

avatar Bodge-IT
Bodge-IT - comment - 17 Oct 2020

Boom:
image

Will reset @opn365 test and request new additional test

Thanks for your support...

avatar zero-24
zero-24 - comment - 17 Oct 2020

Thanks 👍

avatar Bodge-IT
Bodge-IT - comment - 17 Oct 2020

Do we need to get tests reset?

@zero-24, can you tweak test instructions to advise what we're looking for in headers?

avatar richard67
richard67 - comment - 17 Oct 2020

@Bodge-IT No need for reset, that happens automatically on GitHub with a new commit. In the tracker you might not see that. But it's here on GitHub which counts.

@opn365 Could you re apply this PR (revert, then fetch again patches and than apply again via patchtester if using patchtester, or pulling latest changes when using a git client) and then repeat your test? There have been changes made in this PR. Thanks in advance, and thanks for the previous test.

avatar zero-24 zero-24 - change - 17 Oct 2020
The description was changed
avatar zero-24 zero-24 - edited - 17 Oct 2020
avatar zero-24
zero-24 - comment - 17 Oct 2020

@zero-24, can you tweak test instructions to advise what we're looking for in headers?

Done thanks

avatar Bodge-IT Bodge-IT - test_item - 17 Oct 2020 - Tested successfully
avatar Bodge-IT
Bodge-IT - comment - 17 Oct 2020

I have tested this item successfully on 80d1e1b

Checked options and headers...all good.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28724.

avatar flo-the-cat flo-the-cat - test_item - 17 Oct 2020 - Tested successfully
avatar flo-the-cat
flo-the-cat - comment - 17 Oct 2020

I have tested this item successfully on 80d1e1b

Was easy as pie to follow, once Gary added all the screen shots!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28724.

avatar Bodge-IT
Bodge-IT - comment - 17 Oct 2020

Pulled in Phil to get this done...

avatar richard67
richard67 - comment - 17 Oct 2020

Pulled in Phil to get this done...

Seems he did not have time and has sent his cat instead ;-)

avatar richard67 richard67 - change - 17 Oct 2020
Status Pending Ready to Commit
avatar richard67 richard67 - edited - 17 Oct 2020
avatar richard67
richard67 - comment - 17 Oct 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28724.

avatar rdeutz rdeutz - change - 27 Oct 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-10-27 12:40:02
Closed_By rdeutz
avatar rdeutz rdeutz - close - 27 Oct 2020
avatar rdeutz rdeutz - merge - 27 Oct 2020

Add a Comment

Login with GitHub to post a comment