Evaluate a Flow Against Label-Based Allowlist Rules

Last updated: November 29, 2026

Quick Overview

Given workloads tagged with labels (role, app, env), allowlist rules made of consumer selectors, provider selectors and services, decide whether a single flow (source, destination, port, protocol) is allowed. Anything not explicitly allowed is denied.

Illumio
Coding & Algorithms
Software Engineer
Illumio
November 29, 2026
Software Engineer
Phone Screen
Coding & Algorithms
Easy

0

0

0 solved


Given workloads tagged with labels (role, app, env), allowlist rules made of consumer selectors, provider selectors and services, decide whether a single flow (source, destination, port, protocol) is allowed. Anything not explicitly allowed is denied.

Illumio policy is written against labels rather than IP addresses, and every enforcement decision reduces to asking whether some allow rule covers a flow. A phone screen uses this to check that you can model selectors cleanly, respect default-deny semantics, and avoid matching on the wrong side of the rule.

What the Interviewer Expects
  • Models a selector as a partial label match, with an 'any' wildcard
  • Checks the destination against providers and the source against consumers, not the reverse
  • Treats unknown workloads and missing labels as deny
  • Matches port and protocol together, not port alone
  • States O(R * S) per flow and when that becomes a problem
Key Topics to Cover
Label-based policy
Default deny
Selector matching
Rule evaluation
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • How would you add deny rules that take precedence over allows?
  • Policy has 50,000 rules. How would you index them so a flow check is not a full scan?
  • How would you support port ranges and IP lists as consumers?
  • How would you explain to a user which rule allowed a flow?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Inputs: workloads maps name to a label dict, rules is a list where each rule has consumers and providers (lists of selectors, each either 'any' or a dict of required labels) and services (...

High-Level Design

A selector matches a workload when every key in the selector equals the workload's value for that key; extra labels on the workload are fine. Evaluate cheap checks first: service membership is a set l...


Submit Your Answer
Markdown supported

Related Questions