@@ -49,14 +49,14 @@ Imagine to have a feature flag configuration file called `features.json`:
4949{
5050 " stages" : {
5151 " test" : [
52- {" whitelist " : [" test.*" , " dev.*" ]}
52+ {" allowlist " : [" test.*" , " dev.*" ]}
5353 ],
5454 " canary" : [
55- {" whitelist " : [" prod-canary" ]}
55+ {" allowlist " : [" prod-canary" ]}
5656 ],
5757 " prod" : [
58- {" whitelist " : [" prod.*" ]},
59- {" blacklist " : [" prod-canary" ]}
58+ {" allowlist " : [" prod.*" ]},
59+ {" denylist " : [" prod-canary" ]}
6060 ]
6161 },
6262 " features" : {
@@ -122,13 +122,13 @@ An example lifecycle of a feature flag might be the following:
122122
123123Here is how these example stages could be implemented:
124124
125- * Stage 1 can be implemented with a ` blacklist ` condition with value ` .* ` .
126- * Stages 2 and 3 can be implemented with ` whitelist ` conditions.
125+ * Stage 1 can be implemented with a ` denylist ` condition with value ` .* ` .
126+ * Stages 2 and 3 can be implemented with ` allowlist ` conditions.
127127* Stages 4 and 5 can be implemented with ` probability ` conditions.
128128
129129## Conditions
130130
131- There are two types of conditions: * deterministic* (whitelist and blacklist ,
131+ There are two types of conditions: * deterministic* (allowlist and denylist ,
132132regex-based) and * probabilistic* (probability, expressed as a number between
1331330 and 1). Conditions can be repeated if multiple instances are required.
134134
@@ -138,9 +138,9 @@ in the configuration file, for the feature to be considered enabled.
138138If any condition is not met, evaluation of conditions stops and the feature
139139is considered disabled.
140140
141- ### Whitelist
141+ ### Allow list
142142
143- The ` whitelist ` condition allows to specify a list of regular expressions; if the
143+ The ` allowlist ` condition allows to specify a list of regular expressions; if the
144144predicate matches any of the expressions, then the condition is met and the evaluation
145145moves to the next condition, if there is any.
146146
@@ -150,9 +150,9 @@ unintended matches, it's recommended to always anchor the regex.
150150
151151So, for example, ` "^storage$" ` will only match ` "storage" ` and not ` "storage1" ` .
152152
153- ### Blacklist
153+ ### Deny list
154154
155- The ` blacklist ` condition is analogous to the whitelist condition, except that if
155+ The ` denylist ` condition is analogous to the allowlist condition, except that if
156156the predicate matches any of the expressions the condition is considered not met
157157and the evaluation stops.
158158
@@ -172,25 +172,25 @@ the following example:
172172``` json
173173{
174174 "stages" : {
175- "whitelist -first" : [
176- {"whitelist " : [" storage.*" ]},
175+ "allowlist -first" : [
176+ {"allowlist " : [" storage.*" ]},
177177 {"probability" : 0.1 }
178178 ],
179179 "probability-first" : [
180180 {"probability" : 0.1 }
181- {"whitelist " : [" storage.*" ]},
181+ {"allowlist " : [" storage.*" ]},
182182 ]
183183 }
184184}
185185```
186186
187- The first stage definition, ` whitelist -first` , will evaluate the ` probability ` condition
188- only if the predicate first passes the whitelist .
187+ The first stage definition, ` allowlist -first` , will evaluate the ` probability ` condition
188+ only if the predicate first passes the allowlist .
189189
190190The second stage definition, ` probability-first ` , will instead first evaluate
191- the ` probability ` condition, and then apply the whitelist .
191+ the ` probability ` condition, and then apply the allowlist .
192192
193- Assuming there are predicates that do not match the whitelist , the second stage definition
193+ Assuming there are predicates that do not match the allowlist , the second stage definition
194194is more restrictive than the first one, leading to fewer positive evaluations of the
195195feature flag.
196196
@@ -231,19 +231,19 @@ for comments. Don't add comments to your feature flag configuration file.
231231 ],
232232 // Examples of deterministic stages.
233233 " all-storage" : [
234- {" whitelist " : [" .*Storage.*" ]},
234+ {" allowlist " : [" .*Storage.*" ]},
235235 ],
236236 " storage-except-important" : [
237- {" whitelist " : [" .*Storage.*" ]},
238- {" blacklist " : [" .*StorageImportant.*" ]},
237+ {" allowlist " : [" .*Storage.*" ]},
238+ {" denylist " : [" .*StorageImportant.*" ]},
239239 ],
240240 // Example of mixed roll-out stage.
241241 // This stage will match on predicates containing the word "Storage"
242242 // but not the word "StorageImportant", and then will consider the feature
243243 // enabled in 50% of the cases.
244244 " 50-percent-storage-except-StorageImportant" : [
245- {" whitelist " : [" .*Storage.*" ]},
246- {" blacklist " : [" StorageImportant" ]},
245+ {" allowlist " : [" .*Storage.*" ]},
246+ {" denylist " : [" StorageImportant" ]},
247247 {" probability" : 0.5 },
248248 ],
249249 },
0 commit comments