Files
threshold/globals/globals.go
T
Jeff Mitchell 9332179a01 Remove the deprecated old KMS worker auth mechanism (#3935)
This has been superceded by the nodeenrollment-based KMS worker auth
mechanism. This commit only removes the ability to connect with this
mechanism; some upgrade logic will remain intact for a bit and
can be removed later.
2024-01-12 11:58:12 -05:00

59 lines
1.8 KiB
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package globals
import "time"
const (
TcpProxyV1 = "boundary-tcp-proxy-v1"
ServiceTokenV1 = "s1"
AnyAuthenticatedUserId = "u_auth"
AnonymousUserId = "u_anon"
RecoveryUserId = "u_recovery"
MinimumSupportedPostgresVersion = "12"
)
type (
ContextMaxRequestSizeType struct{}
ContextOriginalRequestPathType struct{}
ContextAuthTokenPublicIdType struct{}
)
var (
// DefaultMaxRequestDuration is the amount of time we'll wait for a request
DefaultMaxRequestDuration = 90 * time.Second
// DefaultMaxRequestSize is the maximum size of a request we allow by default
DefaultMaxRequestSize = int64(1024 * 1024)
// DefaultMaxPageSize is the maximum list page size allowed if not set in the config.
DefaultMaxPageSize = 1000
// RefreshReadLookbackDuration is used to account for database state mutations
// missed due to concurrent transactions.
RefreshReadLookbackDuration = 30 * time.Second
// ContextMaxRequestSizeTypeKey is a value to keep linters from complaining
// about clashing string identifiers
ContextMaxRequestSizeTypeKey ContextMaxRequestSizeType
// ContextAuthTokenPublicIdKey is a value to keep linters from complaining
// about clashing string identifiers
ContextAuthTokenPublicIdKey ContextAuthTokenPublicIdType
// ContextOriginalRequestPathTypeKey is a value to keep linters from complaining
// about clashing string identifiers
ContextOriginalRequestPathTypeKey ContextOriginalRequestPathType
// RecoveryTokenValidityPeriod is exported so we can modify it in tests if
// we want
RecoveryTokenValidityPeriod = 5 * time.Minute
// WorkerAuthNonceValidityPeriod is exported so we can modify it in tests if
// we want
WorkerAuthNonceValidityPeriod = 2 * time.Minute
)