Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate better with the spring-boot-zalando-stups-tokens starter #10

Open
BGehrels opened this issue May 5, 2017 · 3 comments
Open
Labels
auto-configuration everything about the auto-configuration features enhancement help wanted

Comments

@BGehrels
Copy link
Contributor

BGehrels commented May 5, 2017

At the moment, the user needs to define the token url and the scopes in a different format than for the rest of her application if she uses spring-boot-zalando-stups-tokens.

We should use the AccessTokens bean initialized by spring-boot-zalando-stups-tokens if it already is present.

@ePaul
Copy link
Member

ePaul commented May 16, 2018

This is needed when deploying your application in Zalando's Kubernetes infrastructure, as there you just get your token into some file (and the app doesn't fetch it from some URL, or gets to decide which scopes to have).

An application can currently configure it like this, given that accessTokens is a bean implementing the AccessTokens interface, e.g. from tokens-spring-boot-starter.

@Bean	
public org.zalando.nakadiproducer.AccessTokenProvider nakadiProducerAccessTokenProvider() {
        return () -> accessTokens.get("nakadi");	
}

Our library should be able to do this by itself, possibly with a configuration property saying which token to use from the AccessTokens object, possibly with a fallback to just nakadi.

@ePaul ePaul added the auto-configuration everything about the auto-configuration features label Jul 4, 2018
@ePaul
Copy link
Member

ePaul commented Jul 9, 2018

Idea from @BGehrels: Only reuse existing AccessTokens bean if it exists and there is no nakadi-producer.access-token-uri defined (and we are not already using the existing Fahrschein bean from #85).

@whiskeysierra
Copy link

The tokens library, and all supporting libraries, are not really needed for k8s anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-configuration everything about the auto-configuration features enhancement help wanted
Projects
None yet
Development

No branches or pull requests

3 participants