Application Passwords

説明

これは、https://github.com/georgestephanis/two-factor/ にあるメインの二段階認証プラグインのスピンオフであるフィーチャープラグインです。

With Application Passwords you are able to authenticate a user without providing that user’s password directly, instead you will use a base64 encoded string of their username and a new application password.

アプリケーションパスワードを新規作成方法

  1. Go the User Profile page of the user that you want to generate a new application password for. To do so, click Users on the left side of the WordPress admin, then click on the user that you want to manage.
  2. Application Passwords セクションが表示されるまで下へスクロールしてください。通常ページの一番下にあります。
  3. Within the input field, type in a name for your new application password, then click Add New.
    Note: The application password name is only used to describe your password for easy management later. It will not affect your password in any way. Be descriptive, as it will lead to easier management if you ever need to change it later.
  4. 「新規追加」ボタンをクリックすると、新しいアプリケーションパスワードが表示されます。 今後はもう表示されませんので、これをどこか安全なところに必ず保存してください。このパスワードを紛失した場合、再度取得することはできません。

アプリケーションパスワードのテスト方法

WordPress REST API

このテストは以下の技術を使っていますが、あらゆる REST API リクエストが使えます。

  • WordPress REST API
  • cURL
  • Mac OSX または Linux
  • Mac または Linux ターミナル
  • ローカルホストで実行中のローカル開発環境 (例: MAMP、XAMPP、DesktopServer、Vagrant)
  1. Now that you have your new password, you will need to base64 encode it using a terminal window as well as your username to use it with the REST API.
    The command you will use is as follows:
    shell
    echo -n "USERNAME:PASSWORD" | base64

    Within this, you will replace USERNAME:PASSWORD with your username and newly generated application password. For example:
    shell
    echo -n "admin:mypassword123" | base64

  2. Once your username and password are base64 encoded, you are now able to make a simple REST API call using the terminal window to update a post. Because you are performing a POST request, you will need to authorize the request using your newly created base64 encoded access token. If authorized correctly, you will see the post title update to “New Title.”
    shell
    curl --header "Authorization: Basic ACCESS_TOKEN" -X POST -d "title=New Title" http://LOCALHOST/wp-json/wp/v2/posts/POST_ID}

    When running this command, be sure to replace ACCESS_TOKEN with your newly generated access token, LOCALHOST with the location of your local WordPress installation, and POST_ID with the ID of the post that you want to edit.

XML-RPC

このテストは以下の技術を使っていますが、あらゆる XML-RPC リクエストが使えます。

  • XML-RPC が WordPress 内で有効
  • cURL
  • Mac OSX または Linux
  • Mac または Linux ターミナル
  • ローカルホストで実行中のローカル開発環境 (例: MAMP、DesktopServer、Vagrant)

Once you have created a new application password, it’s time to send a request to test it. Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded. To begin the process, open a terminal window and enter the following:
shell
curl -H 'Content-Type: text/xml' -d '<methodCall><methodName>wp.getUsers</methodName><params><param><value>1</value></param><param><value>USERNAME</value></param><param><value>PASSWORD</value></param></params></methodCall>' LOCALHOST

In the above example, replace USERNAME with your username, and PASSWORD with your new application password. This should output a response containing all users on your site.

スクリーンショット

  • In your user profile screen, by default it will just be a field to create a new Application Password.
  • After at least one Application Password for you account exists, you'll see a table displaying them, allowing you to view usage and revoke them as desired.

インストール

  1. ZIP ファイルをダウンロードします。
  2. WordPress にログインし、「プラグイン」画面へ移動して「新規追加」をクリックしてください。
  3. 「プラグインのアップロード」ボタンをクリックします。
  4. ダウンロードした ZIP ファイルを選択します。
  5. 「プラグインをインストール」をクリックします。
  6. 有効化します。

評価

Good plugin

People are using this plugin and Now i am also using it because it is good plugin and i have used it on my different blogs like
[links removed]

100% Unsafe using Base64

Base64 encoding is UNSAFE method used by large number of naive application programmers hoping to “obscure” the plain text password as it travels across the network. Base64 encoding lacks any form of cryptographic algorithm so it fails to protect sensitive information, as result Base64 vulnerability is the root of multiple security breaches. Both the user’s ID and password are completely exposed. Using Base64 is no more secure than converting a secret from English into French. Stupid or Careless programmers (as opposed to uneducated) still use Base64 in many networks and end-user applications with no regard as to the damage they created. Simply web search “base64 vulnerability” to see how badly you wrecked the security using it. Cheers!

3件のレビューをすべて表示

貢献者と開発者

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

貢献者