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

Improve Azure documentation #6167

Open
dovelus opened this issue Dec 12, 2024 · 7 comments
Open

Improve Azure documentation #6167

dovelus opened this issue Dec 12, 2024 · 7 comments
Assignees
Labels
feature-request New feature request for Prowler. status/awaiting-reponse Waiting response from Issue owner

Comments

@dovelus
Copy link

dovelus commented Dec 12, 2024

New feature motivation

Hi, i'm currently trying to add a Azure tenant to prowler app using the web interface but there isn't a really well explained on what is the Provider UID, in the WIki it's stated that is the "Azure: Enter your Azure Subscription ID." but for tenants with multiple subscription how can i identify what subscription to use ?

Solution Proposed

As you did with the other section a simple GIF where the steps are shown on how to get the Provider UID would be a great improvement.

Describe alternatives you've considered

I would be amazing a simple command in the Azure CLI that is possible to execute to create the App and return the information a user would need to fill the form to create a Provider.

Additional context

No response

@dovelus dovelus added feature-request New feature request for Prowler. status/needs-triage Issue pending triage labels Dec 12, 2024
@puchy22
Copy link
Member

puchy22 commented Dec 12, 2024

Hi @dovelus,

In Azure, the added provider is linked to the subscription. This means that when scanning with an Azure provider, you are scanning a specific subscription. If you want to scan multiple subscriptions, the only way to do this from the App is by configuring a provider for each subscription. As you mentioned, the provider UID for Azure is the subscription ID, which you can easily find in the Azure portal.

If you have already created the Service Principal, you can authenticate with the same credentials to multiple subscriptions as long as they belong to the same tenant. To avoid confusion with names, consider using the same alias in the app that you use in your Azure account and for adding subscription level permission look this tutorial to make it easier.

I’ll also consider adding a CLI-based tutorial for creating the Service Principal alongside the existing portal-based guide.

If you have any further questions or if something wasn’t clear, don’t hesitate to reach out.

Best regards, and thanks for using Prowler!! 🚀

@puchy22 puchy22 self-assigned this Dec 12, 2024
@dovelus
Copy link
Author

dovelus commented Dec 13, 2024

I have tried every single Subscription ID my tenant has to offer but i always get this error
immagine

@puchy22
Copy link
Member

puchy22 commented Dec 16, 2024

Hi @dovelus,

I’ve improved the documentation by adding some requests, including specifying the commands as you suggested, to make everything much simpler. Here’s the PR #6210 and a preview link of the documentation to see if this resolves your issue.

If the problem persists, I recommend testing the CLI to check if the problem it’s related to Azure authentication or the app installation. Reach me if the issue persist to try to solve.

Best regards, and thank you very much!

@puchy22 puchy22 added status/awaiting-reponse Waiting response from Issue owner and removed status/needs-triage Issue pending triage labels Dec 20, 2024
@puchy22
Copy link
Member

puchy22 commented Dec 20, 2024

Hi @dovelus,

I hope my comments have resolved your issue. If that is not the case, please let me know. Otherwise, if I do not receive a response, I will assume that everything has been resolved and proceed to close the issue.

Should you wish to respond after the issue has been closed, feel free to reopen it.

Thank you and best regards.

@dovelus
Copy link
Author

dovelus commented Dec 20, 2024

Sorry for the late response but still e get the error on the Subscription ID I use to initiate a provider the error remains the same, here are the speps I do:

  1. Login to azure with administrator account
  2. Copy subscription ID for the first section of provider creation
  3. Register a new app using the Azure Web CLI with the command provided in the docs and add required API permissions
  4. Insert AppID in Client ID, secret, and Tenant ID
  5. Test the connection in prowler and get the same error

@puchy22
Copy link
Member

puchy22 commented Dec 21, 2024

Hi @dovelus,

When in step 3 you refer to the API permissions are you also assigning the required permissions at the subscription scope for the subscription to audit?

If yes I will need more information about the error to help you like the API logs or try to run it from the CLI and show me the error logs by running the command prowler azure --sp-env-auth --log-level ERROR --verbose with the environment variables set.

It may take longer to answer than usual due to the christmas holidays, but please contact me when you can and I will try to answer you as soon as possible. Thank you very much and best regards.

@dovelus
Copy link
Author

dovelus commented Dec 26, 2024

Thanks for the help, in the end was me not reading the documentation properly, but the addition of a quick command was very helpful in the case i need to quickly create the App

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature request for Prowler. status/awaiting-reponse Waiting response from Issue owner
Projects
None yet
Development

No branches or pull requests

2 participants