Skip to content

Commit

Permalink
Remove deprecated slack plugin credentials (#48702) (#48818)
Browse files Browse the repository at this point in the history
Follow up to #48596
to remove the deprecated field now that
gravitational/teleport.e#5373 has removed
the last usages.
  • Loading branch information
rosstimothy authored Nov 12, 2024
1 parent eb2db6c commit be7a174
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
4 changes: 0 additions & 4 deletions lib/config/configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3662,10 +3662,6 @@ func TestAuthHostedPlugins(t *testing.T) {
applyErr: require.NoError,
assert: func(t *testing.T, p servicecfg.HostedPluginsConfig) {
require.True(t, p.Enabled)
require.NotNil(t, p.OAuthProviders.Slack)
require.Equal(t, "foo", p.OAuthProviders.Slack.ID)
require.Equal(t, "bar", p.OAuthProviders.Slack.Secret)

require.NotNil(t, p.OAuthProviders.SlackCredentials)
require.Equal(t, "foo", p.OAuthProviders.SlackCredentials.ClientID)
require.Equal(t, "bar", p.OAuthProviders.SlackCredentials.ClientSecret)
Expand Down
5 changes: 0 additions & 5 deletions lib/config/fileconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
"strings"
"time"

"github.com/coreos/go-oidc/oauth2"
"github.com/gravitational/trace"
log "github.com/sirupsen/logrus"
"golang.org/x/crypto/acme"
Expand Down Expand Up @@ -1334,10 +1333,6 @@ func (p *PluginOAuthProviders) Parse() (servicecfg.PluginOAuthProviders, error)
if err != nil {
return out, trace.Wrap(err)
}
out.Slack = &oauth2.ClientCredentials{
ID: slack.ClientID,
Secret: slack.ClientSecret,
}
out.SlackCredentials = slack
}
return out, nil
Expand Down
5 changes: 0 additions & 5 deletions lib/service/servicecfg/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package servicecfg

import (
"github.com/coreos/go-oidc/oauth2"
"github.com/dustin/go-humanize"
"github.com/gravitational/trace"
"github.com/jonboulle/clockwork"
Expand Down Expand Up @@ -180,10 +179,6 @@ type HostedPluginsConfig struct {
// PluginOAuthProviders holds application credentials for each
// 3rd party API provider
type PluginOAuthProviders struct {
// TODO(tross) delete once teleport.e has been converted.
// Deprecated: use SlackCredentials instead.
Slack *oauth2.ClientCredentials

SlackCredentials *OAuthClientCredentials
}

Expand Down

0 comments on commit be7a174

Please sign in to comment.