-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NET-5147: Added placeholder structs for JWT functionality (#18575)
* Added placeholder structs for JWT functionality * Added watches for CE vs ENT * Add license header * Undo plumbing work * Add context arg
- Loading branch information
Showing
6 changed files
with
82 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
|
||
//go:build !consulent | ||
// +build !consulent | ||
|
||
package proxycfg | ||
|
||
import "context" | ||
|
||
func watchJWTProviders(cxt context.Context, h *handlerAPIGateway) error { | ||
return nil | ||
} | ||
|
||
func setJWTProvider(u UpdateEvent, snap *ConfigSnapshot) error { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
|
||
//go:build !consulent | ||
// +build !consulent | ||
|
||
package xds | ||
|
||
import ( | ||
envoy_route_v3 "github.com/envoyproxy/go-control-plane/envoy/config/route/v3" | ||
"google.golang.org/protobuf/types/known/anypb" | ||
|
||
"github.com/hashicorp/consul/agent/structs" | ||
) | ||
|
||
type perRouteFilterBuilder struct { | ||
providerMap map[string]*structs.JWTProviderConfigEntry | ||
listener *structs.APIGatewayListener | ||
route *structs.HTTPRouteConfigEntry | ||
} | ||
|
||
func (p perRouteFilterBuilder) buildFilter(match *envoy_route_v3.RouteMatch) (map[string]*anypb.Any, error) { | ||
return nil, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
|
||
//go:build !consulent | ||
// +build !consulent | ||
|
||
package xds | ||
|
||
import ( | ||
envoy_http_jwt_authn_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/jwt_authn/v3" | ||
envoy_http_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3" | ||
|
||
"github.com/hashicorp/consul/agent/structs" | ||
) | ||
|
||
type GatewayAuthFilterBuilder struct { | ||
listener structs.APIGatewayListener | ||
route *structs.HTTPRouteConfigEntry | ||
providers map[string]*structs.JWTProviderConfigEntry | ||
envoyProviders map[string]*envoy_http_jwt_authn_v3.JwtProvider | ||
} | ||
|
||
func (g *GatewayAuthFilterBuilder) makeGatewayAuthFilters() ([]*envoy_http_v3.HttpFilter, error) { | ||
return nil, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters