Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions authbridge/authlib/plugins/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package plugins

import (
"fmt"
"log/slog"
"sort"
"strings"
"sync"
Expand Down Expand Up @@ -288,7 +289,11 @@ func Build(entries []config.PluginEntry, opts ...pipeline.Option) (*pipeline.Pip
}
factory, ok := factoryFor(e.Name)
if !ok {
return nil, fmt.Errorf("unknown plugin %q (registered: %v)", e.Name, RegisteredPlugins())
pluginNames := RegisteredPlugins()
if len(pluginNames) == 0 {
slog.Warn("No registered plugins -- Build with --tags or use `go run .` to enable")
}
return nil, fmt.Errorf("unknown plugin %q (registered: %v)", e.Name, pluginNames)
}
p := factory()
if c, ok := p.(pipeline.Configurable); ok {
Expand Down Expand Up @@ -331,7 +336,11 @@ func BuildWithSPIFFE(entries []config.PluginEntry, p *spiffe.Provider, opts ...p
}
factory, ok := factoryFor(e.Name)
if !ok {
return nil, fmt.Errorf("unknown plugin %q (registered: %v)", e.Name, RegisteredPlugins())
pluginNames := RegisteredPlugins()
if len(pluginNames) == 0 {
slog.Warn("No registered plugins -- Build with --tags or use `go run .` to enable")
}
return nil, fmt.Errorf("unknown plugin %q (registered: %v)", e.Name, pluginNames)
}
plugin := factory()
// Inject the framework SPIFFE Provider BEFORE Configure runs so
Expand Down
4 changes: 2 additions & 2 deletions authbridge/cmd/authbridge-cpex/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ func main() {
startSignalToggle()

if *configPath == "" {
log.Fatal("--config is required")
log.Fatal("--config is required and must point to a YAML file")
}

bootCfg, err := config.Load(*configPath)
if err != nil {
log.Fatalf("initial config load: %v", err)
log.Fatalf("failed to load config %q: %v", *configPath, err)
}
var provider *spiffe.Provider
if bootCfg.SPIFFE != nil {
Expand Down
4 changes: 2 additions & 2 deletions authbridge/cmd/authbridge-envoy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func main() {
startSignalToggle()

if *configPath == "" {
log.Fatal("--config is required")
log.Fatal("--config is required and must point to a YAML file")
}

// Build the SPIFFE Provider when the spiffe block is configured.
Expand All @@ -121,7 +121,7 @@ func main() {
// instances.
bootCfg, err := config.Load(*configPath)
if err != nil {
log.Fatalf("initial config load: %v", err)
log.Fatalf("failed to load config %q: %v", *configPath, err)
}
var provider *spiffe.Provider
if bootCfg.SPIFFE != nil {
Expand Down
4 changes: 2 additions & 2 deletions authbridge/cmd/authbridge-proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func main() {
startSignalToggle()

if *configPath == "" {
log.Fatal("--config is required")
log.Fatal("--config is required and must point to a YAML file")
}

// Build the SPIFFE Provider when the spiffe block is configured. The
Expand All @@ -162,7 +162,7 @@ func main() {
// freshly constructed plugin instances.
bootCfg, err := config.Load(*configPath)
if err != nil {
log.Fatalf("initial config load: %v", err)
log.Fatalf("failed to load config %q: %v", *configPath, err)
}
// Build the SPIFFE Provider only when something actually consumes it —
// top-level mTLS (X509Source for the listeners) or a plugin whose identity
Expand Down
Loading