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

fix(azure-iot-device): security provider should deal with module SAS #703

Merged
merged 1 commit into from
Feb 13, 2020

Conversation

anthonyvercolano
Copy link
Contributor

The SAS security provider should propagate through the moduleId if the SAS has one.

#657

@anthonyvercolano
Copy link
Contributor Author

/az run node-canary

jebrando
jebrando previously approved these changes Feb 13, 2020
Copy link
Collaborator

@jebrando jebrando left a comment

Choose a reason for hiding this comment

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

:shipit:

@jebrando jebrando dismissed their stale review February 13, 2020 17:25

revoking review

@@ -79,9 +79,12 @@ export class SharedAccessSignatureAuthenticationProvider extends EventEmitter im
const sas: SharedAccessSignature = SharedAccessSignature.parse(sharedAccessSignature);
const decodedUri = decodeURIComponent(sas.sr);
const uriSegments = decodedUri.split('/');
const uriDeviceId = (uriSegments.length >= 2 && uriSegments[1] === 'devices') ? (uriSegments[2]) : null;
const uriModuleId = (uriSegments.length >= 4 && uriSegments[3] === 'modules') ? (uriSegments[4]) : null;
const credentials: TransportConfig = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Test please.

@anthonyvercolano
Copy link
Contributor Author

/az run horton-node-gate

The SAS security provider should propagate through the moduleId if the SAS has one.
Copy link
Contributor

@zolvarga zolvarga left a comment

Choose a reason for hiding this comment

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

:shipit:

@anthonyvercolano anthonyvercolano merged commit 9e9f083 into master Feb 13, 2020
@anthonyvercolano anthonyvercolano deleted the fix-moduleid-sas-support branch February 13, 2020 22:36
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.

3 participants