inspec-gcp icon indicating copy to clipboard operation
inspec-gcp copied to clipboard

Support for additional parameters in inspect GCS bucket

Open raghuvennam opened this issue 6 years ago • 3 comments

As a devops engineer I would like to check for all the options that can be set on a GCS bucket to be validated via inspect tests

Detailed Description

As a devops engineer I would like to check for all the configuration options that can be set on a GCS bucket such as versioning enabled, labels added, bucket polcies set and customer managed keys (if enabled) so all of these can be tested using inspec tests in a cicd pipeline and report on any exceptions.

Context

This is a very important feature as the current specs which are available are very limited and does not cover all the additional options

Possible Implementation

Add as new property feature to the GCS resource in inspec for GCP: https://www.inspec.io/docs/reference/resources/google_storage_bucket/

raghuvennam avatar Aug 24 '19 16:08 raghuvennam

@binamov can you help get these additional options generated using the magic modules

raghuvennam avatar Aug 24 '19 16:08 raghuvennam

The GCS resource is dynamic and can already handle checking for anything represented by the resource as here https://cloud.google.com/storage/docs/json_api/v1/buckets#resource-representations , see this comment https://github.com/inspec/inspec-gcp/issues/169#issuecomment-525012123

This could be better documented @skpaterson This is similar to #169 @slevenick it may be worth considering MMing this resource

binamov avatar Aug 27 '19 19:08 binamov

This resource is now generated. Many of these fields are available with the resource as of the 1.0 release. See https://github.com/inspec/inspec-gcp/blob/master/docs/resources/google_storage_bucket.md

Are there other fields that you are unable to access?

slevenick avatar Apr 13 '20 16:04 slevenick