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

EdgeHub: Resync service identity if client request cannot be authenticated #556

Merged
merged 8 commits into from
Nov 27, 2018

Conversation

varunpuranik
Copy link
Contributor

Currently, EdgeHub pulls service identities of devices/modules in scope and caches them locally. This cache is re-synced every hour (configurable).
If during this time, the client key was updated in IoTHub, the subsequent authentication will fail for the client if the client tried to connect to EdgeHub. To prevent this, if the authentication of an identity in scope fails locally, try to resync the identity with IoTHub and authenticate again.

myagley
myagley previously approved these changes Nov 26, 2018
(isAuthenticated, valueFound) = await this.AuthenticateWithServiceIdentity(tCredentials, moduleIdentity.DeviceId, syncServiceIdentity);
}

return (isAuthenticated, !valueFound);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment about what these flags mean/are used for?

@varunpuranik varunpuranik merged commit 677e16d into Azure:master Nov 27, 2018
@varunpuranik varunpuranik deleted the RepullCreds branch November 27, 2018 02:46
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

Successfully merging this pull request may close these issues.

2 participants