Lab 2 - Application Security (API)

このラボのゴールは、NGINX Controller Application Security ModuleをAPIを通じて操作することです

Important

想定時間: 5分

Note

このラボの手順はラボを実施する方がWindows jumphost – jumphost-1 から操作する手順を示しています。 接続方法についてはこちらを参照ください。 F5 Labs - Index

Alter Security Settings in API

あなたはNGINX ControllerのREST APIを通じてWAFを有効にしたり設定を変更したりする方法がわかりますか? これを達成するのが、PostmanやRed Hat Ansibleなど構成管理ツールを用いた自動化です。 このラボでは、PostmanをWindows jumphostから操作し動作を確認します

Postmanを用いて、Component の Security Settings を更新する

  1. jumphostで Postman を開きます。NGINX Controller 3.x Collection を開きます

    ../../_images/PMcoll1.png
  2. Common TasksUser Logon を開き Login to Controller – Natasha Romanoff - AD を選択します

    ../../_images/PMcollNatasha.png
  3. Postman Send を選択します

    ../../_images/PMsend11.png

    Note

    Controller responds with a “204 No Content” response and an authentication cookie.

  4. Retail-Development EnvironmentApplication - trading を開きます Application trading サブフォルダを開き、2) Create Component - main (CAS monitoring) を選択します

    ../../_images/PMTradingMainCASMonitoring.png
  5. Postmanのリクエストエリアにある Body をクリックしてください。PUT リクエストのペイロードを確認してください。 JSONの desiredState, security 配下のプロパティ値は前回のラボでデプロイした Component に関する内容であることが確認できます

    ../../_images/PMTradingMainCASMonitoringBody.png
  6. Postmaneで Send を選択します

    ../../_images/PMTradingMainCASMonitoringSend.png

    Note

    NGINX Controllerは “eventual consistency model” に従います。APIはPostmanのリクエストに “202 Accepted” ステータスコードを返します。 NGINX Controllerは現状動作し、意図した状態であることが確認できます

    ../../_images/PMTradingMainCASMonitoringConfiguring.png

コンポーネントの変更を確認する

  1. Chromeを開きます。NGINX Controllerに接続しているタブで以下手順に従ってログインします

  2. BookmarkからNGINX Controller UIにアクセスしてください

    ../../_images/ControllerBookmark3.png
  3. NGINX Controllerの特権を持たないユーザである Natasha Romanoff でログインしてください

Username Password
natasha@acmefinancial.net Natasha123!@#
../../_images/ControllerLogin-Natasha1.png
  1. Services メニューを開いてください

    ../../_images/Tile-Services2.png
  2. Apps を選択します

    ../../_images/Services-Apps2.png
  3. Trading Application (CAS) appを開きます。Trading Main コンポーネントの**WAF Enablement Status** 、**WAF Monitoring Only Status**が “On” であることを確認できます

    ../../_images/PMTradingMainCASMonitoringVerifyApp.png
  4. Components セクションをクリックしてください

    ../../_images/PMTradingMainCASMonitoringVerifyComponent.png