Task 2: Setup API Gateway
Goal | Setup API Gateway on FortiWeb Cloud |
Task | Enable and Configure API Gateway and then test function using Postman |
Verify task completion | If successful, API requests will require submission of an API Key in order to access data |
Setup API Gateway
From the FortiWeb Cloud Console select your application and in the left pane, select ADD MODULES. Scroll down and turn on API Gateway under API Protection.
Now API PROTECTION should show up on the left side of the screen. Under API PROTECTION, select API Gateway
Click to Create an API User. Add a Name and Email address Then Click OK
Next click Create API Gateway Rule.
You will need to click Save at the bottom right. Now you should have an API key. Click on the eye icon to display the key. Copy it and put it into a note pad.
Ensure that the action is set to Alert & Deny and then click Save
Test API gateway
Back on Kali Desktop, In Postman, click Send again to re-test your api call. It should return status 403 and return a long error page ending with “Please contact the administrator…”
Now, let’s add a key
- select Headers under the URL bar.
- enter
apikey
for Key - enter the previously copied key for Value
- click the empty box next to apikey to send this header
- click Send
You should see code 200 and returned data.