Problem/Motivation

In #3039120: Create initial feature to display relevant PSA data in Drupal, we built the code to displays a PSA. But the live feed and URL isn't known yet. Once that is available, let's update the default config with it.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

heddn created an issue. See original summary.

heddn’s picture

Status: Active » Postponed
AaronMcHale’s picture

Is there a corresponding issue for implementing the relevant end point? If so we should link it here.

heddn’s picture

mlhess is working on it. I'm not sure if he's opened an issue we can link to.

drumm’s picture

heddn’s picture

Take the PHP arrays in https://git.drupalcode.org/project/automatic_updates/blob/8.x-1.x/tests/... and json_encode them.

[{"title":"Critical Release - PSA-2019-02-19","link":"https:\/\/www.drupal.org\/psa-2019-02-19","project":"core","extensions":[],"type":"module","secure_versions":["7.99","8.10.99","8.9.99","8.8.99","8.7.99","8.6.99","8.5.99"],"pubDate":"Tue, 19 Feb 2019 14:11:01 +0000"},{"title":"Critical Release - PSA-Really Old","link":"https:\/\/www.drupal.org\/psa","project":"core","extensions":[],"type":"module","secure_versions":["7.0","8.4.0"],"pubDate":"Tue, 19 Feb 2019 14:11:01 +0000"},{"title":"Node - Moderately critical - Access bypass - SA-CONTRIB-2019","link":"https:\/\/www.drupal.org\/sa-contrib-2019","project":"node","extensions":["node"],"type":"module","secure_versions":["7.x-7.22","8.x-8.2.0"],"pubDate":"Tue, 19 Mar 2019 12:50:00 +0000"},{"title":"Standard - Moderately critical - Access bypass - SA-CONTRIB-2019","link":"https:\/\/www.drupal.org\/sa-contrib-2019","project":"Standard Install Profile","extensions":["standard"],"type":"profile","secure_versions":["8.x-8.10.99"],"pubDate":"Tue, 19 Mar 2019 12:50:00 +0000"},{"title":"Seven - Moderately critical - Access bypass - SA-CONTRIB-2019","link":"https:\/\/www.drupal.org\/sa-contrib-2019","project":"seven","extensions":["seven"],"type":"theme","secure_versions":["8.x-8.10.99"],"pubDate":"Tue, 19 Mar 2019 12:50:00 +0000"},{"title":"Foobar - Moderately critical - Access bypass - SA-CONTRIB-2019","link":"https:\/\/www.drupal.org\/sa-contrib-2019","project":"foobar","extensions":["foobar"],"type":"foobar","secure_versions":["8.x-1.2"],"pubDate":"Tue, 19 Mar 2019 12:50:00 +0000"},{"title":"Token - Moderately critical - Access bypass - SA-CONTRIB-2019","link":"https:\/\/www.drupal.org\/sa-contrib-2019","project":"token","extensions":["token"],"type":"module","secure_versions":["7.x-1.7","8.x-1.5"],"pubDate":"Tue, 19 Mar 2019 12:50:00 +0000"}]

heddn’s picture

Assigned: Unassigned » mlhess

Assigning to Michael to work on this week.

heddn credited mlhess.

heddn’s picture

Assigned: mlhess » Unassigned
Status: Postponed » Needs review
FileSize
14.69 KB

Apply patch attached here.

Then to test w/ the new dummy end-point:
\Drupal::configFactory()->getEditable('automatic_updates.settings')->set('psa_endpoint', 'https://drupal:drupal@mlhsec-drupal.dev.devdrupal.org/files/release-history/psa.json')->save();

Or enable the test_automatic_updates module. If the site isn't setup to use localhost, you might have to change it from the defaults of http://localhost/automatic_updates/test-json

heddn’s picture

Feedback desired on the wording and messaging if a PSA or SA is published. How would you like to see these things rendered?

They are currently rendered on admin pages and the system status page.

tatarbj’s picture

FileSize
14.72 KB

I just rerolled the patch on the latest head.

tatarbj’s picture

For all who's gonna test it, this is how you can do it:
- Get the latest version of the code, apply the patch (another reroll might be needed)
- Edit automatic_updates.settings_yml and change psa_endpoint to the dummy one (see #3045273-9: Add real endpoint after drupal.org provides a live feed)
- Enable the module. (If you had it enabled before, uninstall it and enable it again).
- Then navigate to admin/config/automatic_updates path and see how it looks like.
- Say your words :)

tatarbj’s picture

My 2 cents here is to add a link to all PSAs either by making the header a link or under the listed ones say 'For all PSA visit https://www.drupal.org/security/psa' - also about wording, let's follow the Drupal Security Team's standard one and making the P capital everywhere.

tatarbj’s picture

FileSize
19.21 KB

The mentioned things are implemented in my patch to get an improved version just in case.

tatarbj’s picture

FileSize
18.57 KB

Sorry, the dummy endpoint stayed in my previous patch, here is the correct one.

tatarbj’s picture

FileSize
5.05 KB

As @heddn asked in slack, here is the interdiff between 11 and 15 (11 is a reroll on 9).

heddn’s picture

Thanks for your review. A couple questions to ponder...

  1. +++ b/templates/automatic-updates-psa-notify.html.twig
    @@ -21,12 +21,13 @@
    -<p>{{ 'Drupal public service announcements:'|t }}</p>
    

    Do we want to keep or remove the word "Drupal"? The reason to add it is to distinguish in the inbox or site from other PSAs that might be rendered.

  2. +++ b/templates/automatic-updates-psa-notify.html.twig
    @@ -21,12 +21,13 @@
    +<p>For all PSA visit <a href="https://www.drupal.org/security/psa" target="_blank">https://www.drupal.org/security/psa</a>.</p>
    

    Perhaps it would read more clearly,
    "To see all PSAs, visit..."

tatarbj’s picture

About point no1: is there any plans to use that twig for rendering other things rather than just on a drupal site (emails, i might think of). If not, I wouldn't put there the 'Drupal' word as everyone gets it :)

tatarbj’s picture

FileSize
18.57 KB
669 bytes

Implementing @heddn no2 point in the next patch (with interdiff between #15 and current one attached).

heddn’s picture

So, 17.2 is addressed and 17.1 is fine. Any other feedback?

catch’s picture

Status: Needs review » Reviewed & tested by the community

This looks ready to go to me, agreed with removing 'Drupal' from the text.

  • heddn committed 650696a on 8.x-1.x authored by tatarbj
    Issue #3045273 by tatarbj, heddn, mlhess, catch: Add real endpoint after...
heddn’s picture

Status: Reviewed & tested by the community » Fixed
heddn’s picture

Status: Fixed » Needs work

This needs backported to D7.

heddn’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev
drumm’s picture

https://updates.drupal.org/psa.json is now live. It is currently hard-coded to just contain []. The implementation of the format will be in #3068539: Add psa.json API endpoint to support automatic updates.

heddn’s picture

Status: Needs work » Needs review
FileSize
1.23 KB

Small change to test for null on json decoding. But otherwise, pretty simple stuff here.

heddn’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
heddn’s picture

Wrong branch

  • heddn committed ac2e5a7 on 8.x-1.x
    Issue #3045273 by tatarbj, heddn, mlhess, catch: Add real endpoint after...
heddn’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Needs work
Issue tags: +Needs manual testing

This seems trivial enough, let's just move to committing. And we will need a patch for 7.x.

heddn’s picture

Status: Needs work » Needs review

We're also missing all the feedback from earlier in this issue that landed in #22. But let's throw up the easy patch first.

heddn’s picture

And since I seem to have missed uploading the patch for #32, doing that now as well as a new one that covers the string changes from #22. Still need to do some manual testing to make sure the test feed works as expected.

heddn’s picture

FileSize
15.71 KB
1.95 KB
heddn’s picture

FileSize
3.9 KB
17.59 KB

  • heddn committed 9d66fbf on 7.x-1.x
    Issue #3045273 by heddn, tatarbj, mlhess, catch: Add real endpoint after...
heddn’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.