Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audit: update as of 2021-05-05 #2001

Merged
merged 1 commit into from
May 5, 2021
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
"group:k8s-infra-artifact-admins@kubernetes.io"
],
"role": "roles/storage.objectAdmin"
},
{
"members": [
"group:k8s-infra-gcs-access-logs@kubernetes.io"
Copy link
Member

Choose a reason for hiding this comment

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

Expected, this was #1966 being deployed

],
"role": "roles/storage.objectViewer"
}
]
}
12 changes: 12 additions & 0 deletions audit/projects/k8s-artifacts-prod/iam.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,24 @@
],
"role": "roles/errorreporting.user"
},
{
"members": [
"serviceAccount:k8s-infra-gcr-auditor@k8s-artifacts-prod.iam.gserviceaccount.com"
],
"role": "roles/errorreporting.writer"
},
{
"members": [
"serviceAccount:service-388270116193@gcp-sa-pubsub.iam.gserviceaccount.com"
],
"role": "roles/iam.serviceAccountTokenCreator"
},
{
"members": [
"serviceAccount:k8s-infra-gcr-auditor@k8s-artifacts-prod.iam.gserviceaccount.com"
],
"role": "roles/logging.logWriter"
},
{
"members": [
"group:k8s-infra-artifact-admins@kubernetes.io"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"displayName": "k8s-infra container image auditor",
"email": "k8s-infra-gcr-auditor@k8s-artifacts-prod.iam.gserviceaccount.com",
"name": "projects/k8s-artifacts-prod/serviceAccounts/k8s-infra-gcr-auditor@k8s-artifacts-prod.iam.gserviceaccount.com",
"oauth2ClientId": "113024649066440988760",
"projectId": "k8s-artifacts-prod",
"uniqueId": "113024649066440988760"
}
Comment on lines +1 to +8
Copy link
Member

Choose a reason for hiding this comment

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

This account's existence and its bindings are expected, a result of #1998 being deployed

First part of #1730

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"bindings": [
{
"members": [
"group:k8s-infra-artifact-admins@kubernetes.io"
],
"role": "roles/iam.serviceAccountUser"
}
],
"version": 1
}
1 change: 1 addition & 0 deletions audit/projects/k8s-artifacts-prod/services/enabled.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cloudtrace.googleapis.com Cloud Trace API
compute.googleapis.com Compute Engine API
containeranalysis.googleapis.com Container Analysis API
containerregistry.googleapis.com Container Registry API
containerscanning.googleapis.com Container Scanning API
Copy link
Member

Choose a reason for hiding this comment

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

Yeah this popped back up. #1963 is the followup issue to remove this from our code

datastore.googleapis.com Cloud Datastore API
logging.googleapis.com Cloud Logging API
monitoring.googleapis.com Cloud Monitoring API
Expand Down
2 changes: 1 addition & 1 deletion audit/projects/k8s-infra-prow-build-trusted/iam.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"members": [
"group:k8s-infra-cluster-admins@kubernetes.io"
],
"role": "projects/k8s-infra-prow-build-trusted/roles/ServiceAccountLister"
"role": "organizations/758905017065/roles/iam.serviceAccountLister"
Copy link
Member

Choose a reason for hiding this comment

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

Expected (though surprising at the time it happened) this is the last part of #1737 being deployed

This happened while deploying #1952 (comment), so apparently I forget to run terraform apply for the appropriate clusters after merging #1737

},
{
"members": [
Expand Down

This file was deleted.

8 changes: 4 additions & 4 deletions audit/projects/k8s-infra-prow-build/iam.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"bindings": [
{
"members": [
"group:k8s-infra-prow-viewers@kubernetes.io"
"group:k8s-infra-cluster-admins@kubernetes.io"
Copy link
Member

Choose a reason for hiding this comment

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

This is a weird way of diffing it, but same expected change as above (this time for k8s-infra-prow-build instead of k8s-infra-prow-build-trusted)

],
"role": "organizations/758905017065/roles/prow.viewer"
"role": "organizations/758905017065/roles/iam.serviceAccountLister"
},
{
"members": [
"group:k8s-infra-cluster-admins@kubernetes.io"
"group:k8s-infra-prow-viewers@kubernetes.io"
],
"role": "projects/k8s-infra-prow-build/roles/ServiceAccountLister"
"role": "organizations/758905017065/roles/prow.viewer"
},
{
"members": [
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Bucket Policy Only setting for gs://artifacts.k8s-staging-test-infra.appspot.com:
Enabled: True
LockedTime: 2021-08-02 20:28:08.351000+00:00

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://artifacts.k8s-staging-test-infra.appspot.com/ has no CORS configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"bindings": [
{
"members": [
"group:k8s-infra-artifact-admins@kubernetes.io",
"projectEditor:k8s-staging-test-infra",
"projectOwner:k8s-staging-test-infra"
],
"role": "roles/storage.legacyBucketOwner"
},
{
"members": [
"projectViewer:k8s-staging-test-infra"
],
"role": "roles/storage.legacyBucketReader"
},
{
"members": [
"group:k8s-infra-staging-test-infra@kubernetes.io"
],
"role": "roles/storage.legacyBucketWriter"
},
{
"members": [
"group:k8s-infra-artifact-admins@kubernetes.io",
"group:k8s-infra-staging-test-infra@kubernetes.io"
],
"role": "roles/storage.objectAdmin"
},
{
"members": [
"allUsers"
],
"role": "roles/storage.objectViewer"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://artifacts.k8s-staging-test-infra.appspot.com/ has no logging configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Bucket Policy Only setting for gs://k8s-staging-test-infra-gcb:
Enabled: True
LockedTime: 2021-08-02 20:29:19.330000+00:00

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://k8s-staging-test-infra-gcb/ has no CORS configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"bindings": [
{
"members": [
"group:k8s-infra-artifact-admins@kubernetes.io",
"projectEditor:k8s-staging-test-infra",
"projectOwner:k8s-staging-test-infra"
],
"role": "roles/storage.legacyBucketOwner"
},
{
"members": [
"projectViewer:k8s-staging-test-infra"
],
"role": "roles/storage.legacyBucketReader"
},
{
"members": [
"group:k8s-infra-staging-test-infra@kubernetes.io"
],
"role": "roles/storage.legacyBucketWriter"
},
{
"members": [
"group:k8s-infra-artifact-admins@kubernetes.io",
"group:k8s-infra-staging-test-infra@kubernetes.io"
],
"role": "roles/storage.objectAdmin"
},
{
"members": [
"serviceAccount:deployer@k8s-prow.iam.gserviceaccount.com",
"serviceAccount:gcb-builder@k8s-infra-prow-build-trusted.iam.gserviceaccount.com"
],
"role": "roles/storage.objectCreator"
},
{
"members": [
"allUsers",
"serviceAccount:deployer@k8s-prow.iam.gserviceaccount.com",
"serviceAccount:gcb-builder@k8s-infra-prow-build-trusted.iam.gserviceaccount.com"
],
"role": "roles/storage.objectViewer"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://k8s-staging-test-infra-gcb/ has no logging configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Bucket Policy Only setting for gs://k8s-staging-test-infra:
Enabled: True
LockedTime: 2021-08-02 20:28:41.006000+00:00

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gs://k8s-staging-test-infra/ has no CORS configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"bindings": [
{
"members": [
"group:k8s-infra-artifact-admins@kubernetes.io",
"projectEditor:k8s-staging-test-infra",
"projectOwner:k8s-staging-test-infra"
],
"role": "roles/storage.legacyBucketOwner"
},
{
"members": [
"projectViewer:k8s-staging-test-infra"
],
"role": "roles/storage.legacyBucketReader"
},
{
"members": [
"group:k8s-infra-staging-test-infra@kubernetes.io"
],
"role": "roles/storage.legacyBucketWriter"
},
{
"members": [
"group:k8s-infra-artifact-admins@kubernetes.io",
"group:k8s-infra-staging-test-infra@kubernetes.io"
],
"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-staging-test-infra/ has no logging configuration.
11 changes: 11 additions & 0 deletions audit/projects/k8s-staging-test-infra/description.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"createTime": "2021-05-04T20:26:34.947Z",
"lifecycleState": "ACTIVE",
"name": "k8s-staging-test-infra",
"parent": {
"id": "758905017065",
"type": "organization"
},
"projectId": "k8s-staging-test-infra",
"projectNumber": "958928310150"
}
Comment on lines +1 to +11
Copy link
Member

Choose a reason for hiding this comment

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

Expected, all of the k8s-staging-test-infra files are a result of deploying #1908

68 changes: 68 additions & 0 deletions audit/projects/k8s-staging-test-infra/iam.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"bindings": [
{
"members": [
"serviceAccount:958928310150@cloudbuild.gserviceaccount.com",
"serviceAccount:deployer@k8s-prow.iam.gserviceaccount.com",
"serviceAccount:gcb-builder@k8s-infra-prow-build-trusted.iam.gserviceaccount.com"
],
"role": "roles/cloudbuild.builds.builder"
},
{
"members": [
"group:k8s-infra-staging-test-infra@kubernetes.io"
],
"role": "roles/cloudbuild.builds.editor"
},
{
"members": [
"serviceAccount:service-958928310150@gcp-sa-cloudbuild.iam.gserviceaccount.com"
],
"role": "roles/cloudbuild.serviceAgent"
},
{
"members": [
"serviceAccount:service-958928310150@container-analysis.iam.gserviceaccount.com"
],
"role": "roles/containeranalysis.ServiceAgent"
},
{
"members": [
"serviceAccount:k8s-infra-gcr-vuln-scanning@k8s-artifacts-prod.iam.gserviceaccount.com"
],
"role": "roles/containeranalysis.occurrences.viewer"
},
{
"members": [
"serviceAccount:service-958928310150@containerregistry.iam.gserviceaccount.com"
],
"role": "roles/containerregistry.ServiceAgent"
},
{
"members": [
"serviceAccount:service-958928310150@gcp-sa-containerscanning.iam.gserviceaccount.com"
],
"role": "roles/containerscanning.ServiceAgent"
},
{
"members": [
"serviceAccount:service-958928310150@gcp-sa-pubsub.iam.gserviceaccount.com"
],
"role": "roles/pubsub.serviceAgent"
},
{
"members": [
"group:k8s-infra-staging-test-infra@kubernetes.io"
],
"role": "roles/serviceusage.serviceUsageConsumer"
},
{
"members": [
"group:k8s-infra-artifact-admins@kubernetes.io",
"group:k8s-infra-staging-test-infra@kubernetes.io"
],
"role": "roles/viewer"
}
],
"version": 1
}
11 changes: 11 additions & 0 deletions audit/projects/k8s-staging-test-infra/services/enabled.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
NAME TITLE
cloudbuild.googleapis.com Cloud Build API
cloudkms.googleapis.com Cloud Key Management Service (KMS) API
containeranalysis.googleapis.com Container Analysis API
containerregistry.googleapis.com Container Registry API
containerscanning.googleapis.com Container Scanning API
logging.googleapis.com Cloud Logging API
pubsub.googleapis.com Cloud Pub/Sub API
secretmanager.googleapis.com Secret Manager 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
Expand Up @@ -2,14 +2,14 @@
"bindings": [
{
"members": [
"group:k8s-infra-gcp-org-admins@kubernetes.io"
"group:k8s-infra-gcp-org-admins@kubernetes.io",
"user:spiffxp@google.com"
Copy link
Member

Choose a reason for hiding this comment

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

This was done out of an abundance of caution while debugging #1974

Gone now

gsutil iam ch -d "user:spiffxp@google.com:admin" gs://k8s-infra-clusters-terraform

],
"role": "roles/storage.admin"
},
{
"members": [
"group:k8s-infra-cluster-admins@kubernetes.io",
"projectEditor:kubernetes-public",
Copy link
Member

Choose a reason for hiding this comment

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

These are expected, this is #1974 being deployed, specifically the part that's dropping projectEditor bindings

"projectOwner:kubernetes-public"
],
"role": "roles/storage.legacyBucketOwner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{
"members": [
"group:k8s-infra-aws-admins@kubernetes.io",
"projectEditor:kubernetes-public",
"projectOwner:kubernetes-public"
],
"role": "roles/storage.legacyBucketOwner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{
"members": [
"group:k8s-infra-prow-oncall@kubernetes.io",
"projectEditor:kubernetes-public",
"projectOwner:kubernetes-public"
],
"role": "roles/storage.legacyBucketOwner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{
"members": [
"group:k8s-infra-cluster-admins@kubernetes.io",
"projectEditor:kubernetes-public",
"projectOwner:kubernetes-public"
],
"role": "roles/storage.legacyBucketOwner"
Expand Down
Loading