Security level and authority are parameters required to be passed to applyRequestMetadata(). We will wrap them, along with MethodDescriptor and the transport attributes, to a first-class object RequestInfo, which is more clear to the implementers than via Attributes.
ATTR_SECURITY_LEVEL will be moved to the internal GrpcAttributes and annotated as TransportAttr, because transports are required to set it, but no user is actually reading them from
{Client,Server}Call.getAttributes().
ATTR_AUTHORITY should be removed, because no transport is overriding it.
This is an API-breaking change because CallCredentials is interface. It will be changed to abstract class, so that further API changes can be done in multiple steps without breaking implementations.
The CallCredentials name is stabilized, thus it must be the name of the new interface. We will take the following steps to finish the change.
- Introduce
CallCredentials2, which is the new API, which implements the old CallCredentials. Change all stock implementations to it. Deprecate the old CallCredentials.
- Make a release, and ask all implementations (including FirestoreCallCredentials) to implement
CallCredentials2 instead.
- Replace
CallCredentials with CallCredentials2, keeping CallCredentials2 as an alias.
- Make a release, and ask all implementations (including FirestoreCallCredentials) to switch back to the name
CallCredentials.
- Delete the alias
CallCredentials2
During the whole process, the name CallCredentials stays usable, and we require no change in code that passes CallCredentials objects along.
/cc @ejona86
Security level and authority are parameters required to be passed to applyRequestMetadata(). We will wrap them, along with MethodDescriptor and the transport attributes, to a first-class object
RequestInfo, which is more clear to the implementers than viaAttributes.ATTR_SECURITY_LEVELwill be moved to the internalGrpcAttributesand annotated asTransportAttr, because transports are required to set it, but no user is actually reading them from{Client,Server}Call.getAttributes().ATTR_AUTHORITYshould be removed, because no transport is overriding it.This is an API-breaking change because
CallCredentialsisinterface. It will be changed to abstract class, so that further API changes can be done in multiple steps without breaking implementations.The CallCredentials name is stabilized, thus it must be the name of the new interface. We will take the following steps to finish the change.
CallCredentials2, which is the new API, which implements the oldCallCredentials. Change all stock implementations to it. Deprecate the oldCallCredentials.CallCredentials2instead.CallCredentialswithCallCredentials2, keepingCallCredentials2as an alias.CallCredentials.CallCredentials2During the whole process, the name
CallCredentialsstays usable, and we require no change in code that passesCallCredentialsobjects along./cc @ejona86