Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions audit/org_kubernetes.io/iam.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"group:k8s-infra-gcp-org-admins@kubernetes.io",
"user:domain-admin-lf@kubernetes.io",
"user:ihor@cncf.io",
"user:psharma@linuxfoundation.org",
"user:spiffxp@google.com",
"user:thockin@google.com",
"user:twaggoner@linuxfoundation.org"
Expand All @@ -96,6 +97,12 @@
],
"role": "roles/resourcemanager.projectDeleter"
},
{
"members": [
"group:k8s-infra-gcp-auditors@kubernetes.io"
],
"role": "roles/secretmanager.viewer"
},
{
"members": [
"group:k8s-infra-gcp-org-admins@kubernetes.io"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
"limit": 200,
"metric": "SECURITY_POLICY_RULES"
},
{
"limit": 1000,
"metric": "XPN_SERVICE_PROJECTS"
},
{
"limit": 150,
"metric": "PACKET_MIRRORINGS"
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions audit/projects/k8s-artifacts-prod/iam.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
{
"members": [
"serviceAccount:k8s-infra-gcr-auditor@k8s-artifacts-prod.iam.gserviceaccount.com"
"deleted:serviceAccount:k8s-infra-gcr-auditor@k8s-artifacts-prod.iam.gserviceaccount.com?uid=111422293292441494221"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes! With great power...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this was me #1730

],
"role": "roles/errorreporting.writer"
},
Expand All @@ -54,7 +54,7 @@
},
{
"members": [
"serviceAccount:k8s-infra-gcr-auditor@k8s-artifacts-prod.iam.gserviceaccount.com"
"deleted:serviceAccount:k8s-infra-gcr-auditor@k8s-artifacts-prod.iam.gserviceaccount.com?uid=111422293292441494221"
],
"role": "roles/logging.logWriter"
},
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
"limit": 200,
"metric": "SECURITY_POLICY_RULES"
},
{
"limit": 1000,
"metric": "XPN_SERVICE_PROJECTS"
},
{
"limit": 150,
"metric": "PACKET_MIRRORINGS"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
"limit": 200,
"metric": "SECURITY_POLICY_RULES"
},
{
"limit": 1000,
"metric": "XPN_SERVICE_PROJECTS"
},
{
"limit": 150,
"metric": "PACKET_MIRRORINGS"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Bucket Policy Only setting for gs://k8s-conform-provider-openstack:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no trace of this in the codebase? Why does it exist?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dims 2/15/21

Explain?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we have a bunch of these. i only run scripts, i don't know enough to meddle in the UI :) I believe i was re-running some of the conform buckets

[dims@dims-a01 07:15] ~/go/src/k8s.io/k8s.io ⟩ rg -i "Bucket Policy Only" | wc -l
     244

In this instance i think i was trying to re-run scripts again to see how to help with:
kubernetes/test-infra#20914

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultimately I would like for us to have this enabled across the org, and enforced via an org policy

per-object ACLs are much trickier to audit and enforce

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my point in tagging @dims was that I can't find any trace of these projects in git. Did someone forget to send a PR?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know we cleaned some stuff up in:
#1311 (comment)

Only reference to k8s-conform-provider-openstack i can find is:
theopenlab/openlab#691

may be @chrigl knows more?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thockin it is in the codebase

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize. I got bitten by master/main - I had not resynced this copy in a while and was trying to sync master and not noticing that it failed.

Indeed, it is in the tree. Mea culpa, my apologies.

Enabled: True
LockedTime: 2021-05-16 15:12:16.571000+00:00

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://k8s-conform-provider-openstack/ has no CORS configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"bindings": [
{
"members": [
"group:k8s-infra-artifact-admins@kubernetes.io",
"projectEditor:k8s-conform",
"projectOwner:k8s-conform"
],
"role": "roles/storage.legacyBucketOwner"
},
{
"members": [
"projectViewer:k8s-conform"
],
"role": "roles/storage.legacyBucketReader"
},
{
"members": [
"group:k8s-infra-conform-provider-openstack@kubernetes.io",
"serviceAccount:service-provider-openstack@k8s-conform.iam.gserviceaccount.com"
],
"role": "roles/storage.legacyBucketWriter"
},
{
"members": [
"group:k8s-infra-artifact-admins@kubernetes.io",
"group:k8s-infra-conform-provider-openstack@kubernetes.io",
"serviceAccount:service-provider-openstack@k8s-conform.iam.gserviceaccount.com"
],
"role": "roles/storage.objectAdmin"
},
{
"members": [
"allUsers"
],
"role": "roles/storage.objectViewer"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://k8s-conform-provider-openstack/ has no logging configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"createTime": "2021-02-15T15:18:08.840992Z",
"name": "projects/228988630781/secrets/service-provider-openstack-key",
"replication": {
"automatic": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"bindings": [
{
"members": [
"serviceAccount:456067983721@cloudbuild.gserviceaccount.com"
"group:k8s-infra-conform-provider-openstack@kubernetes.io"
],
"role": "roles/secretmanager.secretAccessor"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"createTime": "2021-02-15T15:18:09.874889Z",
"name": "projects/228988630781/secrets/service-provider-openstack-key/versions/1",
"replicationStatus": {
"automatic": {}
},
"state": "ENABLED"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"displayName": "service-provider-openstack",
"email": "service-provider-openstack@k8s-conform.iam.gserviceaccount.com",
"name": "projects/k8s-conform/serviceAccounts/service-provider-openstack@k8s-conform.iam.gserviceaccount.com",
"oauth2ClientId": "114482259319052246948",
"projectId": "k8s-conform",
"uniqueId": "114482259319052246948"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
4 changes: 4 additions & 0 deletions audit/projects/k8s-conform/services/compute/project-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
"limit": 200,
"metric": "SECURITY_POLICY_RULES"
},
{
"limit": 1000,
"metric": "XPN_SERVICE_PROJECTS"
},
{
"limit": 150,
"metric": "PACKET_MIRRORINGS"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
"limit": 200,
"metric": "SECURITY_POLICY_RULES"
},
{
"limit": 1000,
"metric": "XPN_SERVICE_PROJECTS"
},
{
"limit": 150,
"metric": "PACKET_MIRRORINGS"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
"limit": 200,
"metric": "SECURITY_POLICY_RULES"
},
{
"limit": 1000,
"metric": "XPN_SERVICE_PROJECTS"
},
{
"limit": 150,
"metric": "PACKET_MIRRORINGS"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bucket Policy Only setting for gs://kubernetes-staging-485128143e-asia:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is why test SAs shouldn't be able to make new buckets, I guess? How do we root cause it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Covered this in #1664 (comment)

I'll open a followup issue for how to avoid these growing unbounded

Enabled: False

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://kubernetes-staging-485128143e-asia/ has no CORS configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"bindings": [
{
"members": [
"projectEditor:k8s-infra-e2e-boskos-001",
"projectOwner:k8s-infra-e2e-boskos-001"
],
"role": "roles/storage.legacyBucketOwner"
},
{
"members": [
"projectViewer:k8s-infra-e2e-boskos-001"
],
"role": "roles/storage.legacyBucketReader"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://kubernetes-staging-485128143e-asia/ has no logging configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bucket Policy Only setting for gs://kubernetes-staging-485128143e-eu:
Enabled: False

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://kubernetes-staging-485128143e-eu/ has no CORS configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"bindings": [
{
"members": [
"projectEditor:k8s-infra-e2e-boskos-001",
"projectOwner:k8s-infra-e2e-boskos-001"
],
"role": "roles/storage.legacyBucketOwner"
},
{
"members": [
"projectViewer:k8s-infra-e2e-boskos-001"
],
"role": "roles/storage.legacyBucketReader"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://kubernetes-staging-485128143e-eu/ has no logging configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bucket Policy Only setting for gs://kubernetes-staging-485128143e:
Enabled: False

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://kubernetes-staging-485128143e/ has no CORS configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"bindings": [
{
"members": [
"projectEditor:k8s-infra-e2e-boskos-001",
"projectOwner:k8s-infra-e2e-boskos-001"
],
"role": "roles/storage.legacyBucketOwner"
},
{
"members": [
"projectViewer:k8s-infra-e2e-boskos-001"
],
"role": "roles/storage.legacyBucketReader"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://kubernetes-staging-485128143e/ has no logging configuration.
6 changes: 6 additions & 0 deletions audit/projects/k8s-infra-e2e-boskos-001/iam.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
],
"role": "roles/compute.serviceAgent"
},
{
"members": [
"serviceAccount:service-271867469224@containerregistry.iam.gserviceaccount.com"
],
"role": "roles/containerregistry.ServiceAgent"
},
{
"members": [
"serviceAccount:271867469224-compute@developer.gserviceaccount.com",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@
"limit": 200,
"metric": "SECURITY_POLICY_RULES"
},
{
"limit": 1000,
"metric": "XPN_SERVICE_PROJECTS"
},
{
"limit": 150,
"metric": "PACKET_MIRRORINGS"
Expand Down
3 changes: 3 additions & 0 deletions audit/projects/k8s-infra-e2e-boskos-001/services/enabled.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
NAME TITLE
compute.googleapis.com Compute Engine API
containerregistry.googleapis.com Container Registry API
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this scripted? Who will ultimately clean these up?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how to cleanup will be followed up in #1675

Yes this is scripted: https://github.com/kubernetes/k8s.io/blob/main/infra/gcp/prow/ensure-e2e-projects.sh

This was added via #1536

logging.googleapis.com Cloud Logging API
monitoring.googleapis.com Cloud Monitoring API
oslogin.googleapis.com Cloud OS Login API
pubsub.googleapis.com Cloud Pub/Sub API
storage-api.googleapis.com Google Cloud Storage JSON API
storage-component.googleapis.com Cloud Storage
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bucket Policy Only setting for gs://kubernetes-staging-1057edcb61-asia:
Enabled: False

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://kubernetes-staging-1057edcb61-asia/ has no CORS configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"bindings": [
{
"members": [
"projectEditor:k8s-infra-e2e-boskos-002",
"projectOwner:k8s-infra-e2e-boskos-002"
],
"role": "roles/storage.legacyBucketOwner"
},
{
"members": [
"projectViewer:k8s-infra-e2e-boskos-002"
],
"role": "roles/storage.legacyBucketReader"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://kubernetes-staging-1057edcb61-asia/ has no logging configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bucket Policy Only setting for gs://kubernetes-staging-1057edcb61-eu:
Enabled: False

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://kubernetes-staging-1057edcb61-eu/ has no CORS configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"bindings": [
{
"members": [
"projectEditor:k8s-infra-e2e-boskos-002",
"projectOwner:k8s-infra-e2e-boskos-002"
],
"role": "roles/storage.legacyBucketOwner"
},
{
"members": [
"projectViewer:k8s-infra-e2e-boskos-002"
],
"role": "roles/storage.legacyBucketReader"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://kubernetes-staging-1057edcb61-eu/ has no logging configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bucket Policy Only setting for gs://kubernetes-staging-1057edcb61:
Enabled: False

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://kubernetes-staging-1057edcb61/ has no CORS configuration.
Loading