-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(browser auth): fix browser auth in Azure to include tenant id #2415
fix(browser auth): fix browser auth in Azure to include tenant id #2415
Conversation
prowler/lib/cli/parser.py
Outdated
azure_parser.add_argument( | ||
"--tenant-id", | ||
nargs="+", | ||
default=[], | ||
help="Azure tenant id to be used with --browser-auth option", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this variable is a list? If we need to pass a list of tenants please change it to --tenant-ids
and change the description accordingly.
@@ -59,7 +60,14 @@ def __set_credentials__( | |||
) | |||
sys.exit(1) | |||
else: | |||
credentials = InteractiveBrowserCredential() | |||
try: | |||
credentials = InteractiveBrowserCredential(tenant_id=tenant_id[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment about the --tenant-id
.
Context
Browser auth in azure was failing under certain circunstancies. It looked like it was related with the tenant id assumed as default
Description
Modify the browser auth mode to include the tenant id as argument
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.