From be7a1749740599f33d2c45dc94528d68201638b7 Mon Sep 17 00:00:00 2001 From: rosstimothy <39066650+rosstimothy@users.noreply.github.com> Date: Tue, 12 Nov 2024 11:25:59 -0500 Subject: [PATCH] Remove deprecated slack plugin credentials (#48702) (#48818) Follow up to https://github.com/gravitational/teleport/pull/48596 to remove the deprecated field now that https://github.com/gravitational/teleport.e/pull/5373 has removed the last usages. --- lib/config/configuration_test.go | 4 ---- lib/config/fileconf.go | 5 ----- lib/service/servicecfg/auth.go | 5 ----- 3 files changed, 14 deletions(-) diff --git a/lib/config/configuration_test.go b/lib/config/configuration_test.go index 8de8f9a10d6ea..cc110c629be5b 100644 --- a/lib/config/configuration_test.go +++ b/lib/config/configuration_test.go @@ -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) diff --git a/lib/config/fileconf.go b/lib/config/fileconf.go index 510d87e4f9f8f..5d12685720606 100644 --- a/lib/config/fileconf.go +++ b/lib/config/fileconf.go @@ -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" @@ -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 diff --git a/lib/service/servicecfg/auth.go b/lib/service/servicecfg/auth.go index 8c5491c16522f..8e2d5244fc409 100644 --- a/lib/service/servicecfg/auth.go +++ b/lib/service/servicecfg/auth.go @@ -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" @@ -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 }