Conversation
…ith unified resource and token exchange Signed-off-by: yosrixp <yosrixp@yahoo.com>
MartinTrojans
approved these changes
Apr 15, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
(Drive, Docs, Sheets, Slides, Gmail, Calendar, Tasks, Chat, Forms, Keep, Meet) plus a shared
google-cloud-platformprovider for services using thecloud-platformscope (e.g. Transcoder, Apigee)GoogleWorkspaceResourceusing@Pathregex with@PathParam— replacing 13 classes (1 abstract base + 12 subclasses) with 1@DependentTokenExchangeServiceGoogleWorkspaceImplmanaged byTokenExchangeServiceProducervia CDIInstance—replacing 12 near-identical classes with 1
rangeloops overgoogleWorkspaceServiceslist invalues.yaml,and YAML anchors in
application.dev.yamlfor shared Google OAuth credentials and remote-server entriesCustomTokenStateManager.getProviderFromOidcConfig()to return the unique OIDC tenant ID instead ofthe generic provider type, resolving token collision between Google tenants
Changes
Java
GoogleWorkspaceResource— single class with@Path("/{provider: google-(?:drive|docs|...)}/authorize")handles all 12 Google OAuth callbacks via
@PathParam("provider")TokenExchangeServiceGoogleWorkspaceBase— shared token refresh logic with settableproviderLabelTokenExchangeServiceGoogleWorkspaceImpl— single@Dependentbean instantiated per provider by the producerTokenExchangeServiceProducer—@PostConstructloop creates and caches one instance per Google providerOauthProviderLabel— added constants for all Google Workspace services +google-cloud-platformCustomTokenStateManager— fixed tenant ID resolution for multi-tenant Google OIDCConfiguration
application.yaml— 12 Google OIDC tenants with shared credentials via YAML anchor&google-workspace-credsapplication.dev.yaml— full dev config with service-specific scopes, resource mappings on port 4000,and YAML anchors for remote-server deduplication
configmap.yaml— Helmrangeloops for HTTP permissions, OIDC tenants, and remote-server entriesvalues.yaml—googleWorkspaceServiceslist driving all Helm loopsdev-mcp-gateway/mcp-gatewayTests
GoogleWorkspaceResourceTestwith@ParameterizedTestover all providersTokenExchangeServiceGoogleWorkspaceImplTestwith parameterized provider label testsTokenExchangeServiceProducerTestfor map-based Google provider resolutionTest plan
helm templatefor stage and prod valuesmvn test