File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
infra/gcp/terraform/modules/oci-proxy Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -69,9 +69,31 @@ resource "google_compute_security_policy" "cloud-armor" {
69
69
priority = " 1"
70
70
match {
71
71
expr {
72
- expression = " !request.path.matches('(?:^/$)|(?:^/privacy$)|(?:^/v2/)')"
72
+ # allow:
73
+ # our homepage info redirect: /
74
+ # our privacy info redirect: /privacy
75
+ # OCI ping: /v2
76
+ # OCI pull / list calls: /v2/<name>/(blobs|manifests|tags)/<reference>
77
+ # https://github.com/opencontainers/distribution-spec/blob/main/spec.md#endpoints
78
+ # NOTE: AR doesn't support referrers API
79
+ expression = " !request.path.matches('(?:^/?$)|(?:^/privacy$)|(?:^/v2/?$)|(?:^/v2/.+/(:?blobs|manifests|tags)/.+$)')"
73
80
}
74
81
}
75
82
}
83
+
84
+ # you must have a default rule with max int32 priority
85
+ # (IE applied last after every other rule)
86
+ # this just allows traffic not caught by any other rule
87
+ rule {
88
+ action = " allow"
89
+ priority = " 2147483647"
90
+ match {
91
+ versioned_expr = " SRC_IPS_V1"
92
+ config {
93
+ src_ip_ranges = [" *" ]
94
+ }
95
+ }
96
+ description = " default rule"
97
+ }
76
98
}
77
99
You can’t perform that action at this time.
0 commit comments