Documentation
¶
Index ¶
- func GenerateAPIKeyProviders(adapterAPI *model.AdapterInternalAPI, apiKeyHeader *string, ...) (map[string]*jwt.JwtProvider, []*clusterv3.Cluster, []*corev3.Address, ...)
- func GenerateAPILevelJWTPRoviders(jwtIssuers map[string]*v1alpha1.ResolvedJWTIssuer, ...) (map[string]*jwt.JwtProvider, []*clusterv3.Cluster, []*corev3.Address, ...)
- func GenerateJWTPRoviderv3(jwtProviderMap map[string]map[string]*v1alpha1.ResolvedJWTIssuer) (map[string]*jwt.JwtProvider, []*clusterv3.Cluster, []*corev3.Address, error)
- func GenerateJWTProvidersForJWTAuthentications(jwtIssuers map[string]*v1alpha1.ResolvedJWTIssuer, ...) (map[string]*jwt.JwtProvider, []*clusterv3.Cluster, []*corev3.Address, ...)
- func GetAPILevelJWTRequirements(adapterAPI *model.AdapterInternalAPI, selectedIssuers []string) []*jwt.JwtRequirement
- func GetCacheResources(endpoints []*corev3.Address, clusters []*clusterv3.Cluster, ...) (listenerRes []types.Resource, clusterRes []types.Resource, ...)
- func GetEnforcerAPI(adapterInternalAPI *model.AdapterInternalAPI, vhost string) *api.Api
- func GetEnforcerAPIOperation(operation model.Operation, isMockedAPI bool) *api.Operation
- func GetGlobalClusters() ([]*clusterv3.Cluster, []*corev3.Address)
- func GetJWTFilter(jwtRequirement map[string]*jwt.JwtRequirement, ...) (*hcmv3.HttpFilter, error)
- func GetJWTRequirements(adapterAPI *model.AdapterInternalAPI, ...) []*jwt.JwtRequirement
- func GetProductionListener(gateway *gwapiv1.Gateway, resolvedListenerCerts map[string]map[string][]byte, ...) []*listenerv3.Listener
- func GetRouteConfigs(vhostToRouteArrayMap map[string][]*routev3.Route, routeConfigName string, ...) *routev3.RouteConfiguration
- func LoadCertificate(path string) (*string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAPIKeyProviders ¶
func GenerateAPIKeyProviders(adapterAPI *model.AdapterInternalAPI, apiKeyHeader *string, apiKeyQueryParam *string, sendApikeyToUpstream *bool) (map[string]*jwt.JwtProvider, []*clusterv3.Cluster, []*corev3.Address, []*jwt.JwtRequirement, error)
GenerateAPIKeyProviders generates the api key provider for the resource
func GenerateAPILevelJWTPRoviders ¶
func GenerateAPILevelJWTPRoviders(jwtIssuers map[string]*v1alpha1.ResolvedJWTIssuer, adapterAPI *model.AdapterInternalAPI, authorizationHeader *string, sendTokenToUpStream *bool) (map[string]*jwt.JwtProvider, []*clusterv3.Cluster, []*corev3.Address, []*jwt.JwtRequirement, error)
GenerateAPILevelJWTPRoviders generates the jwt provider for the resource
func GenerateJWTPRoviderv3 ¶
func GenerateJWTPRoviderv3(jwtProviderMap map[string]map[string]*v1alpha1.ResolvedJWTIssuer) (map[string]*jwt.JwtProvider, []*clusterv3.Cluster, []*corev3.Address, error)
GenerateJWTPRoviderv3 generates the jwt provider for the resource
func GenerateJWTProvidersForJWTAuthentications ¶
func GenerateJWTProvidersForJWTAuthentications(jwtIssuers map[string]*v1alpha1.ResolvedJWTIssuer, adapterAPI *model.AdapterInternalAPI, authorizationHeader *string, sendTokenToUpStream *bool, audiences []string) (map[string]*jwt.JwtProvider, []*clusterv3.Cluster, []*corev3.Address, []*jwt.JwtRequirement, error)
GenerateJWTProvidersForJWTAuthentications generates the jwt provider for the resource
func GetAPILevelJWTRequirements ¶
func GetAPILevelJWTRequirements(adapterAPI *model.AdapterInternalAPI, selectedIssuers []string) []*jwt.JwtRequirement
GetAPILevelJWTRequirements returns the jwt requirements for the resource
func GetCacheResources ¶
func GetCacheResources(endpoints []*corev3.Address, clusters []*clusterv3.Cluster, listeners []*listenerv3.Listener, routeConfigs map[string]*routev3.RouteConfiguration) ( listenerRes []types.Resource, clusterRes []types.Resource, routeConfigRes []types.Resource, endpointRes []types.Resource)
GetCacheResources converts the envoy endpoints, clusters, routes, and listener to the resource type which is the format required for the Xds cache.
The returned resources are listeners, clusters, routeConfigurations, endpoints
func GetEnforcerAPI ¶
func GetEnforcerAPI(adapterInternalAPI *model.AdapterInternalAPI, vhost string) *api.Api
GetEnforcerAPI retrieves the ApiDS object model for a given swagger definition along with the vhost to deploy the API.
func GetEnforcerAPIOperation ¶
GetEnforcerAPIOperation builds the operation object expected by the proto definition
func GetGlobalClusters ¶
GetGlobalClusters generates initial internal clusters for given environment.
func GetJWTFilter ¶
func GetJWTFilter(jwtRequirement map[string]*jwt.JwtRequirement, jwtProviders map[string]*jwt.JwtProvider) (*hcmv3.HttpFilter, error)
GetJWTFilter
func GetJWTRequirements ¶
func GetJWTRequirements(adapterAPI *model.AdapterInternalAPI, jwtIssuers map[string]*v1alpha1.ResolvedJWTIssuer) []*jwt.JwtRequirement
func GetProductionListener ¶
func GetProductionListener(gateway *gwapiv1.Gateway, resolvedListenerCerts map[string]map[string][]byte, gwLuaScript string) []*listenerv3.Listener
GetProductionListener generates the listener configurations.
The VirtualHost is named as "default". The provided set of envoy routes will be assigned under the virtual host
The RouteConfiguration is named as "default"
func GetRouteConfigs ¶
func GetRouteConfigs(vhostToRouteArrayMap map[string][]*routev3.Route, routeConfigName string, customRateLimitPolicies []*model.CustomRateLimitPolicy, vhostToSubscriptionAIRL map[string]bool, vhostToSubscriptionRL map[string]bool) *routev3.RouteConfiguration
GetRouteConfigs generates routesconfiguration configurations.
The VirtualHost is named as "default". The provided set of envoy routes will be assigned under the virtual host
The RouteConfiguration is named as "default"
func LoadCertificate ¶
LoadCertificate loads an x509 certificate from a file path
Types ¶
This section is empty.
Directories
¶
Path | Synopsis |
---|---|
Package envoyconf generates the envoyconfiguration for listeners, virtual hosts, routes, clusters, and endpoints.
|
Package envoyconf generates the envoyconfiguration for listeners, virtual hosts, routes, clusters, and endpoints. |
Package model contains the implementation of DTOs to convert OpenAPI/Swagger files and create a common model which can represent both types.
|
Package model contains the implementation of DTOs to convert OpenAPI/Swagger files and create a common model which can represent both types. |
Package utils holds the implementation for common utility functions
|
Package utils holds the implementation for common utility functions |