Skip to content
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

Sync firewall options #37957

Merged
merged 6 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions projects/packages/sync/changelog/add-waf-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: added

Add support for syncing Jetpack WAF options.
2 changes: 1 addition & 1 deletion projects/packages/sync/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"link-template": "https://github.com/Automattic/jetpack-sync/compare/v${old}...v${new}"
},
"branch-alias": {
"dev-trunk": "3.3.x-dev"
"dev-trunk": "3.4.x-dev"
},
"dependencies": {
"test-only": [
Expand Down
7 changes: 7 additions & 0 deletions projects/packages/sync/src/class-defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@ class Defaults {
'jetpack_package_versions',
'jetpack_newsletters_publishing_default_frequency',
'jetpack_scheduled_plugins_update',
'jetpack_waf_automatic_rules',
'jetpack_waf_ip_allow_list',
'jetpack_waf_ip_allow_list_enabled',
'jetpack_waf_ip_block_list',
'jetpack_waf_ip_block_list_enabled',
'jetpack_waf_share_data',
'jetpack_waf_share_debug_data',
nateweller marked this conversation as resolved.
Show resolved Hide resolved
nateweller marked this conversation as resolved.
Show resolved Hide resolved
nateweller marked this conversation as resolved.
Show resolved Hide resolved
);

/**
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/sync/src/class-package-version.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class Package_Version {

const PACKAGE_VERSION = '3.3.1';
const PACKAGE_VERSION = '3.4.0-alpha';

const PACKAGE_SLUG = 'sync';

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Updated composer.lock.


4 changes: 2 additions & 2 deletions projects/plugins/automattic-for-agencies-client/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions projects/plugins/backup/changelog/add-sync-waf-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Updated composer.lock.


4 changes: 2 additions & 2 deletions projects/plugins/backup/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions projects/plugins/boost/changelog/add-sync-waf-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Updated composer.lock.


4 changes: 2 additions & 2 deletions projects/plugins/boost/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions projects/plugins/jetpack/changelog/add-sync-waf-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: other
Comment: Updated composer.lock.


Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: other

WPCOM Settings API: Add synced options from Jetpack WAF.
4 changes: 2 additions & 2 deletions projects/plugins/jetpack/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@
'jetpack_subscriptions_login_navigation_enabled' => '(bool) Whether the Subscriber Login block navigation placement is enabled',
'jetpack_subscriptions_subscribe_navigation_enabled' => '(Bool) Whether the Subscribe block navigation placement is enabled',
'wpcom_ai_site_prompt' => '(string) User input in the AI site prompt',
'jetpack_waf_automatic_rules' => '(bool) Whether the WAF should enforce automatic firewall rules',
'jetpack_waf_ip_allow_list' => '(string) List of IP addresses to always allow',
'jetpack_waf_ip_allow_list_enabled' => '(bool) Whether the IP allow list is enabled',
'jetpack_waf_ip_block_list' => '(string) List of IP addresses the WAF should always block',
'jetpack_waf_ip_block_list_enabled' => '(bool) Whether the IP block list is enabled',
'jetpack_waf_share_data' => '(bool) Whether the WAF should share basic data with Jetpack',
'jetpack_waf_share_debug_data' => '(bool) Whether the WAF should share debug data with Jetpack',
'jetpack_waf_automatic_rules_last_updated_timestamp' => '(int) Timestamp of the last time the automatic rules were updated',
),

'response_format' => array(
Expand Down Expand Up @@ -480,6 +488,14 @@ function ( $newsletter_category ) {
'jetpack_comment_form_color_scheme' => (string) get_option( 'jetpack_comment_form_color_scheme' ),
'in_site_migration_flow' => (string) get_option( 'in_site_migration_flow', '' ),
'migration_source_site_domain' => (string) get_option( 'migration_source_site_domain' ),
'jetpack_waf_automatic_rules' => (bool) get_option( 'jetpack_waf_automatic_rules' ),
'jetpack_waf_ip_allow_list' => (string) get_option( 'jetpack_waf_ip_allow_list' ),
'jetpack_waf_ip_allow_list_enabled' => (bool) get_option( 'jetpack_waf_ip_allow_list_enabled' ),
'jetpack_waf_ip_block_list' => (string) get_option( 'jetpack_waf_ip_block_list' ),
'jetpack_waf_ip_block_list_enabled' => (bool) get_option( 'jetpack_waf_ip_block_list_enabled' ),
'jetpack_waf_share_data' => (bool) get_option( 'jetpack_waf_share_data' ),
'jetpack_waf_share_debug_data' => (bool) get_option( 'jetpack_waf_share_debug_data' ),
'jetpack_waf_automatic_rules_last_updated_timestamp' => (int) get_option( 'jetpack_waf_automatic_rules_last_updated_timestamp' ),
nateweller marked this conversation as resolved.
Show resolved Hide resolved
);

if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,14 @@ public function test_sync_default_options() {
'jetpack_package_versions' => array(),
'jetpack_newsletters_publishing_default_frequency' => 'weekly',
'jetpack_scheduled_plugins_update' => array(),
'jetpack_waf_automatic_rules' => false,
'jetpack_waf_ip_allow_list' => 'pineapple',
'jetpack_waf_ip_allow_list_enabled' => false,
'jetpack_waf_ip_block_list' => 'pineapple',
'jetpack_waf_ip_block_list_enabled' => false,
'jetpack_waf_share_data' => true,
'jetpack_waf_share_debug_data' => false,
'jetpack_waf_automatic_rules_last_updated_timestamp' => 0,
);

$theme_mod_key = 'theme_mods_' . get_option( 'stylesheet' );
Expand Down
5 changes: 5 additions & 0 deletions projects/plugins/migration/changelog/add-sync-waf-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Updated composer.lock.


4 changes: 2 additions & 2 deletions projects/plugins/migration/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Updated composer.lock.


4 changes: 2 additions & 2 deletions projects/plugins/mu-wpcom-plugin/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions projects/plugins/protect/changelog/add-sync-waf-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Updated composer.lock.


4 changes: 2 additions & 2 deletions projects/plugins/protect/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions projects/plugins/search/changelog/add-sync-waf-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Updated composer.lock.


4 changes: 2 additions & 2 deletions projects/plugins/search/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions projects/plugins/social/changelog/add-sync-waf-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Updated composer.lock.


4 changes: 2 additions & 2 deletions projects/plugins/social/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Updated composer.lock.


4 changes: 2 additions & 2 deletions projects/plugins/starter-plugin/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions projects/plugins/videopress/changelog/add-sync-waf-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Updated composer.lock.


4 changes: 2 additions & 2 deletions projects/plugins/videopress/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions projects/plugins/wpcomsh/changelog/add-sync-waf-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Updated composer.lock.


2 changes: 1 addition & 1 deletion projects/plugins/wpcomsh/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"composer/installers": true,
"roots/wordpress-core-installer": true
},
"autoloader-suffix": "26841ac2064774301cbe06d174833bfc_wpcomshⓥ5_0_3"
"autoloader-suffix": "26841ac2064774301cbe06d174833bfc_wpcomshⓥ5_0_4_alpha"
},
"extra": {
"mirror-repo": "Automattic/wpcom-site-helper",
Expand Down
4 changes: 2 additions & 2 deletions projects/plugins/wpcomsh/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion projects/plugins/wpcomsh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "@automattic/jetpack-wpcomsh",
"description": "A helper for connecting WordPress.com sites to external host infrastructure.",
"homepage": "https://jetpack.com",
"version": "5.0.3",
"version": "5.0.4-alpha",
"bugs": {
"url": "https://github.com/Automattic/jetpack/labels/[Plugin] Wpcomsh"
},
Expand Down
Loading
Loading