Skip to content

[ACS] Update the handling of service principals.#1469

Merged
derekbekoe merged 1 commit intoAzure:masterfrom
brendandburns:sp
Dec 8, 2016
Merged

[ACS] Update the handling of service principals.#1469
derekbekoe merged 1 commit intoAzure:masterfrom
brendandburns:sp

Conversation

@brendandburns
Copy link
Member

@brendandburns brendandburns commented Nov 30, 2016

Fix a bug where command line flags would be ignored
Validate that the service principal still exists

@colemickens for sanity checking

Fixes #1442

@mention-bot
Copy link

@brendandburns, thanks for your PR! By analyzing the history of the files in this pull request, we identified @sanar-microsoft and @colemickens to be potential reviewers.

Copy link
Contributor

@colemickens colemickens left a comment

Choose a reason for hiding this comment

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

one small question out of curiosity.

Copy link
Contributor

Choose a reason for hiding this comment

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

What's the purpose of calling store_acs_service_principal twice (lines 274, 280)?

Copy link
Member Author

Choose a reason for hiding this comment

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

removed, I think originally I didn't salt the URL, so if I didn't save it it prevented subsequent creates, but that was removed, so it's no longer necessary...

@derekbekoe derekbekoe changed the title Update the handling of service principals. [ACS] Update the handling of service principals. Dec 1, 2016
@brendandburns
Copy link
Member Author

Comment addressed, please re-check.

Thanks!

Copy link
Member

@derekbekoe derekbekoe left a comment

Choose a reason for hiding this comment

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

On it's own, this change LGTM but command modules should not have dependencies on each other as they version independently and can change.

from azure.cli.command_modules.role.custom import (
_graph_client_factory,
show_service_principal,
)
Copy link
Member

Choose a reason for hiding this comment

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

Command modules should not have dependencies on each other...

Since command modules are/will be versioned independently, this could fail in the future if there's a change to the 'role' module that changes these methods (especially as the _graph_client_factory() is private).

Any logic needed should be included here.

You can choose to leave it as is but there are no guarantees.

Copy link
Member

Choose a reason for hiding this comment

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

Related to this from a prev. PR - #1258 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

@derekbekoe derekbekoe left a comment

Choose a reason for hiding this comment

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

Approving this change.

@derekbekoe derekbekoe merged commit 9a12bee into Azure:master Dec 8, 2016
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.

4 participants