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

+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"