Skip to content

Commit 7cc704d

Browse files
committed
Cut the pre-auth-required attribute for now.
1 parent a684359 commit 7cc704d

2 files changed

Lines changed: 1 addition & 14 deletions

File tree

binder/src/main/java/io/grpc/binder/ApiConstants.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,6 @@ private ApiConstants() {}
4646
public static final NameResolver.Args.Key<UserHandle> TARGET_ANDROID_USER =
4747
NameResolver.Args.Key.create("target-android-user");
4848

49-
/**
50-
* Marks an {@link io.grpc.EquivalentAddressGroup} as needing pre-authorization.
51-
*
52-
* <p>Clients should authorize servers before connecting to them, but older versions of the binder
53-
* transport didn't do so. While this important extra security check is now possible (see {@link
54-
* BinderChannelBuilder#preAuthorizeServers(boolean)}, it remains optional, because it's a slight
55-
* behavior change and has a small performance cost and we don't want to break existing apps.
56-
*/
57-
public static final Attributes.Key<Void> PRE_AUTH_REQUIRED =
58-
Attributes.Key.create("pre-auth-required");
59-
6049
/**
6150
* The authentic ServiceInfo for an {@link io.grpc.EquivalentAddressGroup} of {@link
6251
* AndroidComponentAddress}es, in case a {@link NameResolver} has already looked it up.

binder/src/main/java/io/grpc/binder/internal/BinderTransport.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,7 @@ public BinderClientTransport(
611611
this.securityPolicy = factory.securityPolicy;
612612
this.offloadExecutor = offloadExecutorPool.getObject();
613613
this.readyTimeoutMillis = factory.readyTimeoutMillis;
614-
this.preAuthorizeServer =
615-
factory.preAuthorizeServers
616-
|| (options.getEagAttributes().get(ApiConstants.PRE_AUTH_REQUIRED) != null);
614+
this.preAuthorizeServer = factory.preAuthorizeServers;
617615
numInUseStreams = new AtomicInteger();
618616
pingTracker = new PingTracker(Ticker.systemTicker(), (id) -> sendPing(id));
619617

0 commit comments

Comments
 (0)