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.

Support on invalid authentication / org.cloudfoundry.reactor.util.Operator$ResponseReceiver$InvalidTokenException is private

See original GitHub issue

This is in reference to https://github.com/promregator/promregator/issues/182#issuecomment-637757562.

In a nutshell: A user apparently has some sort of authentication issue when trying to logon to the CF platform (when starting the application). On sending the first request (in our case it’s a cloudFoundryClient.info().get(request)), an exception is raised:

   2020-06-02T10:57:01.79-0400 [APP/PROC/WEB/0] OUT Caused by: org.cloudfoundry.reactor.util.Operator$ResponseReceiver$InvalidTokenException: null
   2020-06-02T10:57:01.79-0400 [APP/PROC/WEB/0] OUT 	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
   2020-06-02T10:57:01.79-0400 [APP/PROC/WEB/0] OUT Assembly trace from producer [reactor.core.publisher.MonoProcessor] :
   2020-06-02T10:57:01.79-0400 [APP/PROC/WEB/0] OUT 	reactor.core.publisher.Mono.checkpoint(Mono.java:1862)
   2020-06-02T10:57:01.79-0400 [APP/PROC/WEB/0] OUT 	org.cloudfoundry.reactor.tokenprovider.AbstractUaaTokenProvider.token(AbstractUaaTokenProvider.java:255)

In essence this hints to https://github.com/cloudfoundry/cf-java-client/blob/272094ceca9c54b7ccf125adf80d5be044a4f73b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/Operator.java#L233.

Note that this class is also private - and virtually does not contain any valuable information - in particular no information about what went wrong during authentication.

I also tried to do along something the lines of

Mono<String> tokenMono = this.cloudFoundryClient.getTokenProvider().getToken(this.cloudFoundryClient.getConnectionContext());
tokenMono.doOnError(e -> {
    log.error("Error while getting the Auth Token", e);
}).block();

but also here only the same private exception is raised.

All this leads to the questions: How are consumers of the library intended to perform the verification of authentication? What is the expected error handling / the intended support approach on detecting invalid credentials provided?

Thanks for the pointer!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
eaglerainbowcommented, Jun 2, 2020

ad 3.22.0 - Wilco

With https://github.com/promregator/promregator/issues/183 I have bumped the version to 3.24.0. Will go out with our next release version.

BTW: As already expected, bumping did not change anything in the behavior (initial topic of this ticket).

1reaction
twoseatcommented, Jun 2, 2020

It’s worth saying that we take great care to retain backwards compatibility, so it’s worth updating to the latest version as often as your corporate policies allow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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