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

Token based authentication is causing very frequent refresh token generation activity on Azure Portal #42

Open
krpranay opened this issue Nov 25, 2019 · 0 comments

Comments

@krpranay
Copy link

Expected Behavior

Actual Behavior

I am using tokenprovider approach to created new eventhub object.
tokenProvider, err := aad.NewJWTProvider(aad.JWTProviderWithEnvironmentVars())
cred, err := storageLeaser.NewAADSASCredential( azurehubevent.SubscriptionID, azurehubevent.ResourceGroupName, storageAccountName, w.StorageBlobName, storageLeaser.AADSASCredentialWithEnvironmentVars())
leaserCheckpointer, err := storage.NewStorageLeaserCheckpointer(cred, storageAccountName, w.StorageBlobName, azureEnv)
// Starting New Connection processor, err := eph.New( ctx, eventhubconnstring, eventhubinstanceName, tokenProvider, leaserCheckpointer, leaserCheckpointer, eventProcessorHostOption...)
err = processor.Start(ctx)

I am able to connect to event hub and fetch activity logs out of it. But seems most of the logs are related to "Returns Storage Account SAS Token". This is due to the very frequent call going from my application to refresh token.

Is there any way to reduce the number of refresh token calls?

Note : I saw dotnet version have one parameter called tokenTimeToLive to specify how long token is valid.

Environment

  • OS: windows 10
  • Go version: 13.4
  • Version of Library: Latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant