CallCredentials interface, 2nd edition
See original GitHub issueSecurity 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 oldCallCredentials
. Change all stock implementations to it. Deprecate the oldCallCredentials
. - Make a release, and ask all implementations (including FirestoreCallCredentials) to implement
CallCredentials2
instead. - Replace
CallCredentials
withCallCredentials2
, keepingCallCredentials2
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
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
We should have a few releases before removing CallCredentials2, since #5216 was only recent.
CallCredentials2 re-delete was in #8572