Log into Azure using the raw api https://login.microsoftonline.com/{}/oauth2/token\
passing required headers to get Oauth token.
Then retrieve CDNS ip's from "https://management.azure.com/providers/Microsoft.Cdn/edgenodes?api-version=2023-05-01"
-
Create App in Azure Id
- Create Client_ID (AppID) and secret for the app to login with
-
Create .env file in root of repo
## NOT in GIT## TENANT_ID="39......-....-....-....-............3" # client id / app id CLIENT_ID="4.......-....-....-....-...........5" # client secret / password for app/client id CLIENT_SECRET="F......................................D"
- src/req_get_info.rs gets Oauth token from [https://login.microsoftonline.com/{TENANT_ID}/oauth2/token]
- src/req_get_info.rs then gets Verizon cdn ips from [https://management.azure.com/providers/Microsoft.Cdn/edgenodes?api-version=2023-05-01]
- src/parse_cdn.rs with serde is used to parse the info
- we grab all the ipv4 ips and masks, make them uniq and print them in a list that can be used with nginx real_ip module, to identify valid forwarded_for IP's