Skip to content

Commit

Permalink
Work on adding IAM preflights to cli (#341)
Browse files Browse the repository at this point in the history
* Work on adding IAM preflights to cli

It looks like you might be able to do this with the SimulateIAMPolicy api and gcp has another, this pr will help w/ this

* Explicitly fetch missing permissions in setup api for cloud shell too

* fix handling of assumed roles
  • Loading branch information
michaeljguarino authored Feb 21, 2023
1 parent 5a6cc5a commit be27d34
Show file tree
Hide file tree
Showing 15 changed files with 338 additions and 72 deletions.
37 changes: 19 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/pluralsh/plural
go 1.18

require (
cloud.google.com/go/compute v1.15.1
cloud.google.com/go/compute v1.18.0
cloud.google.com/go/resourcemanager v1.4.0
cloud.google.com/go/serviceusage v1.4.0
cloud.google.com/go/storage v1.27.0
Expand All @@ -20,6 +20,9 @@ require (
github.com/Azure/go-autorest/autorest/to v0.4.0
github.com/Masterminds/sprig/v3 v3.2.3
github.com/Yamashou/gqlgenc v0.11.0
github.com/aws/aws-sdk-go-v2 v1.17.4
github.com/aws/aws-sdk-go-v2/service/iam v1.19.2
github.com/aws/aws-sdk-go-v2/service/sts v1.16.17
github.com/buger/goterm v1.0.4
github.com/chartmuseum/helm-push v0.10.3
github.com/coreos/go-semver v0.3.0
Expand Down Expand Up @@ -52,7 +55,7 @@ require (
github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64
golang.org/x/crypto v0.5.0
golang.org/x/mod v0.6.0
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783
golang.org/x/oauth2 v0.5.0
gopkg.in/yaml.v2 v2.4.0
helm.sh/helm/v3 v3.11.0
k8s.io/api v0.26.1
Expand All @@ -64,17 +67,16 @@ require (
)

require (
cloud.google.com/go/compute/metadata v0.2.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/longrunning v0.3.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1 // indirect
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a // indirect
github.com/aws/aws-sdk-go-v2 v1.16.14 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.3 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.12.18 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.15 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.15 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.28 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.22 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.22 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.6 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.3 // indirect
Expand All @@ -83,15 +85,14 @@ require (
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.9 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.11.21 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.3 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.16.17 // indirect
github.com/aws/smithy-go v1.13.2 // indirect
github.com/aws/smithy-go v1.13.5 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/fatih/camelcase v1.0.0 // indirect
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
github.com/goccy/go-json v0.9.7 // indirect
github.com/golang-jwt/jwt v3.2.1+incompatible // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
Expand All @@ -100,13 +101,13 @@ require (
github.com/stretchr/objx v0.5.0 // indirect
github.com/vektah/gqlparser/v2 v2.5.1 // indirect
golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd // indirect
google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

require (
cloud.google.com/go v0.107.0 // indirect
cloud.google.com/go/iam v0.7.0 // indirect
cloud.google.com/go/iam v0.12.0
github.com/Azure/azure-pipeline-go v0.2.3 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
Expand All @@ -129,7 +130,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/ec2 v1.51.1
github.com/aws/aws-sdk-go-v2/service/s3 v1.27.2
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/cli/browser v1.0.0 // indirect
github.com/cli/safeexec v1.0.0 // indirect
Expand Down Expand Up @@ -242,16 +243,16 @@ require (
github.com/xlab/treeprint v1.1.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
golang.org/x/net v0.5.0 // indirect
golang.org/x/net v0.6.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/term v0.4.0
golang.org/x/text v0.6.0
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0
golang.org/x/text v0.7.0
golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.103.0
google.golang.org/api v0.110.0
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/grpc v1.51.0 // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
Expand Down
Loading

0 comments on commit be27d34

Please sign in to comment.