Shake Connect

説明

Shake Connect は、wpshake.com の WPShake ダッシュボード向けのサイト側コンパニオンです。監視したい各 WordPress サイトにインストールし、プラグインの設定画面に表示される接続トークンを使って WPShake アカウントにサイトを追加します。その後、ダッシュボードが接続済みの全サイトに対して日次チェックを実行するため、各サイトに個別にログインする必要はありません。

Shake Connect がこのサイトに追加するもの

  • WPShake ダッシュボードがサイトの状態を読み取るために呼び出す、ベアラートークン認証の REST API (/wp-json/wpshake/v1/*)。
  • 次のエンドポイント: 利用可能な更新付きのプラグインおよびテーマ一覧、コア情報、WP チェックサム、データベースの健全性、WooCommerce がインストールされている場合は最近の WooCommerce 注文、WP_DEBUG_LOG からの最近の PHP エラー、バックアッププラグインの検出 (UpdraftPlus、BlogVault、BackWPup、Solid Backups、WPvivid、Duplicator)、アクティビティログ連携 (WP Activity Log プラグインのテーブルがある場合に読み取り)、組み込みのマルウェアシグネチャスキャナー、リンク切れチェッカー。
  • 安全な操作に限定したメンテナンスエンドポイント: 主要なキャッシュ系プラグイン全体のキャッシュクリア、期限到来した WP-Cron の実行、期限切れトランジェントのクリーンアップ、パーマリンクの再構築。
  • トークンのローテーションと状態確認用の WP-CLI サブコマンド wp wpshake。

Activity log

Shake Connect records who did what on the site and keeps it in its own database tables. Open it from the Activity log menu in the WordPress admin.

  • Sign-ins, failed logins, user and role changes, application passwords, plugin, theme and core changes, settings, menus, widgets, cron and file edits.
  • Posts, pages, custom post types, media and terms, with the fields that changed.
  • WooCommerce orders, products, coupons, stock and store settings when WooCommerce is active.
  • Yoast SEO, Rank Math, Redirection, ACF, Gravity Forms, WPForms, TablePress, Termly, Two Factor, bbPress, LearnDash, MemberPress, Paid Memberships Pro and MainWP when those plugins are active.
  • A log viewer with filters, saved searches, notes, CSV and JSON export, and a dashboard widget.
  • A list of logged-in users, with the option to end a session and to limit how many sessions each role may hold.
  • Scheduled email reports.
  • Copies of the log to a local file or to a destination you choose: syslog, Papertrail, Loggly, Slack, AWS CloudWatch Logs, an HTTPS webhook or an external MySQL database.
  • Events made by AI agents and automation tools are tagged with the agent behind them.
  • A setup wizard, retention settings, and wp shake activity commands for WP-CLI.

Once the site is connected to WPShake, the dashboard also keeps an off-site copy of the log.

接続の仕組み

  1. Shake Connect をインストールして有効化します。
  2. WordPress 管理画面の「設定 Shake Connect」を開き、接続トークンを生成します。トークンは一度だけ表示されます。
  3. wpshake.com でサインアップし、「サイトを追加」をクリックして、トークンとサイト URL を貼り付けます。
  4. ダッシュボードが初回ハンドシェイクを行い、サイトの状態を取得します。

トークンはこのサイト上に SHA-256ハッシュとして保存されます。ダッシュボードはすべてのリクエストで平文のトークンを Authorization: Bearer ヘッダーに送信します。認証付きのすべてのエンドポイントは、処理前にそのヘッダーを検証します。

代理店向けに設計

WordPress サイトを数件以上運用しているなら、その手間はすでにご存じでしょう。Shake Connect は、管理下のサイト群に対する日次チェックを担うエージェントの受信側です。バックアップの検証、プラグインとテーマの更新状況の可視化、脆弱性スキャン、パフォーマンス計測、PHP エラー監視、リンク切れチェック、そしてサイトごとに何を更新し何を見送るべきかの推奨を行います。

WPShake ダッシュボードは別の有料サービスです。このコネクタープラグインは無料のオープンソースで、GPL の下で提供されます。

マルチサイト

Shake Connect は WordPress マルチサイトに対応しています。プラグインをネットワーク有効化すると、接続トークンはネットワークレベルで保存され、すべてのサブサイトが同じ認証情報を共有します。/network/sites でサブサイトを列挙し、サイト単位の読み取りエンドポイントに ?blog_id=N を渡すと (例: /site/info?blog_id=3 や /plugins?blog_id=3)、各サブサイトを確認できます。blog_id がない場合、リクエストはメインサイトに対して実行されます。列挙は1回の呼び出しあたり最大500サブサイトまでです。

External services

Shake Connect contacts the services below. Each one is either the WPShake dashboard you connect the site to, or a destination you add yourself.

WPShake dashboard

The site sends activity log events to WPShake so the dashboard keeps an off-site copy of the log. This starts only after you connect the site to your WPShake account and the dashboard sets up the connection with your bearer token. Events are sent at the end of the page request that recorded them, and once a day for any the dashboard hasn’t confirmed. Each event holds its type and severity, the time, the user ID, username and roles, the visitor’s IP address and browser user agent, the affected object’s type, ID and name, the subsite ID and a few event-specific details. Requests go to the WPShake ingest address the dashboard provides (for example https://ingest.example.com/activity) and are signed with a key shared during setup.

Service: wpshake.com. Terms of service, privacy policy.

Log mirrors you configure

Under Activity log, Mirrors, you can copy the log to destinations of your own. Nothing is sent until you add one. Each mirror receives the same event fields as above, plus the site address and a readable message. A background job sends new events about once a minute.

  • Papertrail: syslog messages over TLS or UDP to the host and port from your Papertrail account (for example logs.example.com:12345). Terms, privacy.
  • Loggly: HTTPS requests to https://logs-01.loggly.com/bulk/, with your customer token. Terms, privacy.
  • Slack: messages listing each event’s severity, description, username and type, sent to the incoming webhook URL you enter (for example https://hooks.slack.com/services/T000/B000/XXXX). Terms, privacy.
  • AWS CloudWatch Logs: signed HTTPS requests to https://logs.<region>.amazonaws.com/ for the region, log group and stream you choose. Terms, privacy.
  • HTTPS webhook: JSON batches, signed with your secret, to the URL you enter (for example https://hooks.example.com/activity). The terms and privacy policy are those of whoever runs that address.
  • Syslog: messages over UDP, TCP or TLS to the server and port you enter (for example syslog.example.com:514). The terms are those of whoever runs that server.
  • External MySQL or MariaDB: rows written to a table in the database server you enter (for example db.example.com:3306). The terms are those of whoever runs that server.

Broken-link checks

When the WPShake dashboard asks for a link check, the site sends a HEAD request (or a GET, if the server refuses HEAD) to each link found in its own content, to read the response status. Only the URL is requested, nothing else is sent. These go to whichever sites your content links to. The Recheck now action in Tools > Broken Links sends the same request for one link when an editor clicks it. Addresses on private or internal networks are never requested.

When an editor dismisses or restores a link in Tools > Broken Links, the site also tells the WPShake dashboard, so both show the same list. The request goes to the WPShake ingest address (the same one as the activity log, with a different path) and is signed with the key shared during setup. It carries the site ID, the link URLs and the editor’s username. It is sent only after the dashboard has set up the connection.

Scheduled activity reports are emailed through this site’s own mail setup.

スクリーンショット

インストール

  1. shake-connect フォルダーを /wp-content/plugins/ ディレクトリにアップロードするか、WordPress のプラグイン画面から直接インストールします。
  2. WordPress の「プラグイン」画面からプラグインを有効化します。
  3. 「設定 Shake Connect」で接続トークンを生成します。
  4. wpshake.com でサインアップし (無料トライアルあり)、トークンを使ってサイトを追加してください。

FAQ

このプラグインは無料ですか ?

はい。このコネクタープラグインは無料で、GPL ライセンスです。WPShake ダッシュボードは無料トライアル付きの有料サービスです。コネクターはどの WPShake プランでも利用できます。

Where does my data go?

Site data stays on this site until the WPShake dashboard asks for it with a valid bearer token. Activity log events go to WPShake once the dashboard has set up the connection, and to any log destination you add yourself. The External services section lists each one.

プラグインを無効化するとどうなりますか ?

サイトはダッシュボードからのリクエストにすぐに応答しなくなります。接続トークンはハッシュとして保存されたままなので、プラグインを再有効化すると接続が復元されます。プラグインを削除すると、保存されていたトークンのハッシュも削除されます。

接続トークンをローテーションできますか ?

はい。プラグインの設定画面で「トークンをリセット」をクリックするか、WP-CLI から wp wpshake reset-token を実行してください。以前のトークンはすぐに無効になります。

どのバックアッププラグインを検出しますか ?

UpdraftPlus、BlogVault、BackWPup、Solid Backups (旧 BackupBuddy)、WPvivid、Duplicator。各プラグインが最終バックアップ時刻と状態を公開している場合、それらを表示します。

WooCommerce は必要ですか ?

いいえ。WooCommerce 関連のエンドポイントは、WooCommerce がインストールされていない場合に wc_active: false と空のリストを返します。プラグインのその他の機能は、どの WordPress サイトでも同様に動作します。

WP-CLI コマンドはありますか ?

Yes. wp shake exposes status, reset-token, and revoke subcommands for ops scripts, and wp shake activity reads and configures the activity log.

評価

このプラグインにはレビューがありません。

貢献者と開発者

Shake Connect はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。

貢献者

“Shake Connect” は4ロケールに翻訳されています。 翻訳者のみなさん、翻訳へのご協力ありがとうございます。

“Shake Connect” をあなたの言語に翻訳しましょう。

開発に興味がありますか ?

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログを RSS で購読してみてください。

変更履歴

0.8.0

  • Fix a broken link from Tools > Broken Links: “Edit URL” changes it in every post that uses it, “Unlink” removes the link and keeps its text, and bulk Unlink works on a selection. Each change is saved as a post revision, and posts you can’t edit are skipped and listed.
  • Edits only touch the links being fixed: every other part of a post stays as it was, including block settings for images, buttons and embeds.

0.7.0

  • Broken links in wp-admin: a new Tools > Broken Links screen lists broken links and warnings with the posts they appear in, with search, type filter, sorting and paging. Dismiss or restore links (one at a time or in bulk), recheck a link on the spot, and open the post to fix it. Editors and above can use it.
  • A “Broken links” dashboard widget shows the counts and the newest broken links, and the Tools menu item shows how many links are broken.
  • Link checks no longer request private or internal addresses. Every redirect hop is checked before it is followed, and links that point at such addresses are skipped instead of reported as broken.
  • Dismissing or restoring a link in wp-admin takes effect on this site at once and is passed on to WPShake, so the dashboard and rel=”nofollow” stay in step.

0.6.0

  • New activity log, recorded by the plugin itself: sign-ins, users, content, plugins, themes, settings, WooCommerce and popular SEO, forms and membership plugins.
  • Activity log viewer with filters, saved searches, notes, export and a dashboard widget.
  • Logged-in users screen with session limits per role.
  • Scheduled email reports.
  • Log mirrors: local file, syslog, Papertrail, Loggly, Slack, AWS CloudWatch Logs, HTTPS webhook and external MySQL.
  • Events from AI agents and automation tools are tagged with the agent.
  • Setup wizard and wp shake activity WP-CLI commands.
  • Connected sites send activity events to the WPShake dashboard. See External services.
  • Uninstalling removes the activity log tables, settings and files.
  • Link checker: timeouts, connection errors, 5xx and 429 are warnings until a link has failed 3 times over at least 24 hours (rechecked after 6 hours, then daily); 404 and other 4xx stay broken at once. Warnings never get rel=”nofollow”.
  • Link checker now also checks image sources (img src and the first srcset candidate) and plain-text URLs in post content, parsed with the WordPress HTML API. Only links (a href) are ever nofollowed.
  • Redirects are followed up to 5 hops and reported with their final URL instead of being treated as broken.
  • Links dismissed in the WPShake dashboard are no longer nofollowed. New POST /links/dismissed endpoint and a recheck_only parameter on /links/broken.
  • Requires WordPress 6.5 or newer (the link checker uses the HTML API token reader).

0.5.1

  • REST コントローラー内の不要なコアファイル require_once 呼び出し2件 (wp-admin/includes/file.php および wp-admin/includes/cron.php) を削除しました。使用していた関数は、それらなしでもすでに利用可能でした。

0.5.0

  • マルチサイト対応: Network: true ヘッダー、ネットワークレベルのトークン保存、サブサイト列挙用の新しい /network/sites エンドポイント (上限500)、個別サブサイトを照会する読み取りエンドポイント用の ?blog_id=N パラメーター。

0.1.0

  • WordPress.org への初回リリース。
  • 読み取りエンドポイント: plugins、themes、core/info、checksums、db/health、orders/recent、php-errors/recent、php-errors/stats、backups/state、activity-log/source、activity-log/recent、security/malware-scan、links/broken。
  • メンテナンスエンドポイント: cache/flush、cron/run-due、transients/delete-expired、permalinks/flush。
  • トークン管理用の WP-CLI コマンド wp wpshake。