Skip to content

Commit

Permalink
Removed breaking changes
Browse files Browse the repository at this point in the history
marking old public constants as deprecated

Signed-off-by: Peter Klijn <[email protected]>
  • Loading branch information
peterklijn committed Sep 20, 2021
1 parent b3ea08e commit f588346
Show file tree
Hide file tree
Showing 42 changed files with 329 additions and 3 deletions.
5 changes: 5 additions & 0 deletions filters/accesslog/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ package accesslog
import "github.com/zalando/skipper/filters"

const (
// Deprecated, use filters.DisableAccessLogName instead
DisableAccessLogName = filters.DisableAccessLogName

// Deprecated, use filters.EnableAccessLogName instead
EnableAccessLogName = filters.EnableAccessLogName

// AccessLogEnabledKey is the key used in the state bag to pass the access log state to the proxy.
AccessLogEnabledKey = "statebag:access_log:proxy:enabled"
Expand Down
3 changes: 3 additions & 0 deletions filters/apiusagemonitoring/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import (
)

const (
// Deprecated, use filters.ApiUsageMonitoringName instead
Name = filters.ApiUsageMonitoringName

unknownPlaceholder = "{unknown}"
noMatchPlaceholder = "{no-match}"
noTagPlaceholder = "{no-tag}"
Expand Down
3 changes: 3 additions & 0 deletions filters/auth/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import (
)

const (
// Deprecated, use filters.BasicAuthName instead
Name = filters.BasicAuthName

ForceBasicAuthHeaderName = "WWW-Authenticate"
ForceBasicAuthHeaderValue = "Basic realm="
DefaultRealmName = "Basic Realm"
Expand Down
5 changes: 5 additions & 0 deletions filters/auth/bearer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import (
"github.com/zalando/skipper/secrets"
)

const (
// Deprecated, use filters.BearerInjectorName instead
BearerInjectorName = filters.BearerInjectorName
)

type (
bearerInjectorSpec struct {
secretsReader secrets.SecretsReader
Expand Down
5 changes: 5 additions & 0 deletions filters/auth/forwardtoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ import (
"golang.org/x/net/http/httpguts"
)

const (
// Deprecated, use filters.ForwardTokenName instead
ForwardTokenName = filters.ForwardTokenName
)

type (
forwardTokenSpec struct{}
forwardTokenFilter struct {
Expand Down
3 changes: 3 additions & 0 deletions filters/auth/grant.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import (
)

const (
// Deprecated, use filters.OAuthGrantName instead
OAuthGrantName = filters.OAuthGrantName

secretsRefreshInternal = time.Minute
tokenWasRefreshed = "oauth-did-refresh"
)
Expand Down
3 changes: 3 additions & 0 deletions filters/auth/grantcallback.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import (
"golang.org/x/oauth2"
)

// Deprecated, use filters.GrantCallbackName instead
const GrantCallbackName = filters.GrantCallbackName

type grantCallbackSpec struct {
config OAuthConfig
}
Expand Down
3 changes: 3 additions & 0 deletions filters/auth/grantclaimsquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ package auth

import "github.com/zalando/skipper/filters"

// Deprecated, use filters.GrantClaimsQueryName instead
const GrantClaimsQueryName = filters.GrantClaimsQueryName

type grantClaimsQuerySpec struct {
oidcSpec oidcIntrospectionSpec
}
Expand Down
3 changes: 3 additions & 0 deletions filters/auth/grantlogout.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import (
)

const (
// Deprecated, use filters.GrantLogoutName instead
GrantLogoutName = filters.GrantLogoutName

revokeTokenKey = "token"
revokeTokenTypeKey = "token_type_hint"
refreshTokenType = "refresh_token"
Expand Down
7 changes: 7 additions & 0 deletions filters/auth/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ import (
)

const (
// Deprecated, use filters.OAuthOidcUserInfoName instead
OidcUserInfoName = filters.OAuthOidcUserInfoName
// Deprecated, use filters.OAuthOidcAnyClaimsName instead
OidcAnyClaimsName = filters.OAuthOidcAnyClaimsName
// Deprecated, use filters.OAuthOidcAllClaimsName instead
OidcAllClaimsName = filters.OAuthOidcAllClaimsName

oauthOidcCookieName = "skipperOauthOidc"
stateValidity = 1 * time.Minute
oidcInfoHeader = "Skipper-Oidc-Info"
Expand Down
3 changes: 3 additions & 0 deletions filters/auth/oidc_introspection.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import (
)

const (
// Deprecated, use filters.OidcClaimsQueryName instead
OidcClaimsQueryName = filters.OidcClaimsQueryName

oidcClaimsCacheKey = "oidcclaimscachekey"
)

Expand Down
9 changes: 9 additions & 0 deletions filters/auth/tokeninfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ import (
)

const (
// Deprecated, use filters.OAuthTokeninfoAnyScopeName instead
OAuthTokeninfoAnyScopeName = filters.OAuthTokeninfoAnyScopeName
// Deprecated, use filters.OAuthTokeninfoAllScopeName instead
OAuthTokeninfoAllScopeName = filters.OAuthTokeninfoAllScopeName
// Deprecated, use filters.OAuthTokeninfoAnyKVName instead
OAuthTokeninfoAnyKVName = filters.OAuthTokeninfoAnyKVName
// Deprecated, use filters.OAuthTokeninfoAllKVName instead
OAuthTokeninfoAllKVName = filters.OAuthTokeninfoAllKVName

tokeninfoCacheKey = "tokeninfo"
)

Expand Down
17 changes: 17 additions & 0 deletions filters/auth/tokenintrospection.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ import (
)

const (
// Deprecated, use filters.OAuthTokenintrospectionAnyClaimsName instead
OAuthTokenintrospectionAnyClaimsName = filters.OAuthTokenintrospectionAnyClaimsName
// Deprecated, use filters.OAuthTokenintrospectionAllClaimsName instead
OAuthTokenintrospectionAllClaimsName = filters.OAuthTokenintrospectionAllClaimsName
// Deprecated, use filters.OAuthTokenintrospectionAnyKVName instead
OAuthTokenintrospectionAnyKVName = filters.OAuthTokenintrospectionAnyKVName
// Deprecated, use filters.OAuthTokenintrospectionAllKVName instead
OAuthTokenintrospectionAllKVName = filters.OAuthTokenintrospectionAllKVName
// Deprecated, use filters.SecureOAuthTokenintrospectionAnyClaimsName instead
SecureOAuthTokenintrospectionAnyClaimsName = filters.SecureOAuthTokenintrospectionAnyClaimsName
// Deprecated, use filters.SecureOAuthTokenintrospectionAllClaimsName instead
SecureOAuthTokenintrospectionAllClaimsName = filters.SecureOAuthTokenintrospectionAllClaimsName
// Deprecated, use filters.SecureOAuthTokenintrospectionAnyKVName instead
SecureOAuthTokenintrospectionAnyKVName = filters.SecureOAuthTokenintrospectionAnyKVName
// Deprecated, use filters.SecureOAuthTokenintrospectionAllKVName instead
SecureOAuthTokenintrospectionAllKVName = filters.SecureOAuthTokenintrospectionAllKVName

tokenintrospectionCacheKey = "tokenintrospection"
TokenIntrospectionConfigPath = "/.well-known/openid-configuration"
)
Expand Down
5 changes: 5 additions & 0 deletions filters/auth/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ import (
"github.com/zalando/skipper/filters"
)

const (
// Deprecated, use filters.WebhookName instead
WebhookName = filters.WebhookName
)

type WebhookOptions struct {
Timeout time.Duration
MaxIdleConns int
Expand Down
77 changes: 77 additions & 0 deletions filters/builtin/builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,83 @@ const (

// Deprecated: use redirectTo
RedirectName = "redirect"

// Deprecated, use filters.SetRequestHeaderName instead
SetRequestHeaderName = filters.SetRequestHeaderName
// Deprecated, use filters.SetResponseHeaderName instead
SetResponseHeaderName = filters.SetResponseHeaderName
// Deprecated, use filters.AppendRequestHeaderName instead
AppendRequestHeaderName = filters.AppendRequestHeaderName
// Deprecated, use filters.AppendResponseHeaderName instead
AppendResponseHeaderName = filters.AppendResponseHeaderName
// Deprecated, use filters.DropRequestHeaderName instead
DropRequestHeaderName = filters.DropRequestHeaderName
// Deprecated, use filters.DropResponseHeaderName instead
DropResponseHeaderName = filters.DropResponseHeaderName
// Deprecated, use filters.SetContextRequestHeaderName instead
SetContextRequestHeaderName = filters.SetContextRequestHeaderName
// Deprecated, use filters.AppendContextRequestHeaderName instead
AppendContextRequestHeaderName = filters.AppendContextRequestHeaderName
// Deprecated, use filters.SetContextResponseHeaderName instead
SetContextResponseHeaderName = filters.SetContextResponseHeaderName
// Deprecated, use filters.AppendContextResponseHeaderName instead
AppendContextResponseHeaderName = filters.AppendContextResponseHeaderName
// Deprecated, use filters.CopyRequestHeaderName instead
CopyRequestHeaderName = filters.CopyRequestHeaderName
// Deprecated, use filters.CopyResponseHeaderName instead
CopyResponseHeaderName = filters.CopyResponseHeaderName

// Deprecated, use filters.SetDynamicBackendHostFromHeader instead
SetDynamicBackendHostFromHeader = filters.SetDynamicBackendHostFromHeader
// Deprecated, use filters.SetDynamicBackendSchemeFromHeader instead
SetDynamicBackendSchemeFromHeader = filters.SetDynamicBackendSchemeFromHeader
// Deprecated, use filters.SetDynamicBackendUrlFromHeader instead
SetDynamicBackendUrlFromHeader = filters.SetDynamicBackendUrlFromHeader
// Deprecated, use filters.SetDynamicBackendHost instead
SetDynamicBackendHost = filters.SetDynamicBackendHost
// Deprecated, use filters.SetDynamicBackendScheme instead
SetDynamicBackendScheme = filters.SetDynamicBackendScheme
// Deprecated, use filters.SetDynamicBackendUrl instead
SetDynamicBackendUrl = filters.SetDynamicBackendUrl

// Deprecated, use filters.HealthCheckName instead
HealthCheckName = filters.HealthCheckName
// Deprecated, use filters.ModPathName instead
ModPathName = filters.ModPathName
// Deprecated, use filters.SetPathName instead
SetPathName = filters.SetPathName
// Deprecated, use filters.ModRequestHeaderName instead
ModRequestHeaderName = filters.ModRequestHeaderName
// Deprecated, use filters.RedirectToName instead
RedirectToName = filters.RedirectToName
// Deprecated, use filters.RedirectToLowerName instead
RedirectToLowerName = filters.RedirectToLowerName
// Deprecated, use filters.StaticName instead
StaticName = filters.StaticName
// Deprecated, use filters.StripQueryName instead
StripQueryName = filters.StripQueryName
// Deprecated, use filters.PreserveHostName instead
PreserveHostName = filters.PreserveHostName
// Deprecated, use filters.SetFastCgiFilenameName instead
SetFastCgiFilenameName = filters.SetFastCgiFilenameName
// Deprecated, use filters.StatusName instead
StatusName = filters.StatusName
// Deprecated, use filters.CompressName instead
CompressName = filters.CompressName
// Deprecated, use filters.SetQueryName instead
SetQueryName = filters.SetQueryName
// Deprecated, use filters.DropQueryName instead
DropQueryName = filters.DropQueryName
// Deprecated, use filters.InlineContentName instead
InlineContentName = filters.InlineContentName
// Deprecated, use filters.InlineContentIfStatusName instead
InlineContentIfStatusName = filters.InlineContentIfStatusName
// Deprecated, use filters.HeaderToQueryName instead
HeaderToQueryName = filters.HeaderToQueryName
// Deprecated, use filters.QueryToHeaderName instead
QueryToHeaderName = filters.QueryToHeaderName
// Deprecated, use filters.BackendTimeoutName instead
BackendTimeoutName = filters.BackendTimeoutName
)

// Returns a Registry object initialized with the default set of filter
Expand Down
5 changes: 5 additions & 0 deletions filters/builtin/originmarker.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import (
"github.com/zalando/skipper/filters"
)

const (
// Deprecated, use filters.OriginMarkerName instead
OriginMarkerName = filters.OriginMarkerName
)

type originMarkerSpec struct{}

// OriginMarker carries information about the origin of a route
Expand Down
7 changes: 7 additions & 0 deletions filters/circuit/breaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ import (
)

const (
// Deprecated, use filters.ConsecutiveBreakerName instead
ConsecutiveBreakerName = filters.ConsecutiveBreakerName
// Deprecated, use filters.RateBreakerName instead
RateBreakerName = filters.RateBreakerName
// Deprecated, use filters.DisableBreakerName instead
DisableBreakerName = filters.DisableBreakerName

RouteSettingsKey = "#circuitbreakersettings"
)

Expand Down
7 changes: 7 additions & 0 deletions filters/cookie/cookie.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ import (
)

const (
// Deprecated, use filters.RequestCookieName instead
RequestCookieFilterName = filters.RequestCookieName
// Deprecated, use filters.ResponseCookieName instead
ResponseCookieFilterName = filters.ResponseCookieName
// Deprecated, use filters.JsCookieName instead
ResponseJSCookieFilterName = filters.JsCookieName

ChangeOnlyArg = "change-only"
SetCookieHttpHeader = "Set-Cookie"
)
Expand Down
6 changes: 6 additions & 0 deletions filters/diag/absorb.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ import (
"github.com/zalando/skipper/logging"
)

// Deprecated, use filters.AbsorbName instead
const AbsorbName = filters.AbsorbName

// Deprecated, use filters.AbsorbSilentName instead
const AbsorbSilentName = filters.AbsorbSilentName

const loggingInterval = time.Second

type absorb struct {
Expand Down
19 changes: 19 additions & 0 deletions filters/diag/diag.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,25 @@ import (

const defaultChunkSize = 512

const (
// Deprecated, use filters.RandomContentName instead
RandomName = filters.RandomContentName
// Deprecated, use filters.RepeatContentName instead
RepeatName = filters.RepeatContentName
// Deprecated, use filters.LatencyName instead
LatencyName = filters.LatencyName
// Deprecated, use filters.ChunksName instead
ChunksName = filters.ChunksName
// Deprecated, use filters.BandwidthName instead
BandwidthName = filters.BandwidthName
// Deprecated, use filters.BackendLatencyName instead
BackendLatencyName = filters.BackendLatencyName
// Deprecated, use filters.BackendBandwidthName instead
BackendBandwidthName = filters.BackendBandwidthName
// Deprecated, use filters.BackendChunksName instead
BackendChunksName = filters.BackendChunksName
)

type throttleType int

const (
Expand Down
7 changes: 7 additions & 0 deletions filters/fadein/fadein.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ import (
"github.com/zalando/skipper/routing"
)

const (
// Deprecated, use filters.FadeInName instead
FadeInName = filters.FadeInName
// Deprecated, use filters.EndpointCreatedName instead
EndpointCreatedName = filters.EndpointCreatedName
)

type (
fadeIn struct {
duration time.Duration
Expand Down
3 changes: 3 additions & 0 deletions filters/flowid/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import (
)

const (
// Deprecated, use filters.FlowIdName instead
Name = filters.FlowIdName

ReuseParameterValue = "reuse"
HeaderName = "X-Flow-Id"
)
Expand Down
6 changes: 6 additions & 0 deletions filters/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import (
)

const (
// Deprecated, use filters.AuditLogName instead
AuditLogName = filters.AuditLogName

// AuthUserKey is used by the auth package to set the user
// information into the state bag to pass the information to
// the auditLog filter.
Expand All @@ -29,6 +32,9 @@ const (
// information to the auditLog filter.
AuthRejectReasonKey = "auth-reject-reason"

// Deprecated, use filters.UnverifiedAuditLogName instead
UnverifiedAuditLogName = filters.UnverifiedAuditLogName

// UnverifiedAuditHeader is the name of the header added to the request which contains the unverified audit details
UnverifiedAuditHeader = "X-Unverified-Audit"
authHeaderName = "Authorization"
Expand Down
3 changes: 3 additions & 0 deletions filters/rfc/rfc.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import (
"github.com/zalando/skipper/rfc"
)

// Deprecated, use filters.RfcPathName instead
const Name = filters.RfcPathName

type path struct{}

// NewPath creates a filter specification for the rfcPath() filter, that
Expand Down
Loading

0 comments on commit f588346

Please sign in to comment.