There is a tiny bit of setup to get everything working here after you clone the repo...
First you must setup a new App Registration and secret to be able to play around with this.
- Go to the Azure Portal (https://portal.azure.com)
- Go to Microsoft Entra ID
- Select "App registrations" under Manage in the menu blade
- Click the "➕ New registration" button
- For this testing, you can leave it on "Accounts in this organizational directory only (Default Directory only - Single tenant)"
- Redirect URI, set it to "Web" and "https://localhost:44321/"
- You could select a different port on localhost, but this MUST match when you enter it in the Notebook
- Click the Register button
- Now go back to App Registration and select the application you just created
- Go to "Certificates & secrets"
- To start I would recommend using Client secrets, as it is pretty easy to setup just click "➕ New client secret"
- Copy and save this secret as you will be using it throughout the notebooks, don't loose it as you won't be able to recover it, but you can create a new one
- For Certificates authentication, you must first create the certificate and then upload it here.
- If you are interested in that, check the `/Cert_Setup" directory for more information on how to create and set that up.
- To start I would recommend using Client secrets, as it is pretty easy to setup just click "➕ New client secret"
The code uses BST Tools (https://github.com/ManuelBerrueta/BST) as a submodule to do some functions that are already part of the code in those tools.
git submodule update --init --recursive
To make sure you have the latest submodules:
git submodule update --recursive --remote
You could skip setting up a virtual environment and just install the packages:
pip install -r requirements.txt
urlyzer is a tool to analyze URLs. It will become very handy for looking at the response URLs from the token requests as well as analyzing the request URLs, as they both often contain multiple parameters. You can get it at https://github.com/ManuelBerrueta/urlyzer.
- Create a Virtual Environment for the project:
python3 -m venv flowAnalyzerEnv
- Activate Your Virtual Environment: Type the following command and press Enter:
source flowAnalyzerEnv/bin/activate
Now you're inside your virtual environment!
- Install Packages: You can now use pip to install Python packages, and they'll only be installed in this virtual environment.
- In our cases we can use the
requirements.txt
I have provided:
pip install -r requirements.txt
- We can verify they are installed by using:
pip list
- Exit Your Virtual Environment: Once you're done working on your project, you can exit the virtual environment by typing:
deactivate
If you end using other packages in your own development and testing, you can freeze those using:
pip freeze > requirements.txt