Skip to content

Latest commit

 

History

History
103 lines (65 loc) · 3.96 KB

File metadata and controls

103 lines (65 loc) · 3.96 KB

Lab 2 - Application Security (API)

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

Important

想定時間: 5分

Note

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

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 を開きます

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

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

    ../media/PMsend1.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) を選択します

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

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

    ./media/PMTradingMainCASMonitoringSend.png

    Note

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

    ./media/PMTradingMainCASMonitoringConfiguring.png

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

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

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

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

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

    ../media/Tile-Services.png
  2. Apps を選択します

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

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

    ./media/PMTradingMainCASMonitoringVerifyComponent.png