Skip to content

Commit

Permalink
Remove external authenticator support
Browse files Browse the repository at this point in the history
The external authenticator architecture is currently not used and there
are no plans to implement any external auth mechanism.

- Removed external authenticator support
- Removed plugin configuration system which was only used to configure the
  external authenticators
  • Loading branch information
thschmitt committed Oct 7, 2023
1 parent 9a984a9 commit 1fc1aaa
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 309 deletions.
70 changes: 0 additions & 70 deletions auth/external_authenticator.go

This file was deleted.

13 changes: 0 additions & 13 deletions auth/external_authenticator_config.go

This file was deleted.

19 changes: 0 additions & 19 deletions config/plugin_config.go

This file was deleted.

44 changes: 0 additions & 44 deletions config/plugin_config_file_store.go

This file was deleted.

45 changes: 0 additions & 45 deletions config/plugin_config_provider.go

This file was deleted.

88 changes: 0 additions & 88 deletions config/plugin_config_provider_test.go

This file was deleted.

6 changes: 0 additions & 6 deletions config/plugin_config_store.go

This file was deleted.

5 changes: 0 additions & 5 deletions config/plugins_yaml.go

This file was deleted.

23 changes: 4 additions & 19 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,12 @@ import (
//go:embed definitions/*.yaml
var embedded embed.FS

func authenticators(pluginsCfg config.PluginConfig) []auth.Authenticator {
authenticators := []auth.Authenticator{}
for _, authenticator := range pluginsCfg.Authenticators {
authenticators = append(authenticators, auth.NewExternalAuthenticator(
*auth.NewExternalAuthenticatorConfig(authenticator.Name, authenticator.Path),
))
}
return append(authenticators,
func authenticators() []auth.Authenticator {
return []auth.Authenticator{
auth.NewPatAuthenticator(),
auth.NewOAuthAuthenticator(cache.NewFileCache(), auth.NewExecBrowserLauncher()),
auth.NewBearerAuthenticator(cache.NewFileCache()),
)
}
}

func colorsSupported() bool {
Expand All @@ -58,17 +52,8 @@ func main() {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(131)
}
pluginConfigProvider := config.NewPluginConfigProvider(
config.NewPluginConfigFileStore(os.Getenv("UIPATH_PLUGINS_PATH")),
)
err = pluginConfigProvider.Load()
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(132)
}

pluginConfig := pluginConfigProvider.Config()
authenticators := authenticators(pluginConfig)
authenticators := authenticators()
cli := commandline.NewCli(
os.Stdin,
os.Stdout,
Expand Down

0 comments on commit 1fc1aaa

Please sign in to comment.