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 を更新する
jumphostで Postman を開きます。NGINX Controller 3.x Collection を開きます
Common Tasks、 User Logon を開き Login to Controller – Natasha Romanoff - AD を選択します
Postman Send を選択します
Note
Controller responds with a “204 No Content” response and an authentication cookie.
Retail-Development Environment、 Application - trading を開きます Application trading サブフォルダを開き、2) Create Component - main (CAS monitoring) を選択します
Postmanのリクエストエリアにある Body をクリックしてください。PUT リクエストのペイロードを確認してください。 JSONの
desiredState
,security
配下のプロパティ値は前回のラボでデプロイした Component に関する内容であることが確認できますPostmaneで Send を選択します
Note
NGINX Controllerは “eventual consistency model” に従います。APIはPostmanのリクエストに “202 Accepted” ステータスコードを返します。 NGINX Controllerは現状動作し、意図した状態であることが確認できます
コンポーネントの変更を確認する
Chromeを開きます。NGINX Controllerに接続しているタブで以下手順に従ってログインします
BookmarkからNGINX Controller UIにアクセスしてください
NGINX Controllerの特権を持たないユーザである
Natasha Romanoff
でログインしてください
Username | Password |
---|---|
natasha@acmefinancial.net | Natasha123!@# |
Services メニューを開いてください
Apps を選択します
Trading Application (CAS) appを開きます。Trading Main コンポーネントの**WAF Enablement Status** 、**WAF Monitoring Only Status**が “On” であることを確認できます
Components セクションをクリックしてください