-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protect: WAF Phase 3 #28046
Protect: WAF Phase 3 #28046
Conversation
…nual rules independantly
…d hooks regardless if rules are enabled or not
…onstants to be set outside of WP context
…no plan available
This reverts commit 730b430.
15e58b8
to
a6367b5
Compare
* Initialize project branch * Protect: Add WAF package (#27530) * Protect: Clean up components (#27256) * Protect: Add routing and blank Firewall page (#27245) * Protect: Add Tabbed Navigation (#27259) * Protect: Add "new" badge for users who have never viewed the Firewall tab (#27265) * Protect: Add useWafData hook (#27307) * Add: Protect WAF header (#27279) * Add hook for interfacing with WAF data * [not verified] Add firewall-header component folder structure * [not verified] Apply header component code and styling * [not verified] Remove unneeded comments * [not verified] Update hasRequiredPlan check to useProtectData * [not verified] Fix typo * Add FirewallHeader component stories and improve portability * Add useWafData hook placeholder for moduleIsEnabled check * [not verified] Remove isModuleEnabled property in favor of currently available WAF data * [not verified] Remove console logging * [not verified] Add upgrade functionality to button * [not verified] Add Popover component for upgrade info * Fix styling issues * Create ConnectedFirewallHeader component and move all logic out of FirewallPage * Improve code efficiency * Update FirewallHeader status check, and checkout flow redirect URL * changelog * [not verified] Remove changelog entry * Change FirewallUrl to firewallUrl Co-authored-by: Nate Weller <nate.weller@automattic.com> * Protect: Add WAF footer (#27280) * Add hook for interfacing with WAF data * [not verified] Add firewall-header component folder structure * [not verified] Apply header component code and styling * [not verified] Remove unneeded comments * [not verified] Update hasRequiredPlan check to useProtectData * [not verified] Fix typo * Add FirewallHeader component stories and improve portability * Add useWafData hook placeholder for moduleIsEnabled check * [not verified] Remove isModuleEnabled property in favor of currently available WAF data * [not verified] Remove console logging * [not verified] Add upgrade functionality to button * [not verified] Add Popover component for upgrade info * Introduce and apply FirewallFooter component * Add central AdminSection component for better visualization * Improve spacing * [not verified] Apply initial run at StandaloneModeModal component * [not verified] Update Footer component to ScanFooter * [not verified] Improve StandaloneModeModal structure and styling * [not verified] Add FirewallFooter stories * [not verified] Update FirewallFooter to use SeventyFiveLayout * [not verified] Update styling comments * Fix styling issues * Create ConnectedFirewallHeader component and move all logic out of FirewallPage * Improve code efficiency * Update FirewallHeader status check, and checkout flow redirect URL * changelog * [not verified] Remove changelog entry * Change FirewallUrl to firewallUrl * Fix styling issues Co-authored-by: Nate Weller <nate.weller@automattic.com> * Fix composer.json * Changelog * Protect: Add upgrade prompt while WAF enabled with no rules access (#27584) * Add upgrade prompt when WAF enabled but no rules access * Create separate internal component for upgrade prompt * Add story for on with no plan * WAF: Remove has_rules_access in favour of external checks (#27479) * [not verified] Update WAF package to use portable Current_Plan over Jetpack_Plan for upgrade detection * Add jetpack-plans dependency direct to the WAF package * Add and use hasScan (over hasRulesAccess) check in Jetpack settings for the WAF module * Remove hasRulesAccess property from WAF module component * Remove has_rules_access method in favour of external plan checks * Protect: Add Basic WAF Controls (#27291) * Update Protect to version 1.2.0-alpha * Protect: WAF share data toggle (#27577) * [not verified] Add jetpack_waf_share_data option value to initial state, and use for checked value * [not verified] Remove comments * [not verified] Remove prior solution in favor of WAF endpoints solution and apply toggleShareData functionality to FirewallFooter checkbox * [not verified] Improve share data toggle functionality * [not verified] Improve code organization * [not verified] Add isEnabled check for share data section display * Remove wafShareData from initial state Co-authored-by: Nate Weller <nate.weller@automattic.com> * Changelogs * Remove outdated TODO comment * Protect: Add notices to the Firewall screen (#27621) * Fix invalid HTML - pre cannot be a child of p * Fix notice duration timeout * Remove manual WAF initialization * Register REST routes on WAF init * Create foundation for automatic and manual rules usage separation * Update naming * Update WAF after settings have changed * Add action for tracking initial WAF setup and use for loading header display, swap wording of WAF loading and updating actions, remove redundant actions from useWafData * Remove comments and testing code * Minor updates to pending conditional checks * Add Now Available badge to automatic rules section and an action to check whether the WAF has been toggled since the upgrade * Add popover for upgrade notice regarding automatic rules, assign same conditional as new feature badge * Add option to temporarily dismiss the popover only, rather than permanently remove both popover and new feature badge * Improve variable naming * Revert changes to useWafData hook usage of setWafIsUpdating (previously setWafIsLoading) * Add/remove styling comments * Update tracks events in Jetpack Protect (#27659) * Initialize project branch * Initialize project branch * Update mock data to include WAF properties * Update FirewallHeader component to export sub component and import for story usage * Improve upgrade popover and badge logic and handling * Improve upgrade popover and badge logic and handling * Remove auto vs manual toggle separation and upgrade messaging * Delete old changelog entries * Remove endpoints for upgrade messaging * Remove upgrade messaging endpoints, handling, and content * Remove state handlers for seen upgrade * Remove unneeded comments * Fix footer styling issues in mobile when WAF module not enabled * Remove unneeded comments * Add endpoints, methods, actions and handling for post upgrade messaging * Extract JETPACK_SCAN variable to constants file * Update automatic rules toggle to connect to correlated waf setting * Ensure module is enabled before attempting to update settings * Show a notice when the waf module is disabled * [not verified] Activate WAF module on plugin activation * Disable WAF controls when the module is disabled * Document and organize FirewallPage * Include automatic rules in default formState object * Update styles * Remove CurrentlyEnabledFeatures * Fix saving of automatic rules option in endpoint * Remove testing code * Revert Boost changes introduced in merge * [not verified] Revert Boost changes forced by commit actions * Initialize project branch * [not verified] Revert unrelated masterbar changes auto-merged * Fix indentation * Improve organization and efficiency * Remove unneeded REST_Controller class methods, and apply class and styling suggestions Co-authored-by: Nate Weller <nate.weller@automattic.com>
* Add a class for communicating with wpcom to retrieve WAF stats * changelog * Add further Waf_Stats methods for available items * Add further Waf_Stats methods for available items * Update get_rules_last_updated to supply a usable date over a timestamp * Add realistic placeholder for blockedRequest stats * Initialize project branch * Align arrows, revert unrelated masterbar changes auto-merged * [not verified] Revert unrelated masterbar changes auto-merged * Update get_waf_stats to use new automatic rules last update timestamp * Update function call accordingly * Update Waf_Stats IP list counter methods to consider the possibility that the options aren't yet set * Update Waf_Stats methods and Protect initial state * Introduce get_waf_stats main plugin class method for better initial state organization * Remove all blocked requests related code * Update snake_case to camelCase for WAF stats array keys * Return timestamp or false for automatic rules last updated stat
Are you an Automattician? You can now test your Pull Request on WordPress.com. On your sandbox, run |
We are going to delay the work on the following tasks, while we work on a new solution to where we store the stats:
I'm going to approve this branch and merge it into our Phase 2 PR 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Project branch for adding the third iteration of the WAF integration in Jetpack Protect.
Changes proposed in this Pull Request:
Other information:
Jetpack product discussion
peb6dq-4G-p2
Does this pull request change what data or activity we track or use?
TBD
Testing instructions: