I have a problem at the time of making the code in my Okta Access Gateway application policy, I want to apply the policy type PROTECTED_REGEX but it does not apply the group that I want to enter only, my code is the following:
location ‘/apps/test1.html’ {
set $policy_name “root”;
set $policy_desc “Protect all application resources”;
set $policy_type “PROTECTED_REGEX”;
set $policy “Groups=((?=(|.:)Group_test(R|:.*)))”;
set $policy_res “/”;
#process request policies
access_by_lua_file conf/authSession.lua;
#common managed directives
include /etc/nginx/conf/icsgw_location_common.conf;
proxy_pass http://10.10.13.48:8080;
#sends the policy result to the application
#proxy_set_header spgw_policy_result $policy_result;
#send browser header to track which location was hit
#more_set_headers “X-SPGW-LOC: $policy_name:$policy_res”;
proxy_set_header host 10.10.13.48;
}
I think the code set $policy “Groups=((?=(?=(|.::)Group_Test(R|:.*)))” is wrong;
Can someone help me to correct this, thank you very much.