diff --git a/adapter/internal/adapter/adapter.go b/adapter/internal/adapter/adapter.go index 56621e1d8e..7330f08354 100644 --- a/adapter/internal/adapter/adapter.go +++ b/adapter/internal/adapter/adapter.go @@ -29,7 +29,6 @@ import ( "github.com/wso2/apk/adapter/internal/operator" apiservice "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/service/api" configservice "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/service/config" - keymanagerservice "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/service/keymgt" subscriptionservice "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/service/subscription" wso2_server "github.com/wso2/apk/adapter/pkg/discovery/protocol/server/v3" "github.com/wso2/apk/adapter/pkg/health" @@ -120,10 +119,6 @@ func runManagementServer(conf *config.Config, server xdsv3.Server, enforcerServe configservice.RegisterConfigDiscoveryServiceServer(grpcServer, enforcerServer) apiservice.RegisterApiDiscoveryServiceServer(grpcServer, enforcerServer) subscriptionservice.RegisterApiListDiscoveryServiceServer(grpcServer, enforcerAPIDsSrv) - subscriptionservice.RegisterApplicationPolicyDiscoveryServiceServer(grpcServer, enforcerAppPolicyDsSrv) - subscriptionservice.RegisterSubscriptionPolicyDiscoveryServiceServer(grpcServer, enforcerSubPolicyDsSrv) - keymanagerservice.RegisterKMDiscoveryServiceServer(grpcServer, enforcerKeyManagerDsSrv) - keymanagerservice.RegisterRevokedTokenDiscoveryServiceServer(grpcServer, enforcerRevokedTokenDsSrv) subscriptionservice.RegisterJWTIssuerDiscoveryServiceServer(grpcServer, enforcerJwtIssuerDsSrv) // register health service healthservice.RegisterHealthServer(grpcServer, &health.Server{}) diff --git a/adapter/internal/discovery/xds/marshaller.go b/adapter/internal/discovery/xds/marshaller.go index e60192fd87..9abff744fe 100644 --- a/adapter/internal/discovery/xds/marshaller.go +++ b/adapter/internal/discovery/xds/marshaller.go @@ -18,14 +18,11 @@ package xds import ( - "encoding/json" - "fmt" "strconv" "github.com/wso2/apk/adapter/config" logger "github.com/wso2/apk/adapter/internal/loggers" "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/config/enforcer" - "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/keymgt" "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/subscription" "github.com/wso2/apk/adapter/pkg/eventhub/types" ) @@ -33,16 +30,6 @@ import ( var ( // APIListMap has the following mapping label -> apiUUID -> API (Metadata) APIListMap map[string]map[string]*subscription.APIs - // SubscriptionMap contains the subscriptions recieved from API Manager Control Plane - SubscriptionMap map[int32]*subscription.Subscription - // ApplicationMap contains the applications recieved from API Manager Control Plane - ApplicationMap map[string]*subscription.Application - // ApplicationKeyMappingMap contains the application key mappings recieved from API Manager Control Plane - ApplicationKeyMappingMap map[string]*subscription.ApplicationKeyMapping - // ApplicationPolicyMap contains the application policies recieved from API Manager Control Plane - ApplicationPolicyMap map[int32]*subscription.ApplicationPolicy - // SubscriptionPolicyMap contains the subscription policies recieved from API Manager Control Plane - SubscriptionPolicyMap map[int32]*subscription.SubscriptionPolicy ) // EventType is a enum to distinguish Create, Update and Delete Events @@ -186,30 +173,6 @@ func marshalAnalyticsPublishers(config config.Config) []*enforcer.AnalyticsPubli return resolvedAnalyticsPublishers } -// marshalSubscriptionMapToList converts the data into SubscriptionList proto type -func marshalSubscriptionMapToList(subscriptionMap map[int32]*subscription.Subscription) *subscription.SubscriptionList { - subscriptions := []*subscription.Subscription{} - for _, sub := range subscriptionMap { - subscriptions = append(subscriptions, sub) - } - - return &subscription.SubscriptionList{ - List: subscriptions, - } -} - -// marshalApplicationMapToList converts the data into ApplicationList proto type -func marshalApplicationMapToList(appMap map[string]*subscription.Application) *subscription.ApplicationList { - applications := []*subscription.Application{} - for _, app := range appMap { - applications = append(applications, app) - } - - return &subscription.ApplicationList{ - List: applications, - } -} - // marshalAPIListMapToList converts the data into APIList proto type func marshalAPIListMapToList(apiMap map[string]*subscription.APIs) *subscription.APIList { apis := []*subscription.APIs{} @@ -222,125 +185,6 @@ func marshalAPIListMapToList(apiMap map[string]*subscription.APIs) *subscription } } -// marshalApplicationPolicyMapToList converts the data into ApplicationPolicyList proto type -func marshalApplicationPolicyMapToList(appPolicyMap map[int32]*subscription.ApplicationPolicy) *subscription.ApplicationPolicyList { - applicationPolicies := []*subscription.ApplicationPolicy{} - for _, policy := range appPolicyMap { - applicationPolicies = append(applicationPolicies, policy) - } - - return &subscription.ApplicationPolicyList{ - List: applicationPolicies, - } -} - -// marshalSubscriptionPolicyMapToList converts the data into SubscriptionPolicyList proto type -func marshalSubscriptionPolicyMapToList(subPolicyMap map[int32]*subscription.SubscriptionPolicy) *subscription.SubscriptionPolicyList { - subscriptionPolicies := []*subscription.SubscriptionPolicy{} - - for _, policy := range subPolicyMap { - subscriptionPolicies = append(subscriptionPolicies, policy) - } - - return &subscription.SubscriptionPolicyList{ - List: subscriptionPolicies, - } -} - -// marshalKeyMappingMapToList converts the data into ApplicationKeyMappingList proto type -func marshalKeyMappingMapToList(keyMappingMap map[string]*subscription.ApplicationKeyMapping) *subscription.ApplicationKeyMappingList { - applicationKeyMappings := []*subscription.ApplicationKeyMapping{} - - for _, keyMapping := range keyMappingMap { - // TODO: (VirajSalaka) tenant domain check missing - applicationKeyMappings = append(applicationKeyMappings, keyMapping) - } - - return &subscription.ApplicationKeyMappingList{ - List: applicationKeyMappings, - } -} - -// MarshalKeyManager converts the data into KeyManager proto type -func MarshalKeyManager(keyManager *types.KeyManager) *keymgt.KeyManagerConfig { - configList, err := json.Marshal(keyManager.Configuration) - configuration := string(configList) - if err == nil { - newKeyManager := &keymgt.KeyManagerConfig{ - Name: keyManager.Name, - Type: keyManager.Type, - Enabled: keyManager.Enabled, - TenantDomain: keyManager.TenantDomain, - Configuration: configuration, - } - return newKeyManager - } - logger.LoggerXds.Debugf("Error happens while marshaling key manager data for " + fmt.Sprint(keyManager.Name)) - return nil -} - -// MarshalMultipleApplicationPolicies is used to update the applicationPolicies during the startup where -// multiple application policies are pulled at once. And then it returns the ApplicationPolicyList. -func MarshalMultipleApplicationPolicies(policies *types.ApplicationPolicyList) *subscription.ApplicationPolicyList { - resourceMap := make(map[int32]*subscription.ApplicationPolicy) - for item := range policies.List { - policy := policies.List[item] - appPolicy := marshalApplicationPolicy(&policy) - resourceMap[policy.ID] = appPolicy - logger.LoggerXds.Infof("appPolicy Entry is added : %v", appPolicy) - } - ApplicationPolicyMap = resourceMap - return marshalApplicationPolicyMapToList(ApplicationPolicyMap) -} - -// MarshalApplicationPolicyEventAndReturnList handles the Application Policy Event corresponding to the event received -// from message broker. And then it returns the ApplicationPolicyList. -func MarshalApplicationPolicyEventAndReturnList(policy *types.ApplicationPolicy, eventType EventType) *subscription.ApplicationPolicyList { - if eventType == DeleteEvent { - delete(ApplicationPolicyMap, policy.ID) - logger.LoggerXds.Infof("Application Policy: %s is deleted.", policy.Name) - } else { - appPolicy := marshalApplicationPolicy(policy) - ApplicationPolicyMap[policy.ID] = appPolicy - if eventType == UpdateEvent { - logger.LoggerSvcDiscovery.Infof("Application Policy: %s is updated.", appPolicy.Name) - } else { - logger.LoggerSvcDiscovery.Infof("Application Policy: %s is added.", appPolicy.Name) - } - } - return marshalApplicationPolicyMapToList(ApplicationPolicyMap) -} - -// MarshalMultipleSubscriptionPolicies is used to update the subscriptionPolicies during the startup where -// multiple subscription policies are pulled at once. And then it returns the SubscriptionPolicyList. -func MarshalMultipleSubscriptionPolicies(policies *types.SubscriptionPolicyList) *subscription.SubscriptionPolicyList { - resourceMap := make(map[int32]*subscription.SubscriptionPolicy) - for item := range policies.List { - policy := policies.List[item] - resourceMap[policy.ID] = marshalSubscriptionPolicy(&policy) - } - SubscriptionPolicyMap = resourceMap - return marshalSubscriptionPolicyMapToList(SubscriptionPolicyMap) -} - -// MarshalSubscriptionPolicyEventAndReturnList handles the Subscription Policy Event corresponding to the event received -// from message broker. And then it returns the subscriptionPolicyList. -func MarshalSubscriptionPolicyEventAndReturnList(policy *types.SubscriptionPolicy, eventType EventType) *subscription.SubscriptionPolicyList { - if eventType == DeleteEvent { - delete(ApplicationPolicyMap, policy.ID) - logger.LoggerXds.Infof("Application Policy: %s is deleted.", policy.Name) - } else { - subPolicy := marshalSubscriptionPolicy(policy) - SubscriptionPolicyMap[policy.ID] = subPolicy - if eventType == UpdateEvent { - logger.LoggerSvcDiscovery.Infof("Subscription Policy: %s is updated.", subPolicy.Name) - } else { - logger.LoggerSvcDiscovery.Infof("Subscription Policy: %s is added.", subPolicy.Name) - } - } - return marshalSubscriptionPolicyMapToList(SubscriptionPolicyMap) -} - // MarshalAPIMetataAndReturnList updates the internal APIListMap and returns the XDS compatible APIList. // apiList is the internal APIList object (For single API, this would contain a List with just one API) // initialAPIUUIDListMap is assigned during startup when global adapter is associated. This would be empty otherwise. @@ -420,31 +264,6 @@ func marshalAPIMetadata(api *types.API) *subscription.APIs { } } -func marshalApplicationPolicy(policy *types.ApplicationPolicy) *subscription.ApplicationPolicy { - return &subscription.ApplicationPolicy{ - Id: policy.ID, - TenantId: policy.TenantID, - Name: policy.Name, - QuotaType: policy.QuotaType, - } -} - -func marshalSubscriptionPolicy(policy *types.SubscriptionPolicy) *subscription.SubscriptionPolicy { - return &subscription.SubscriptionPolicy{ - Id: policy.ID, - Name: policy.Name, - QuotaType: policy.QuotaType, - GraphQLMaxComplexity: policy.GraphQLMaxComplexity, - GraphQLMaxDepth: policy.GraphQLMaxDepth, - RateLimitCount: policy.RateLimitCount, - RateLimitTimeUnit: policy.RateLimitTimeUnit, - StopOnQuotaReach: policy.StopOnQuotaReach, - TenantId: policy.TenantID, - TenantDomain: policy.TenantDomain, - Timestamp: policy.TimeStamp, - } -} - // CheckIfAPIMetadataIsAlreadyAvailable returns true only if the API Metadata for the given API UUID // is already available func CheckIfAPIMetadataIsAlreadyAvailable(apiUUID, label string) bool { diff --git a/adapter/internal/discovery/xds/server.go b/adapter/internal/discovery/xds/server.go index faa0e09beb..0cc2d476fa 100644 --- a/adapter/internal/discovery/xds/server.go +++ b/adapter/internal/discovery/xds/server.go @@ -77,13 +77,9 @@ type EnvoyGatewayConfig struct { // EnforcerInternalAPI struct use to hold enforcer resources type EnforcerInternalAPI struct { - configs []types.Resource - keyManagers []types.Resource - apiList []types.Resource - applicationPolicies []types.Resource - subscriptionPolicies []types.Resource - revokedTokens []types.Resource - jwtIssuers []types.Resource + configs []types.Resource + apiList []types.Resource + jwtIssuers []types.Resource } var ( @@ -91,15 +87,15 @@ var ( mutexForXdsUpdate sync.Mutex mutexForInternalMapUpdate sync.Mutex - cache envoy_cachev3.SnapshotCache - enforcerCache wso2_cache.SnapshotCache - enforcerJwtIssuerCache wso2_cache.SnapshotCache - enforcerAPICache wso2_cache.SnapshotCache - enforcerApplicationPolicyCache wso2_cache.SnapshotCache - enforcerSubscriptionPolicyCache wso2_cache.SnapshotCache - enforcerKeyManagerCache wso2_cache.SnapshotCache - enforcerRevokedTokensCache wso2_cache.SnapshotCache - enforcerThrottleDataCache wso2_cache.SnapshotCache + cache envoy_cachev3.SnapshotCache + enforcerCache wso2_cache.SnapshotCache + enforcerJwtIssuerCache wso2_cache.SnapshotCache + enforcerAPICache wso2_cache.SnapshotCache + enforcerApplicationPolicyCache wso2_cache.SnapshotCache + enforcerSubscriptionPolicyCache wso2_cache.SnapshotCache + enforcerKeyManagerCache wso2_cache.SnapshotCache + enforcerRevokedTokensCache wso2_cache.SnapshotCache + enforcerThrottleDataCache wso2_cache.SnapshotCache orgAPIMap map[string]map[string]*EnvoyInternalAPI // organizationID -> Vhost:API_UUID -> EnvoyInternalAPI struct map @@ -121,8 +117,6 @@ var ( isReady = false ) -var void struct{} - const ( commonEnforcerLabel string = "commonEnforcerLabel" maxRandomInt int = 999999999 @@ -596,46 +590,6 @@ func UpdateEnforcerAPIList(label string, apis *subscription.APIList) { logger.LoggerXds.Infof("New API List cache update for the label: " + label + " version: " + fmt.Sprint(version)) } -// UpdateEnforcerApplicationPolicies sets new update to the enforcer's Application Policies -func UpdateEnforcerApplicationPolicies(applicationPolicies *subscription.ApplicationPolicyList) { - logger.LoggerXds.Debug("Updating Enforcer Application Policy Cache") - label := commonEnforcerLabel - applicationPolicyList := append(enforcerLabelMap[label].applicationPolicies, applicationPolicies) - - version, _ := crand.Int(crand.Reader, maxRandomBigInt()) - snap, _ := wso2_cache.NewSnapshot(fmt.Sprint(version), map[wso2_resource.Type][]types.Resource{ - wso2_resource.ApplicationPolicyListType: applicationPolicyList, - }) - snap.Consistent() - - errSetSnap := enforcerApplicationPolicyCache.SetSnapshot(context.Background(), label, snap) - if errSetSnap != nil { - logger.LoggerXds.ErrorC(logging.PrintError(logging.Error1414, logging.MAJOR, "Error while setting the snapshot : %v", errSetSnap.Error())) - } - enforcerLabelMap[label].subscriptionPolicies = applicationPolicyList - logger.LoggerXds.Infof("New Application Policy cache update for the label: " + label + " version: " + fmt.Sprint(version)) -} - -// UpdateEnforcerSubscriptionPolicies sets new update to the enforcer's Subscription Policies -func UpdateEnforcerSubscriptionPolicies(subscriptionPolicies *subscription.SubscriptionPolicyList) { - logger.LoggerXds.Debug("Updating Enforcer Subscription Policy Cache") - label := commonEnforcerLabel - subscriptionPolicyList := append(enforcerLabelMap[label].subscriptionPolicies, subscriptionPolicies) - - version, _ := crand.Int(crand.Reader, maxRandomBigInt()) - snap, _ := wso2_cache.NewSnapshot(fmt.Sprint(version), map[wso2_resource.Type][]types.Resource{ - wso2_resource.SubscriptionPolicyListType: subscriptionPolicyList, - }) - snap.Consistent() - - errSetSnap := enforcerSubscriptionPolicyCache.SetSnapshot(context.Background(), label, snap) - if errSetSnap != nil { - logger.LoggerXds.ErrorC(logging.PrintError(logging.Error1414, logging.MAJOR, "Error while setting the snapshot : %v", errSetSnap.Error())) - } - enforcerLabelMap[label].subscriptionPolicies = subscriptionPolicyList - logger.LoggerXds.Infof("New Subscription Policy cache update for the label: " + label + " version: " + fmt.Sprint(version)) -} - // UpdateXdsCacheWithLock uses mutex and lock to avoid different go routines updating XDS at the same time func UpdateXdsCacheWithLock(label string, endpoints []types.Resource, clusters []types.Resource, routes []types.Resource, listeners []types.Resource) bool { @@ -690,59 +644,6 @@ func ExtractUUIDFromAPIIdentifier(id string) (string, error) { return "", err } -// GenerateAndUpdateKeyManagerList converts the data into KeyManager proto type -func GenerateAndUpdateKeyManagerList() { - var keyManagerConfigList = make([]types.Resource, 0) - for item := range KeyManagerList { - keyManager := KeyManagerList[item] - kmConfig := MarshalKeyManager(&keyManager) - if kmConfig != nil { - keyManagerConfigList = append(keyManagerConfigList, kmConfig) - } - } - UpdateEnforcerKeyManagers(keyManagerConfigList) -} - -// UpdateEnforcerKeyManagers Sets new update to the enforcer's configuration -func UpdateEnforcerKeyManagers(keyManagerConfigList []types.Resource) { - logger.LoggerXds.Debug("Updating Key Manager Cache") - label := commonEnforcerLabel - - version, _ := crand.Int(crand.Reader, maxRandomBigInt()) - snap, _ := wso2_cache.NewSnapshot(fmt.Sprint(version), map[wso2_resource.Type][]types.Resource{ - wso2_resource.KeyManagerType: keyManagerConfigList, - }) - snap.Consistent() - - errSetSnap := enforcerKeyManagerCache.SetSnapshot(context.Background(), label, snap) - if errSetSnap != nil { - logger.LoggerXds.ErrorC(logging.PrintError(logging.Error1414, logging.MAJOR, "Error while setting the snapshot : %v", errSetSnap.Error())) - } - enforcerLabelMap[label].keyManagers = keyManagerConfigList - logger.LoggerXds.Infof("New key manager cache update for the label: " + label + " version: " + fmt.Sprint(version)) -} - -// UpdateEnforcerRevokedTokens method update the revoked tokens -// in the enforcer -func UpdateEnforcerRevokedTokens(revokedTokens []types.Resource) { - logger.LoggerXds.Debug("Updating enforcer cache for revoked tokens") - label := commonEnforcerLabel - tokens := append(enforcerLabelMap[label].revokedTokens, revokedTokens...) - - version, _ := crand.Int(crand.Reader, maxRandomBigInt()) - snap, _ := wso2_cache.NewSnapshot(fmt.Sprint(version), map[wso2_resource.Type][]types.Resource{ - wso2_resource.RevokedTokensType: revokedTokens, - }) - snap.Consistent() - - errSetSnap := enforcerRevokedTokensCache.SetSnapshot(context.Background(), label, snap) - if errSetSnap != nil { - logger.LoggerXds.ErrorC(logging.PrintError(logging.Error1414, logging.MAJOR, "Error while setting the snapshot : %v", errSetSnap.Error())) - } - enforcerLabelMap[label].revokedTokens = tokens - logger.LoggerXds.Infof("New Revoked token cache update for the label: " + label + " version: " + fmt.Sprint(version)) -} - // RemoveAPICacheForEnv will remove all the internal mappings for a specific environment func RemoveAPICacheForEnv(adapterInternalAPI model.AdapterInternalAPI, envType string) { vHostIdentifier := GetvHostsIdentifier(adapterInternalAPI.UUID, envType) @@ -757,7 +658,7 @@ func RemoveAPICacheForEnv(adapterInternalAPI model.AdapterInternalAPI, envType s } } } - } + } } // RemoveAPIFromOrgAPIMap removes api from orgAPI map diff --git a/adapter/pkg/discovery/protocol/server/v3/server.go b/adapter/pkg/discovery/protocol/server/v3/server.go index 23877b7b62..1332178d91 100644 --- a/adapter/pkg/discovery/protocol/server/v3/server.go +++ b/adapter/pkg/discovery/protocol/server/v3/server.go @@ -25,9 +25,7 @@ import ( streamv3 "github.com/envoyproxy/go-control-plane/pkg/server/stream/v3" xdsv3 "github.com/envoyproxy/go-control-plane/pkg/server/v3" "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/service/api" - "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/service/apkmgt" "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/service/config" - "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/service/keymgt" "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/service/subscription" "github.com/wso2/apk/adapter/pkg/discovery/protocol/resource/v3" "github.com/wso2/apk/adapter/pkg/discovery/protocol/server/sotw/v3" @@ -39,18 +37,8 @@ import ( type Server interface { config.ConfigDiscoveryServiceServer api.ApiDiscoveryServiceServer - subscription.SubscriptionDiscoveryServiceServer - subscription.ApplicationDiscoveryServiceServer subscription.ApiListDiscoveryServiceServer - subscription.ApplicationPolicyDiscoveryServiceServer subscription.JWTIssuerDiscoveryServiceServer - subscription.SubscriptionPolicyDiscoveryServiceServer - subscription.ApplicationKeyMappingDiscoveryServiceServer - subscription.ApplicationMappingDiscoveryServiceServer - keymgt.KMDiscoveryServiceServer - keymgt.RevokedTokenDiscoveryServiceServer - apkmgt.APKMgtDiscoveryServiceServer - rest.Server envoy_sotw.Server envoy_delta.Server @@ -70,17 +58,8 @@ func NewServerAdvanced(restServer rest.Server, sotwServer envoy_sotw.Server, del type server struct { config.UnimplementedConfigDiscoveryServiceServer api.UnimplementedApiDiscoveryServiceServer - subscription.UnimplementedSubscriptionDiscoveryServiceServer - subscription.UnimplementedApplicationDiscoveryServiceServer subscription.UnimplementedJWTIssuerDiscoveryServiceServer subscription.UnimplementedApiListDiscoveryServiceServer - subscription.UnimplementedApplicationPolicyDiscoveryServiceServer - subscription.UnimplementedSubscriptionPolicyDiscoveryServiceServer - subscription.UnimplementedApplicationKeyMappingDiscoveryServiceServer - subscription.UnimplementedApplicationMappingDiscoveryServiceServer - keymgt.UnimplementedKMDiscoveryServiceServer - keymgt.UnimplementedRevokedTokenDiscoveryServiceServer - apkmgt.UnimplementedAPKMgtDiscoveryServiceServer rest rest.Server sotw envoy_sotw.Server delta envoy_delta.Server @@ -98,45 +77,11 @@ func (s *server) StreamApis(stream api.ApiDiscoveryService_StreamApisServer) err return s.StreamHandler(stream, resource.APIType) } -func (s *server) StreamSubscriptions(stream subscription.SubscriptionDiscoveryService_StreamSubscriptionsServer) error { - return s.StreamHandler(stream, resource.SubscriptionListType) -} func (s *server) StreamApiList(stream subscription.ApiListDiscoveryService_StreamApiListServer) error { return s.StreamHandler(stream, resource.APIListType) } -func (s *server) StreamApplications(stream subscription.ApplicationDiscoveryService_StreamApplicationsServer) error { - return s.StreamHandler(stream, resource.ApplicationListType) -} - -func (s *server) StreamApplicationPolicies(stream subscription.ApplicationPolicyDiscoveryService_StreamApplicationPoliciesServer) error { - return s.StreamHandler(stream, resource.ApplicationPolicyListType) -} - -func (s *server) StreamSubscriptionPolicies(stream subscription.SubscriptionPolicyDiscoveryService_StreamSubscriptionPoliciesServer) error { - return s.StreamHandler(stream, resource.SubscriptionPolicyListType) -} - -func (s *server) StreamApplicationKeyMappings(stream subscription.ApplicationKeyMappingDiscoveryService_StreamApplicationKeyMappingsServer) error { - return s.StreamHandler(stream, resource.ApplicationKeyMappingListType) -} - -func (s *server) StreamApplicationMappings(stream subscription.ApplicationMappingDiscoveryService_StreamApplicationMappingsServer) error { - return s.StreamHandler(stream, resource.ApplicationMappingListType) -} - -func (s *server) StreamKeyManagers(stream keymgt.KMDiscoveryService_StreamKeyManagersServer) error { - return s.StreamHandler(stream, resource.KeyManagerType) -} - -func (s *server) StreamTokens(stream keymgt.RevokedTokenDiscoveryService_StreamTokensServer) error { - return s.StreamHandler(stream, resource.RevokedTokensType) -} - -func (s *server) StreamAPKMgtApplications(stream apkmgt.APKMgtDiscoveryService_StreamAPKMgtApplicationsServer) error { - return s.StreamHandler(stream, resource.APKMgtApplicationType) -} func (s *server)StreamJWTIssuers(stream subscription.JWTIssuerDiscoveryService_StreamJWTIssuersServer) error { return s.StreamHandler(stream, resource.JWTIssuerListType) }