Closed exrme18 closed 4 years ago
@exrme18 Have u tried to install azure cli?
@exrme18
After the you run the az login
There a browser which opens up for doing the authentication/login. From which the tokens are received and further calls are made to audit the Azure.
Hence I would ask you to run the azure audit, from your local pc.
@shivankar-madaan I have installed the az cli and successfully authenticated the Azure portal. However, on running the azureaudit.py and cs.py I am getting the same error.
Do I need to make any other changes in the configuration? thanks
@exrme18 did the script open https://login.microsoftonline.com
for the authentication on your browser?
@shivankar-madaan No when I run the script it gave me the error but when I used the az login command the login page was opened.
Oh ok
So the script is basically failing in running az login
checking on it
@shivankar-madaan I think yes. Please update me once you are done.
@exrme18 can you share the complete error stack trace It seems to be working on my system
Adding headless login feature now Should work without any browser interaction Please re-open the issue, if you're stuck
Hey @challs1 @shivankar-madaan can you please tell what exact command do I need to run from command line as I am getting the same error on running following command: python cs.py -env azure
File "cs.py", line 55, in
main()
File "cs.py", line 50, in main
from modules import azureaudit
File "/root/cs-suite/modules/azureaudit.py", line 9, in
subprocess.call(['az', 'login'])
File "/usr/lib/python2.7/subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 394, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
"For azure, the first command az login requires a browser interaction to authenticate with Azure subscription" What exactly you are referring here. thanks
Originally posted by @exrme18 in https://github.com/SecurityFTW/cs-suite/issues/21#issuecomment-470865355