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;


#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;

I think the code set $policy “Groups=((?=(?=(|.::)Group_Test(R|:.*)))” is wrong;

Can someone help me to correct this, thank you very much.


For Access gateways questions I suggest posting a question at or opening a support case with Okta.

1 Like

Hi, ok, they sent me here. Thank you.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.