File tree Expand file tree Collapse file tree
config/milo/activity/policies Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ spec:
1616 auditRules :
1717 # BackendTLSPolicy creation with spec available
1818 - name : create
19- match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec)"
19+ match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec) && audit.responseStatus.code >= 200 && audit.responseStatus.code < 300 "
2020 summary : " {{ actor }} created backend TLS policy {{ link(audit.responseObject.metadata.name, audit.objectRef) }}"
2121
2222 # BackendTLSPolicy creation fallback (no spec)
2323 - name : create-fallback
24- match : " !audit.user.username.startsWith('system:') && audit.verb == 'create'"
24+ match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && audit.responseStatus.code >= 200 && audit.responseStatus.code < 300 "
2525 summary : " {{ actor }} created {{ link('a backend TLS policy', audit.objectRef) }}"
2626
2727 # BackendTLSPolicy deletion with responseObject.spec available (response contains the deleted resource)
Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ spec:
1616 auditRules :
1717 # Connector creation with spec available
1818 - name : create
19- match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec)"
19+ match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec) && audit.responseStatus.code >= 200 && audit.responseStatus.code < 300 "
2020 summary : " {{ actor }} created connector {{ link(audit.responseObject.metadata.name, audit.objectRef) }}"
2121
2222 # Connector creation fallback (no spec)
2323 - name : create-fallback
24- match : " !audit.user.username.startsWith('system:') && audit.verb == 'create'"
24+ match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && audit.responseStatus.code >= 200 && audit.responseStatus.code < 300 "
2525 summary : " {{ actor }} created {{ link('a connector', audit.objectRef) }}"
2626
2727 # Connector deletion with responseObject.spec available (response contains the deleted resource)
Original file line number Diff line number Diff line change @@ -17,12 +17,12 @@ spec:
1717 auditRules :
1818 # ConnectorAdvertisement creation with spec available
1919 - name : create
20- match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec)"
20+ match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec) && audit.responseStatus.code >= 200 && audit.responseStatus.code < 300 "
2121 summary : " {{ actor }} created connector advertisement {{ link(audit.responseObject.metadata.name, audit.objectRef) }}"
2222
2323 # ConnectorAdvertisement creation fallback (no spec)
2424 - name : create-fallback
25- match : " !audit.user.username.startsWith('system:') && audit.verb == 'create'"
25+ match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && audit.responseStatus.code >= 200 && audit.responseStatus.code < 300 "
2626 summary : " {{ actor }} created {{ link('a connector advertisement', audit.objectRef) }}"
2727
2828 # ConnectorAdvertisement deletion with responseObject.spec available (response contains the deleted resource)
Original file line number Diff line number Diff line change @@ -17,12 +17,12 @@ spec:
1717 auditRules :
1818 # Domain creation with spec.domainName available - use domain name as display text
1919 - name : create
20- match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec)"
20+ match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec) && audit.responseStatus.code >= 200 && audit.responseStatus.code < 300 "
2121 summary : " {{ actor }} created domain {{ link(audit.responseObject.spec.domainName, audit.objectRef) }}"
2222
2323 # Domain creation fallback (no spec)
2424 - name : create-fallback
25- match : " !audit.user.username.startsWith('system:') && audit.verb == 'create'"
25+ match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && audit.responseStatus.code >= 200 && audit.responseStatus.code < 300 "
2626 summary : " {{ actor }} created {{ link('a domain', audit.objectRef) }}"
2727
2828 # Domain deletion with responseObject.spec available (response contains the deleted resource)
Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ spec:
1616 auditRules :
1717 # Gateway creation with spec available
1818 - name : create
19- match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec)"
19+ match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec) && audit.responseStatus.code >= 200 && audit.responseStatus.code < 300 "
2020 summary : " {{ actor }} created gateway {{ link(audit.responseObject.metadata.name, audit.objectRef) }}"
2121
2222 # Gateway creation fallback (no spec)
2323 - name : create-fallback
24- match : " !audit.user.username.startsWith('system:') && audit.verb == 'create'"
24+ match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && audit.responseStatus.code >= 200 && audit.responseStatus.code < 300 "
2525 summary : " {{ actor }} created {{ link('a gateway', audit.objectRef) }}"
2626
2727 # Gateway deletion with responseObject.spec available (response contains the deleted resource)
Original file line number Diff line number Diff line change @@ -17,12 +17,12 @@ spec:
1717 auditRules :
1818 # HTTPProxy creation with spec.hostnames available - use first hostname as display text
1919 - name : create
20- match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec) && has(audit.requestObject.spec.hostnames) && size(audit.requestObject.spec.hostnames) > 0"
20+ match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec) && has(audit.requestObject.spec.hostnames) && size(audit.requestObject.spec.hostnames) > 0 && audit.responseStatus.code >= 200 && audit.responseStatus.code < 300 "
2121 summary : " {{ actor }} created HTTP proxy {{ link(string(audit.requestObject.spec.hostnames[0]), audit.objectRef) }}"
2222
2323 # HTTPProxy creation fallback (no spec or no hostnames)
2424 - name : create-fallback
25- match : " !audit.user.username.startsWith('system:') && audit.verb == 'create'"
25+ match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && audit.responseStatus.code >= 200 && audit.responseStatus.code < 300 "
2626 summary : " {{ actor }} created {{ link('an HTTP proxy', audit.objectRef) }}"
2727
2828 # HTTPProxy deletion with responseObject.spec.hostnames available
Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ spec:
1616 auditRules :
1717 # HTTPRoute creation with spec.hostnames available - use first hostname as display text
1818 - name : create
19- match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec) && has(audit.requestObject.spec.hostnames) && size(audit.requestObject.spec.hostnames) > 0"
19+ match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec) && has(audit.requestObject.spec.hostnames) && size(audit.requestObject.spec.hostnames) > 0 && audit.responseStatus.code >= 200 && audit.responseStatus.code < 300 "
2020 summary : " {{ actor }} created HTTP route {{ link(string(audit.requestObject.spec.hostnames[0]), audit.objectRef) }}"
2121
2222 # HTTPRoute creation fallback (no spec or no hostnames)
2323 - name : create-fallback
24- match : " !audit.user.username.startsWith('system:') && audit.verb == 'create'"
24+ match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && audit.responseStatus.code >= 200 && audit.responseStatus.code < 300 "
2525 summary : " {{ actor }} created {{ link('an HTTP route', audit.objectRef) }}"
2626
2727 # HTTPRoute deletion with responseObject.spec.hostnames available
Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ spec:
1616 auditRules :
1717 # TrafficProtectionPolicy creation with spec available
1818 - name : create
19- match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec)"
19+ match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec) && audit.responseStatus.code >= 200 && audit.responseStatus.code < 300 "
2020 summary : " {{ actor }} created traffic protection policy {{ link(audit.responseObject.metadata.name, audit.objectRef) }}"
2121
2222 # TrafficProtectionPolicy creation fallback (no spec)
2323 - name : create-fallback
24- match : " !audit.user.username.startsWith('system:') && audit.verb == 'create'"
24+ match : " !audit.user.username.startsWith('system:') && audit.verb == 'create' && audit.responseStatus.code >= 200 && audit.responseStatus.code < 300 "
2525 summary : " {{ actor }} created {{ link('a traffic protection policy', audit.objectRef) }}"
2626
2727 # TrafficProtectionPolicy deletion with responseObject.spec available (response contains the deleted resource)
You can’t perform that action at this time.
0 commit comments