Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Environment specific IP Whitelisting

Not applicable

Hi,

I want to whitelist different IPs for different environment, and those IPs can have different masking.

Can I do it using AccessControl policy and KVM? Can I specify the whitelisted IPs and their respective mask values in KVM and then use those values in AccessControl polocy?

Please advise.

Thanks,

Sanjay

Solved Solved
2 5 856
1 ACCEPTED SOLUTION

Not applicable

I have come up with an approach where we can make it environment usable. And I think this approache can be used in places where using KVM may not be possible.

Steps:

1) Add an ACL policy file for Test, say: whitelist-ips-test

2) Add an ACL policy file for Production: whitelist-ips-test

3) Add the following conditional step in you proxy request preflow (ideally as the first step):

<PreFlow name="PreFlow"> <Request> <Step> <Name>whitelist-ips-test</Name> <Condition>environment.name equals "test"</Condition> </Step> <Step> <Name>whitelist-ips-prod</Name> <Condition>environment.name equals "prod"</Condition> </Step>

........

</PreFlow>

Then it will work based on the environment and not mix the IPs.

Thanks,

Sanjay

View solution in original post

5 REPLIES 5