Configure Access Using Opaque Token
Create OAuth Provider
Navigate to Access ›› Federation : OAuth Client / Resource Server : Provider
Create new OAuth provider with following parameters:
Name: f5-apm-opaque
Type: F5
Use Auto JWT: disabled/clear
Authentication URI: https://10.1.10.70/f5-oauth2/v1/authorize
Token URI: https://10.1.10.70/f5-oauth2/v1/token
Token Validation Scope URI: https://10.1.10.70/f5-oauth2/v1/introspect
UserInfo Request URI: https://10.1.10.70/f5-oauth2/v1/userinfo
Server IP 10.1.10.70 is OAuth AS server address used in this lab.
It is actually VS listener address in the same F5 instance.
Click Save to save the changes
Create OAuth Resource Server Profile
Navigate to Access ›› Federation : OAuth Client / Resource Server : OAuth Server and click Create button.
Configure following parameters:
Name: app-1
Mode: Resource Server
Type: F5
Oauth Provider: f5-apm-opaque
DNS Resolver: f5-aws-dns
Resource Server ID: Input the ID obtained from step in Add Oauth Resource Server (RS)
Resource Server Secret: Input the secret obtained from step in Add Oauth Resource Server (RS)
Resource Server’s ServerSSL Profile Name: serverssl
Create Access Profile for Resource Server
Navigate to Access ›› Profiles / Policies : Access Profiles (Per-Session Policies)
Click Create button and configure following parameters:
Name: app-1-ap
Profile Type: OAuth-Resource Server
OAuth Profile: oauth-opaque
Languages: English (en)
Then edit policy flow detils in VPE [1]
Change flow ending from Deny to Allow then apply & close VPE.
Create Per-Request Policy Profile for Resource Server
Navigate to Access ›› Profiles / Policies : Per-Request Policies then clik Create button.
Configure following parameters:
Name: app-1-prp
Policy Type: All
Incomplete Action: Deny
Languages: Move
English (en)from Factory Builtin to Accepted Languages
Click Finished to save the changes
Edit the policy flow using VPE.
Click Add New Subroutine give it a name, example:
Scope CheckClick the (+) sign to add process, select
Authentication > OAuth Scope Managementand click Add ItemClick the new process box, and configure following parameters:
Token Validation: External
Server: /Common/app-1
Scope Request: /common/F5ScopeRequest
Save the changes
Edit the end terminals to have
allow&denyoutput
Click (+) sign after Start then add
Scope CheckSubroutine
The policy check flow should be like this
Attach Access & Per-Request Policy Profile
Edit app-1 virtual server.
Scroll down to Access Policy and configure following profile to the virtual server
Access Profile: app-1-ap
Per-Request Policy: app-1-prp
Test The Configuration
Open previous Postman window from Testing Opaque Access Token Request activity.
Get new access token
Set request: https://10.1.10.102/headers and set method as GET. See the Authorization header value obtained from previous step. Then click Send button to create request.
The request response shown like example below
This conclude F5 APM configuration as OAuth resource server using opaque access token.
Next topic is how to implement phantom token (token conversion) model using F5 APM.