Skip to content

Commit

Permalink
Config fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rorymalcolm committed Sep 13, 2024
1 parent 8e2c0ef commit d6ce539
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions integrations/access/incidentio/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (

"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/integrations/access/common"
"github.com/gravitational/teleport/integrations/access/common/auth"
"github.com/gravitational/teleport/integrations/access/common/teleport"
)

Expand All @@ -38,9 +37,6 @@ type Config struct {
Incident common.GenericAPIConfig
// ClientConfig contains the config for the incident.io client.
ClientConfig ClientConfig `toml:"client_config"`
// AccessTokenProvider provides a method to get the bearer token
// for use when authorizing to a 3rd-party provider API.
AccessTokenProvider auth.AccessTokenProvider

// Teleport is a handle to the client to use when communicating with
// the Teleport auth server. The ServiceNow app will create a gRPC-based
Expand Down Expand Up @@ -79,17 +75,6 @@ func (c *Config) CheckAndSetDefaults() error {
return trace.Wrap(err)
}

if c.AccessTokenProvider == nil {
if c.Incident.Token == "" {
return trace.BadParameter("missing required value incidentio.token")
}
c.AccessTokenProvider = auth.NewStaticAccessTokenProvider(c.Incident.Token)
} else {
if c.Incident.Token != "" {
return trace.BadParameter("exactly one of incidentio.token and AccessTokenProvider must be set")
}
}

if c.Log.Output == "" {
c.Log.Output = "stderr"
}
Expand Down

0 comments on commit d6ce539

Please sign in to comment.