Skip to content

Commit bb7fb81

Browse files
authored
docs: Add rule layering section back to the docs (#517)
1 parent daf65f4 commit bb7fb81

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

docs/docs/features/binary-authorization.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,48 @@ target.signing_time >= timestamp('2025-05-31T00:00:00Z')
336336
! has(envs.DYLD_INSERT_LIBRARIES)
337337
```
338338

339+
## Rule Layering
340+
341+
Since Santa is a first match system, there are some interesting ways you can
342+
layer rules to achieve different policies.
343+
344+
For example if you want to allow all applications from a publisher (e.g. the
345+
Acme software company) you might start with an allow rule for the TeamID
346+
(ABCDEF1234) to allow all applications from that publisher.
347+
348+
However if you then need to prevent a specific cloud-storage application
349+
written by the same provider, you can then use a higher precedence SigningID
350+
rule to block that company’s cloud storage product.
351+
352+
Using `santactl` this would look like the following:
353+
354+
```
355+
santactl rule --allow --teamid --identifier ABCDEF1234
356+
357+
santactl rule --block \
358+
--signingid \
359+
--identifier ABCDEF1234:com.acme-example.cloud-storage
360+
```
361+
362+
You could also do the inverse and block everything by a publisher but allow a
363+
specific application by having a TeamID block rule and a SigningID allow
364+
rule.
365+
366+
For example if you instead wanted to block everything from the Acme company
367+
except for the company's cloud storage product you'd make a TeamID block rule
368+
for `ABCDEF1234` and a SigningID allow rule for the specific cloud storage
369+
product.
370+
371+
Using `santactl` this would look like the following:
372+
373+
```
374+
santactl rule --block --teamid --identifier ABCDEF1234
375+
376+
santactl rule --allow \
377+
--signingid \
378+
--identifier ABCDEF1234:com.acme-example.cloud-storage
379+
```
380+
339381
## Scope
340382

341383
In addition to rules, Santa can allow or block based on scopes. Currently, only

0 commit comments

Comments
 (0)