Add THRESHOLD_* env var support with BOUNDARY_* fallback

Introduce api.Getenv/api.LookupEnv which prefer THRESHOLD_X and fall back to legacy BOUNDARY_X; use them for user-facing env var reads.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
shadowdaoandClaude Sonnet 5.5 committed 2026-10-12 09:45:44 -07:00
1 parent eeb38a1a84
commit 306960d24b
16 files changed
+135 -57

No files matched your search

+12 -13
View File
@@ -15,7 +15,6 @@ import (
"net"
"net/http"
"net/url"
"os"
"path"
"strconv"
"strings"
@@ -296,15 +295,15 @@ func (c *Config) ReadEnvironment() error {
var envServerName string
// Parse the environment variables
if v := os.Getenv(EnvBoundaryAddr); v != "" {
if v := Getenv(EnvBoundaryAddr); v != "" {
c.Addr = v
}
if v := os.Getenv(EnvBoundaryToken); v != "" {
if v := Getenv(EnvBoundaryToken); v != "" {
c.Token = v
}
if v := os.Getenv(EnvBoundaryMaxRetries); v != "" {
if v := Getenv(EnvBoundaryMaxRetries); v != "" {
maxRetries, err := strconv.ParseUint(v, 10, 32)
if err != nil {
return err
@@ -318,7 +317,7 @@ func (c *Config) ReadEnvironment() error {
c.MaxRetries = int(maxRetries)
}
if v := os.Getenv(EnvBoundarySRVLookup); v != "" {
if v := Getenv(EnvBoundarySRVLookup); v != "" {
var err error
lookup, err := strconv.ParseBool(v)
if err != nil {
@@ -327,7 +326,7 @@ func (c *Config) ReadEnvironment() error {
c.SRVLookup = lookup
}
if t := os.Getenv(EnvBoundaryClientTimeout); t != "" {
if t := Getenv(EnvBoundaryClientTimeout); t != "" {
clientTimeout, err := parseutil.ParseDurationSecond(t)
if err != nil {
return fmt.Errorf("could not parse %q", EnvBoundaryClientTimeout)
@@ -335,7 +334,7 @@ func (c *Config) ReadEnvironment() error {
c.Timeout = clientTimeout
}
if v := os.Getenv(EnvBoundaryRateLimit); v != "" {
if v := Getenv(EnvBoundaryRateLimit); v != "" {
rateLimit, burstLimit, err := parseRateLimit(v)
if err != nil {
return err
@@ -346,23 +345,23 @@ func (c *Config) ReadEnvironment() error {
// TLS Config
{
var foundTLSConfig bool
if v := os.Getenv(EnvBoundaryCACert); v != "" {
if v := Getenv(EnvBoundaryCACert); v != "" {
foundTLSConfig = true
envCACert = v
}
if v := os.Getenv(EnvBoundaryCAPath); v != "" {
if v := Getenv(EnvBoundaryCAPath); v != "" {
foundTLSConfig = true
envCAPath = v
}
if v := os.Getenv(EnvBoundaryClientCert); v != "" {
if v := Getenv(EnvBoundaryClientCert); v != "" {
foundTLSConfig = true
envClientCert = v
}
if v := os.Getenv(EnvBoundaryClientKey); v != "" {
if v := Getenv(EnvBoundaryClientKey); v != "" {
foundTLSConfig = true
envClientKey = v
}
if v := os.Getenv(EnvBoundaryTLSInsecure); v != "" {
if v := Getenv(EnvBoundaryTLSInsecure); v != "" {
foundTLSConfig = true
var err error
envInsecure, err = strconv.ParseBool(v)
@@ -370,7 +369,7 @@ func (c *Config) ReadEnvironment() error {
return fmt.Errorf("could not parse BOUNDARY_TLS_INSECURE")
}
}
if v := os.Getenv(EnvBoundaryTLSServerName); v != "" {
if v := Getenv(EnvBoundaryTLSServerName); v != "" {
foundTLSConfig = true
envServerName = v
}
+56
View File
@@ -0,0 +1,56 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package api
import (
"os"
"strings"
)
const (
// legacyEnvPrefix is the environment variable prefix used by upstream
// HashiCorp Boundary. It is still honored as a fallback.
legacyEnvPrefix = "BOUNDARY_"
// envPrefix is the preferred environment variable prefix for Threshold.
envPrefix = "THRESHOLD_"
)
// PreferredEnvName returns the Threshold (THRESHOLD_*) form of an environment
// variable name. Names that do not use the legacy BOUNDARY_ prefix are
// returned unchanged.
func PreferredEnvName(name string) string {
if strings.HasPrefix(name, legacyEnvPrefix) {
return envPrefix + strings.TrimPrefix(name, legacyEnvPrefix)
}
return name
}
// LegacyEnvName returns the legacy (BOUNDARY_*) form of an environment
// variable name. Names that do not use the THRESHOLD_ prefix are returned
// unchanged.
func LegacyEnvName(name string) string {
if strings.HasPrefix(name, envPrefix) {
return legacyEnvPrefix + strings.TrimPrefix(name, envPrefix)
}
return name
}
// LookupEnv looks up an environment variable, preferring the THRESHOLD_*
// name and falling back to the legacy BOUNDARY_* name. The name may be given
// with either prefix; names with neither prefix are looked up as-is.
func LookupEnv(name string) (string, bool) {
if v, ok := os.LookupEnv(PreferredEnvName(LegacyEnvName(name))); ok {
return v, true
}
return os.LookupEnv(LegacyEnvName(name))
}
// Getenv is like os.Getenv but follows the LookupEnv precedence. A set but
// empty THRESHOLD_* variable falls through to the legacy BOUNDARY_* variable.
func Getenv(name string) string {
if v := os.Getenv(PreferredEnvName(LegacyEnvName(name))); v != "" {
return v
}
return os.Getenv(LegacyEnvName(name))
}
+24
View File
@@ -0,0 +1,24 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package api
import "testing"
func TestEnvFallback(t *testing.T) {
t.Setenv("THRESHOLD_ZZ_TEST", "")
t.Setenv("BOUNDARY_ZZ_TEST", "old")
if got := Getenv("BOUNDARY_ZZ_TEST"); got != "old" {
t.Fatalf("want old, got %q", got)
}
t.Setenv("THRESHOLD_ZZ_TEST", "new")
if got := Getenv("BOUNDARY_ZZ_TEST"); got != "new" {
t.Fatalf("want new, got %q", got)
}
if got, ok := LookupEnv("THRESHOLD_ZZ_TEST"); !ok || got != "new" {
t.Fatalf("want new, got %q %v", got, ok)
}
if PreferredEnvName("BOUNDARY_ADDR") != "THRESHOLD_ADDR" || LegacyEnvName("THRESHOLD_ADDR") != "BOUNDARY_ADDR" {
t.Fatal("name mapping")
}
}
+2 -3
View File
@@ -5,7 +5,6 @@ package api
import (
"fmt"
"os"
"strings"
retryablehttp "github.com/hashicorp/go-retryablehttp"
@@ -60,8 +59,8 @@ func (d *OutputStringError) parseRequest() {
for k, v := range d.Request.Header {
for _, h := range v {
if strings.ToLower(k) == "authorization" {
tokenName := os.Getenv("BOUNDARY_TOKEN_NAME")
keyringType := os.Getenv("BOUNDARY_KEYRING_TYPE")
tokenName := Getenv("BOUNDARY_TOKEN_NAME")
keyringType := Getenv("BOUNDARY_KEYRING_TYPE")
switch {
case tokenName == "none" || keyringType == "none":
h = `Bearer <token>`
+2 -2
View File
@@ -339,10 +339,10 @@ func (c *Command) Client(opt ...Option) (*api.Client, error) {
}
c.client.SetToken(token)
case os.Getenv(envToken) != "":
case api.Getenv(envToken) != "":
// Backwards compat: allow reading from existing BOUNDARY_TOKEN env var
c.UI.Warn(`Direct usage of BOUNDARY_TOKEN env var is deprecated; please use "-token env://<env var name>" format, e.g. "-token env://BOUNDARY_TOKEN" to specify an env var to use.`)
c.client.SetToken(os.Getenv(envToken))
c.client.SetToken(api.Getenv(envToken))
case c.client.Token() == "" && strings.ToLower(c.FlagKeyringType) != "none":
keyringType, tokenName, err := c.DiscoverKeyringTokenInfo()
+9 -9
View File
@@ -7,7 +7,7 @@ import (
"errors"
"flag"
"fmt"
"os"
"github.com/hashicorp/boundary/api"
"regexp"
"sort"
"strconv"
@@ -51,7 +51,7 @@ type BoolVar struct {
func (f *FlagSet) BoolVar(i *BoolVar) {
def := i.Default
if v, exist := os.LookupEnv(i.EnvVar); exist {
if v, exist := api.LookupEnv(i.EnvVar); exist {
if b, err := strconv.ParseBool(v); err == nil {
def = b
}
@@ -112,7 +112,7 @@ type Int64Var struct {
func (f *FlagSet) Int64Var(i *Int64Var) {
initial := i.Default
if v, exist := os.LookupEnv(i.EnvVar); exist {
if v, exist := api.LookupEnv(i.EnvVar); exist {
if i, err := strconv.ParseInt(v, 0, 64); err == nil {
initial = i
}
@@ -176,7 +176,7 @@ type Uint64Var struct {
func (f *FlagSet) Uint64Var(i *Uint64Var) {
initial := i.Default
if v, exist := os.LookupEnv(i.EnvVar); exist {
if v, exist := api.LookupEnv(i.EnvVar); exist {
if i, err := strconv.ParseUint(v, 0, 64); err == nil {
initial = i
}
@@ -240,7 +240,7 @@ type Uint16Var struct {
func (f *FlagSet) Uint16Var(i *Uint16Var) {
initial := i.Default
if v, exist := os.LookupEnv(i.EnvVar); exist {
if v, exist := api.LookupEnv(i.EnvVar); exist {
if i, err := strconv.ParseUint(v, 0, 16); err == nil {
initial = uint16(i)
}
@@ -304,7 +304,7 @@ type StringVar struct {
func (f *FlagSet) StringVar(i *StringVar) {
initial := i.Default
if v, exist := os.LookupEnv(i.EnvVar); exist {
if v, exist := api.LookupEnv(i.EnvVar); exist {
initial = v
}
@@ -361,7 +361,7 @@ type Float64Var struct {
func (f *FlagSet) Float64Var(i *Float64Var) {
initial := i.Default
if v, exist := os.LookupEnv(i.EnvVar); exist {
if v, exist := api.LookupEnv(i.EnvVar); exist {
if i, err := strconv.ParseFloat(v, 64); err == nil {
initial = i
}
@@ -425,7 +425,7 @@ type DurationVar struct {
func (f *FlagSet) DurationVar(i *DurationVar) {
initial := i.Default
if v, exist := os.LookupEnv(i.EnvVar); exist {
if v, exist := api.LookupEnv(i.EnvVar); exist {
if d, err := time.ParseDuration(appendDurationSuffix(v)); err == nil {
initial = d
}
@@ -507,7 +507,7 @@ type StringSliceVar struct {
func (f *FlagSet) StringSliceVar(i *StringSliceVar) {
initial := i.Default
if v, exist := os.LookupEnv(i.EnvVar); exist {
if v, exist := api.LookupEnv(i.EnvVar); exist {
parts := strings.Split(v, ",")
for i := range parts {
parts[i] = strings.TrimSpace(parts[i])
+1 -2
View File
@@ -7,7 +7,6 @@ import (
"encoding/json"
"errors"
"fmt"
"os"
"sort"
"strings"
"unicode"
@@ -376,7 +375,7 @@ func Format(ui cli.Ui) string {
return t.Format
}
format := os.Getenv(EnvBoundaryCLIFormat)
format := api.Getenv(EnvBoundaryCLIFormat)
if format == "" {
format = "table"
}
@@ -8,7 +8,7 @@ package docker
import (
"fmt"
"os"
"github.com/hashicorp/boundary/api"
"strings"
"github.com/hashicorp/boundary/globals"
@@ -54,8 +54,8 @@ func startDbInDockerSupported(dialect string, opt ...Option) (cleanup func() err
switch dialect {
case "postgres", "pgx":
switch {
case os.Getenv("BOUNDARY_TESTING_PG_URL") != "":
url = os.Getenv("BOUNDARY_TESTING_PG_URL")
case api.Getenv("BOUNDARY_TESTING_PG_URL") != "":
url = api.Getenv("BOUNDARY_TESTING_PG_URL")
return func() error { return nil }, url, "", nil
case repository != "":
runOpts.Repository = repository
+2 -2
View File
@@ -5,8 +5,8 @@ package logging
import (
"fmt"
"github.com/hashicorp/boundary/api"
"io"
"os"
"strings"
log "github.com/hashicorp/go-hclog"
@@ -67,7 +67,7 @@ func ParseLogFormat(format string) (LogFormat, error) {
// ParseEnvLogFormat parses the log format from an environment variable.
func ParseEnvLogFormat() LogFormat {
logFormat := os.Getenv("BOUNDARY_LOG_FORMAT")
logFormat := api.Getenv("BOUNDARY_LOG_FORMAT")
switch strings.ToLower(logFormat) {
case "json":
return JSONFormat
+3 -2
View File
@@ -9,6 +9,7 @@ import (
"crypto/tls"
"errors"
"fmt"
"github.com/hashicorp/boundary/api"
"io"
"os"
"os/signal"
@@ -284,7 +285,7 @@ func (b *Server) SetupLogging(flagLogLevel, flagLogFormat, configLogLevel, confi
// create GRPC logger
namedGRPCLogFaker := b.Logger.Named("grpclogfaker")
grpcLogFaker.SetLogOnOff(os.Getenv("BOUNDARY_GRPC_LOGGING") != "")
grpcLogFaker.SetLogOnOff(api.Getenv("BOUNDARY_GRPC_LOGGING") != "")
grpcLogFaker.SetLogger(namedGRPCLogFaker)
b.Info["log level"] = logLevel.String()
@@ -760,7 +761,7 @@ func (b *Server) OpenDatabase(ctx context.Context, dialect, url string) (*db.DB,
db.WithMaxIdleConnections(b.DatabaseMaxIdleConnections),
db.WithConnMaxIdleTimeDuration(b.DatabaseConnMaxIdleTimeDuration),
}
if os.Getenv("BOUNDARY_DISABLE_GORM_FORMATTER") == "" {
if api.Getenv("BOUNDARY_DISABLE_GORM_FORMATTER") == "" {
opts = append(opts, db.WithGormFormatter(b.Logger))
}
@@ -7,7 +7,6 @@ package targetscmd
import (
"errors"
"fmt"
"os"
"sync"
"github.com/hashicorp/boundary/api"
@@ -117,7 +116,7 @@ func (c *Command) Flags() *base.FlagSets {
func (c *Command) Run(args []string) int {
initFlags()
if os.Getenv("BOUNDARY_EXAMPLE_CLI_OUTPUT") != "" {
if api.Getenv("BOUNDARY_EXAMPLE_CLI_OUTPUT") != "" {
c.UI.Output(exampleOutput())
return base.CommandSuccess
}
+8 -7
View File
@@ -10,6 +10,7 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/hashicorp/boundary/api"
"io"
"net"
"os"
@@ -749,7 +750,7 @@ func Parse(d string) (*Config, error) {
if util.IsNil(workerRPCGracePeriod) {
// For backwards compatibility this is still called BOUNDARY_CONTROLLER_WORKER_STATUS_GRACE_PERIOD,
// though it is now used to control the SessionInfo and RoutingInfo RPCs.
workerRPCGracePeriod = os.Getenv("BOUNDARY_CONTROLLER_WORKER_STATUS_GRACE_PERIOD")
workerRPCGracePeriod = api.Getenv("BOUNDARY_CONTROLLER_WORKER_STATUS_GRACE_PERIOD")
}
if workerRPCGracePeriod != nil {
t, err := parseutil.ParseDurationSecond(workerRPCGracePeriod)
@@ -764,7 +765,7 @@ func Parse(d string) (*Config, error) {
livenessTimeToStale := result.Controller.LivenessTimeToStale
if util.IsNil(livenessTimeToStale) {
livenessTimeToStale = os.Getenv("BOUNDARY_CONTROLLER_LIVENESS_TIME_TO_STALE")
livenessTimeToStale = api.Getenv("BOUNDARY_CONTROLLER_LIVENESS_TIME_TO_STALE")
}
if livenessTimeToStale != nil {
t, err := parseutil.ParseDurationSecond(livenessTimeToStale)
@@ -779,7 +780,7 @@ func Parse(d string) (*Config, error) {
getDownstreamWorkersTimeout := result.Controller.GetDownstreamWorkersTimeout
if util.IsNil(getDownstreamWorkersTimeout) {
getDownstreamWorkersTimeout = os.Getenv("BOUNDARY_CONTROLLER_GET_DOWNSTREAM_WORKERS_TIMEOUT")
getDownstreamWorkersTimeout = api.Getenv("BOUNDARY_CONTROLLER_GET_DOWNSTREAM_WORKERS_TIMEOUT")
}
if getDownstreamWorkersTimeout != nil {
t, err := parseutil.ParseDurationSecond(getDownstreamWorkersTimeout)
@@ -903,7 +904,7 @@ func Parse(d string) (*Config, error) {
}
result.Controller.ConcurrentPasswordHashWorkers = uint(t)
case nil:
if envVal := os.Getenv("BOUNDARY_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS"); envVal != "" {
if envVal := api.Getenv("BOUNDARY_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS"); envVal != "" {
concurrentPasswordWorkers, err := strconv.Atoi(envVal)
if err != nil {
return nil, fmt.Errorf("BOUNDARY_CONTROLLER_CONCURRENT_PASSWORD_HASH_WORKERS value is not an int: %w", err)
@@ -949,7 +950,7 @@ func Parse(d string) (*Config, error) {
if util.IsNil(statusCallTimeoutDuration) {
// For backwards compatibility this is still called BOUNDARY_WORKER_STATUS_CALL_TIMEOUT,
// though it is now used to control the SessionInfo, Statistics and RoutingInfo RPCs.
statusCallTimeoutDuration = os.Getenv("BOUNDARY_WORKER_STATUS_CALL_TIMEOUT")
statusCallTimeoutDuration = api.Getenv("BOUNDARY_WORKER_STATUS_CALL_TIMEOUT")
}
if statusCallTimeoutDuration != nil {
t, err := parseutil.ParseDurationSecond(statusCallTimeoutDuration)
@@ -964,7 +965,7 @@ func Parse(d string) (*Config, error) {
getDownstreamWorkersTimeoutDuration := result.Worker.GetDownstreamWorkersTimeout
if util.IsNil(getDownstreamWorkersTimeoutDuration) {
getDownstreamWorkersTimeoutDuration = os.Getenv("BOUNDARY_WORKER_GET_DOWNSTREAM_WORKERS_TIMEOUT")
getDownstreamWorkersTimeoutDuration = api.Getenv("BOUNDARY_WORKER_GET_DOWNSTREAM_WORKERS_TIMEOUT")
}
if getDownstreamWorkersTimeoutDuration != nil {
t, err := parseutil.ParseDurationSecond(getDownstreamWorkersTimeoutDuration)
@@ -981,7 +982,7 @@ func Parse(d string) (*Config, error) {
if util.IsNil(successfulControllerRPCGracePeriod) {
// For backwards compatibility this is still called BOUNDARY_WORKER_SUCCESSFUL_STATUS_GRACE_PERIOD,
// though it is now used to control the SessionInfo and RoutingInfo RPCs.
successfulControllerRPCGracePeriod = os.Getenv("BOUNDARY_WORKER_SUCCESSFUL_STATUS_GRACE_PERIOD")
successfulControllerRPCGracePeriod = api.Getenv("BOUNDARY_WORKER_SUCCESSFUL_STATUS_GRACE_PERIOD")
}
if successfulControllerRPCGracePeriod != nil {
t, err := parseutil.ParseDurationSecond(successfulControllerRPCGracePeriod)
+6 -6
View File
@@ -4,8 +4,8 @@ package config
import (
"crypto/rand"
"github.com/hashicorp/boundary/api"
"io"
"os"
"testing"
"github.com/hashicorp/go-secure-stdlib/parseutil"
@@ -45,31 +45,31 @@ type options struct {
func getDefaultOptions() (options, error) {
opts := options{}
sysEvents, err := parseutil.ParseBool(os.Getenv("BOUNDARY_ENABLE_TEST_SYS_EVENTS"))
sysEvents, err := parseutil.ParseBool(api.Getenv("BOUNDARY_ENABLE_TEST_SYS_EVENTS"))
if err != nil {
return opts, err
}
opts.withSysEventsEnabled = sysEvents
auditEvents, err := parseutil.ParseBool(os.Getenv("BOUNDARY_ENABLE_TEST_AUDIT_EVENTS"))
auditEvents, err := parseutil.ParseBool(api.Getenv("BOUNDARY_ENABLE_TEST_AUDIT_EVENTS"))
if err != nil {
return opts, err
}
opts.withAuditEventsEnabled = auditEvents
obs, err := parseutil.ParseBool(os.Getenv("BOUNDARY_ENABLE_TEST_OBSERVATIONS"))
obs, err := parseutil.ParseBool(api.Getenv("BOUNDARY_ENABLE_TEST_OBSERVATIONS"))
if err != nil {
return opts, err
}
opts.withObservationsEnabled = obs
ipv6, err := parseutil.ParseBool(os.Getenv("BOUNDARY_ENABLE_TEST_IPV6"))
ipv6, err := parseutil.ParseBool(api.Getenv("BOUNDARY_ENABLE_TEST_IPV6"))
if err != nil {
return opts, err
}
opts.withIPv6Enabled = ipv6
errEvents, err := parseutil.ParseBool(os.Getenv("BOUNDARY_ENABLE_TEST_ERROR_EVENTS"))
errEvents, err := parseutil.ParseBool(api.Getenv("BOUNDARY_ENABLE_TEST_ERROR_EVENTS"))
if err != nil {
return opts, err
}
+1 -1
View File
@@ -260,7 +260,7 @@ func (c *{{ camelCase .SubActionPrefix }}Command) Run(args []string) int {
init{{ camelCase .SubActionPrefix }}Flags()
{{ if .HasExampleCliOutput }}
if os.Getenv("BOUNDARY_EXAMPLE_CLI_OUTPUT") != "" {
if api.Getenv("BOUNDARY_EXAMPLE_CLI_OUTPUT") != "" {
c.UI.Output(exampleOutput())
return base.CommandSuccess
}
+2 -2
View File
@@ -73,7 +73,7 @@ func setupEnv(args []string) (retArgs []string, format string, outputCurlString
}
}
envBoundaryCLIFormat := os.Getenv(base.EnvBoundaryCLIFormat)
envBoundaryCLIFormat := api.Getenv(base.EnvBoundaryCLIFormat)
// If we did not parse a value, fetch the env var
if format == "" && envBoundaryCLIFormat != "" {
format = envBoundaryCLIFormat
@@ -155,7 +155,7 @@ func RunCustom(args []string, runOpts *RunOptions) (exitCode int) {
// Don't use color if disabled
useColor := true
if os.Getenv(base.EnvBoundaryCLINoColor) != "" || color.NoColor {
if api.Getenv(base.EnvBoundaryCLINoColor) != "" || color.NoColor {
useColor = false
}
+3 -3
View File
@@ -11,10 +11,10 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/hashicorp/boundary/api"
"io"
"net/http"
"net/textproto"
"os"
"path"
"strings"
"time"
@@ -476,7 +476,7 @@ func wrapHandlerWithCommonFuncs(h http.Handler, c *Controller, props HandlerProp
}
disableAuthzFailures := c.conf.DisableAuthorizationFailures ||
(c.conf.RawConfig.DevController && os.Getenv("BOUNDARY_DEV_SKIP_AUTHZ") != "")
(c.conf.RawConfig.DevController && api.Getenv("BOUNDARY_DEV_SKIP_AUTHZ") != "")
if disableAuthzFailures {
event.WriteSysEvent(context.TODO(), op, "AUTHORIZATION CHECKING DISABLED")
}
@@ -629,7 +629,7 @@ type cmdAttrs struct {
}
func wrapHandlerWithCallbackInterceptor(h http.Handler, c *Controller) http.Handler {
logCallbackErrors := os.Getenv("BOUNDARY_LOG_CALLBACK_ERRORS") != ""
logCallbackErrors := api.Getenv("BOUNDARY_LOG_CALLBACK_ERRORS") != ""
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
const op = "controller.wrapHandlerWithCallbackInterceptor"