Skip to content

Commit 9c85688

Browse files
committed
Fix review comments
Signed-off-by: Tingmao Wang <tingmaowang@microsoft.com>
1 parent e81b3ff commit 9c85688

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

pkg/securitypolicy/framework.rego

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,10 +1329,10 @@ svn_ok_if_defined(minimum_svn) {
13291329
# A fragment rule may require transparency receipts from one or more ledgers
13301330
# (identified by the issuer of the receipt, and checked by the key used to sign
13311331
# the receipt). input.receipts is the set of receipts that the enforcer
1332-
# successfully validated against keys learned from accepted TTLs. Each receipt
1333-
# is {"issuer": <ledger>, "ttl_subjects": [<ttl subject>, ...]} where
1334-
# ttl_subjects lists the subjects of the TTLs that contributed the key that
1335-
# validated the receipt.
1332+
# successfully validated against keys learned from accepted TTLs (Transparency
1333+
# Trust Lists). Each receipt is {"issuer": <ledger>, "ttl_subjects": [<ttl
1334+
# subject>, ...]} where ttl_subjects lists the subjects of the TTLs that
1335+
# contributed the key that validated the receipt.
13361336
#
13371337
# fragment.required_receipts contains the list of required receipt issuers or
13381338
# feeds of the TTLs containing the key for the receipt. If not set, no receipts
@@ -1441,12 +1441,12 @@ ttl_allowed_ledgers_for_issuer_subject_svn(issuer, subject, svn) := allowed_ledg
14411441
}
14421442
}
14431443

1444-
intersect_or_allow_all_if_wildcard(allowed_ledgers, input_ledgers) := result {
1444+
ttl_intersect_or_allow_all_if_wildcard(allowed_ledgers, input_ledgers) := result {
14451445
not "*" in allowed_ledgers
14461446
result := {l | l := input_ledgers[_]; l in allowed_ledgers}
14471447
}
14481448

1449-
intersect_or_allow_all_if_wildcard(allowed_ledgers, input_ledgers) := result {
1449+
ttl_intersect_or_allow_all_if_wildcard(allowed_ledgers, input_ledgers) := result {
14501450
"*" in allowed_ledgers
14511451
result := {l | l := input_ledgers[_]}
14521452
}
@@ -1455,7 +1455,7 @@ default load_transparency_trust_list := {"allowed": false}
14551455

14561456
load_transparency_trust_list := {"allowed": true, "allowed_ledgers": allowed_ledgers} {
14571457
ttl_ledgers := ttl_allowed_ledgers_for_issuer_subject_svn(input.issuer, input.subject, input.svn)
1458-
allowed_ledgers := intersect_or_allow_all_if_wildcard(ttl_ledgers, input.ledgers)
1458+
allowed_ledgers := ttl_intersect_or_allow_all_if_wildcard(ttl_ledgers, input.ledgers)
14591459
count(allowed_ledgers) > 0
14601460
}
14611461

@@ -2098,7 +2098,7 @@ errors["The provided TTL does not contain any ledgers it is allowed to load"] {
20982098
input.rule == "load_transparency_trust_list"
20992099
ttl_matches
21002100
ttl_ledgers := ttl_allowed_ledgers_for_issuer_subject_svn(input.issuer, input.subject, input.svn)
2101-
allowed_ledgers := intersect_or_allow_all_if_wildcard(ttl_ledgers, input.ledgers)
2101+
allowed_ledgers := ttl_intersect_or_allow_all_if_wildcard(ttl_ledgers, input.ledgers)
21022102
count(allowed_ledgers) == 0
21032103
}
21042104

0 commit comments

Comments
 (0)