From e2f6da1b5fa75eb6594f59dc9102aa5a19f7d28f Mon Sep 17 00:00:00 2001 From: "Peter.Morton" Date: Tue, 2 May 2023 16:55:05 -0500 Subject: [PATCH] reducing scope of token request --- cmd/list.go | 2 +- internal/client/client.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/list.go b/cmd/list.go index 78c0d8d..4d674a3 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -67,5 +67,5 @@ func init() { // Cobra supports local flags which will only run when this command // is called directly, e.g.: - listCmd.Flags().StringVarP(&filter, "filter", "f", "", "Filter properties using a query. For example --fitler \"redaction\"") + listCmd.Flags().StringVarP(&filter, "filter", "f", "", "Filter properties using a query. For example --filter \"redaction\"") } diff --git a/internal/client/client.go b/internal/client/client.go index ddcb664..35d2e5b 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -31,7 +31,7 @@ func GetAccessToken(c *Config) (string, error) { Endpoint: oauth2.Endpoint{ TokenURL: "https://" + c.Hostname + "/oidc-token-service/" + c.ClientID + "/token", }, - Scopes: []string{"oidc", "tags", "context_entitlements", "content_entitlements", "em_api_access"}, + Scopes: []string{"em_api_access"}, } log.WithFields(log.Fields{"conf": fmt.Sprintf("%+v", conf)}).Debug() token, err := conf.PasswordCredentialsToken(context.TODO(), c.Username, c.Password)