Skip to content

xds: temporary flag protection of GcpAuthenticationFilter #12075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

shivaspeaks
Copy link
Member

@shivaspeaks shivaspeaks commented May 16, 2025

Missing and final piece of gRFC A83-xds-gcp-authn-filter.md

@shivaspeaks shivaspeaks requested a review from kannanjgithub May 16, 2025 10:29
@shivaspeaks shivaspeaks changed the title xds: Add GcpAuthenticationFilter to FilterRegistry xds: temporary flag protection of GcpAuthenticationFilter May 19, 2025
@@ -32,12 +33,19 @@ final class FilterRegistry {

private FilterRegistry() {}

public static boolean isEnabledGcpAuthnFilter() {
return GrpcUtil.getFlag("GRPC_EXPERIMENTAL_XDS_GCP_AUTHENTICATION_FILTER", false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can avoid making this method call and have it static initialized by creating a package-private access static (non-final) variable and set its value in the unit test directly instead of using System.setProperty. Example.

@@ -2417,6 +2417,7 @@ public Object parse(Any value) {

@Test
public void processCluster_parsesAudienceMetadata() throws Exception {
FilterRegistry.isEnabledGcpAuthnFilter = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use try - finally to undo this setting before the test exits. Example
Also in the other test case.

@kannanjgithub kannanjgithub merged commit 9d439d4 into grpc:master May 22, 2025
15 of 16 checks passed
@shivaspeaks shivaspeaks deleted the gcp_authn_filter_in_filter_registry branch May 22, 2025 14:59
shivaspeaks added a commit to shivaspeaks/grpc-java that referenced this pull request May 22, 2025
shivaspeaks added a commit to shivaspeaks/grpc-java that referenced this pull request May 23, 2025
AgraVator pushed a commit to AgraVator/grpc-java that referenced this pull request May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants