The API Protection Profile¶
Paths¶
The path section displays each path and method combination along with it’s associated Path ID. Path IDs are used in the Access Policy.
The Servers section contains the destinations for API routing.
In the properties section the default server is solution13_server1. In the case of this example, no endponts have an alternative server destination so all endpoints will use the default server selected.
Responses¶
The first threee responses are the defaults that would be created if the API protection were created manually.
The last two responses are parsed from the OpenAPI spec file.
Access Control (The Policy)¶
Per-Request Policy¶
When a user accesses a VIP protected by this policy they enter the OAuth Scope Check AuthZ Subroutine.
Upon successful completion of the OAuth Scope Check AuthZ Subroutine the API endpoint is identified.
If the endpoint exists in the policy, the user is granted access via the Allow Terminal.
If endpoint does not exist, the user proceeds down the fallback branch and denied access via the Reject Terminal.
If the OAuth Scope Check AuthZ subroutine is unsuccessful, the user proceeds down the fallback branch and denied access via the Reject Terminal.
Subroutine - OAuth Scope Check AuthZ¶
When a user accesses a VIP protected by this policy they enter the OAuth Scope Check AuthZ Subroutine.
If http basic is used for authentication , the user proceeds down the fallback branch and denied access via the Reject Terminal.
If a bearer token is used for authentication, the JWT scopes are validated.
If the JWT token is valid , the user is sent to the Out Terminal.
If the JWT token is invalid, the user is sent to the Reject Terminal.
If no authentication method is specified, the user is sent to the Reject Terminal.
Policy Agent Configuration¶
OAuth Scope¶
Classify API Request (RCA)¶
This agent specifies path IDs used for each branch rule. The Path IDs were defined in the Path section of the API protection profile.
Supporting APM Objects¶
JSON Webtoken Provider List¶
OAuth Provider¶
JSON Token Configuration¶
JSON Key Configuration¶
User’s Perspective¶
This solution is designed to be integrated with Authorization Server based solutions. Please ensure you deply the Authoriztion Server prior to deploying this solution.
Open Postman on the Jumphost
Click Import
Click Upload Files
Navigate to C:\access-solutions\solution13\student_files, select solution9 request.json, and click Open
Click Import
Expand the collection.
Select 1. Retreive OAuth Client Settings
Click Send
You will receive a response body containing the ClientId and ClientSecret. This request saved those values as a Postman Variables.
Select 2. Sample API Request
Click the Authorization tab.
Click Get New Access Token
Login using Username: user1 and Password: user1
Click Use Token
Click Send
The user receives a 200 OK with a response. The Access Token was successfully validated by the BIG-IP to permit access.