Whitelisting is not working
search cancel

Whitelisting is not working

book

Article ID: 237847

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

We have whitelisted few ips and its not working as expected

Configuring policy to allow whitelist of ip addresses using regex to extract the IP Address from  X-Forwarded-For header  ${request.http.header.x-forwarded-for} 

Regex stores the results in context variable origin_ip_upated

Problem: After the regex the "Allow access to IP Address Range" does not return true when it should

 

 

Environment

Release : 10.1

Component : API GATEWAY

Cause

The regex store the context variable into array 

orgin_up_updated = {String[]} size = 1 

[0] = {String} “ip_address

 

When this context variable is evaluated by the  “Allows access to IP Address Range: fails on the context variable

Resolution

When this context variable is evaluated by the  “Allows access to IP Address Range: fails on the context variable

 

Solution after the regex use the Set Context Variable to set a new variable from the regex results