question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CallCredentials interface, 2nd edition

See original GitHub issue

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.

  1. Introduce CallCredentials2, which is the new API, which implements the old CallCredentials. Change all stock implementations to it. Deprecate the old CallCredentials.
  2. Make a release, and ask all implementations (including FirestoreCallCredentials) to implement CallCredentials2 instead.
  3. Replace CallCredentials with CallCredentials2, keeping CallCredentials2 as an alias.
  4. Make a release, and ask all implementations (including FirestoreCallCredentials) to switch back to the name CallCredentials.
  5. 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:closed
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ejona86commented, Feb 26, 2019

We should have a few releases before removing CallCredentials2, since #5216 was only recent.

0reactions
ejona86commented, Jun 28, 2022

CallCredentials2 re-delete was in #8572

Read more comments on GitHub >

github_iconTop Results From Across the Web

CallCredentials2 (grpc-api 1.25.0 API) - Javadoc.io
The new interface for CallCredentials . THIS CLASS NAME IS TEMPORARY and is part of a migration. This class will BE DELETED as...
Read more >
CallCredentials (grpc-all 1.51.0 API)
Carries credential data that will be propagated to the server via request metadata for each RPC. This is used by CallOptions.withCallCredentials(io.grpc.
Read more >
CallCredentials on "Insecure" Channels (in C-based ...
2 ) While I understand gRPC's belief that it's insecure to exchange tokens over plaintext channels, the reality is that the application-level implementation ......
Read more >
How to get rid of call to CallCredentials2 in grpc api
I tried looking up more about CallCredentials2 initially to figure out what was causing the issue, but I could not find much of...
Read more >
kamon-io/Kamon - Gitter
Using latest version of Kamon 2.x, Java 11 OpenJDK and Scala 2.13 ... not sent to Datadog (indeed seems its not possible to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found