API / APIGEE Gateway Interview Questions
What is the Access Control policy in Apigee and how do you allowlist/denylist IPs?
The AccessControl policy enforces IP-based allowlisting or denylisting. It inspects the client IP address from the request and either permits or blocks the request based on configured CIDR rules. This is used to restrict API access to known networks or block malicious IPs.
<!-- Allow only specific IP ranges (allowlist) --> <AccessControl name="AC.AllowInternalOnly"> <IPRules noRuleMatchAction="DENY"> <!-- DENY if no rule matches --> <MatchRule action="ALLOW"> <SourceAddress mask="24">10.100.0.0</SourceAddress> <!-- /24 subnet --> </MatchRule> <MatchRule action="ALLOW"> <SourceAddress mask="32">203.0.113.50</SourceAddress> <!-- single IP --> </MatchRule> </IPRules> </AccessControl> <!-- Denylist specific IPs (block known bad actors) --> <AccessControl name="AC.DenyBadActors"> <IPRules noRuleMatchAction="ALLOW"> <!-- ALLOW if no rule matches --> <MatchRule action="DENY"> <SourceAddress mask="32">192.0.2.100</SourceAddress> </MatchRule> </IPRules> </AccessControl> <!-- IMPORTANT: In environments with a load balancer, the client IP may be in X-Forwarded-For, not the direct connection. The ValidateBasedOn element handles this: --> <AccessControl name="AC.XFF"> <ValidateBasedOn>X_FORWARDED_FOR_ALL</ValidateBasedOn> <IPRules noRuleMatchAction="DENY"> <MatchRule action="ALLOW"> <SourceAddress mask="24">10.0.0.0</SourceAddress> </MatchRule> </IPRules> </AccessControl>
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
