We could remove the need for client_id and client_secret all together and just add instructions for users to add an MSI with relevant RBAC applied to get a token using this code:
import MISP2Sentinel.config as config
from MISP2Sentinel.constants import *
scope = config.ms_auth[SCOPE]
credential = DefaultAzureCredential()
credential.get_token('https://management.azure.com/').token
Hey @cudeso seeking your advice if the Azure Function app should be aware that an Managed Service Identity (MSI) is in use?
This specifically relates to the code crafting a request to fetch an "access_token" using client_id and client_secret - https://github.com/cudeso/misp2sentinel/blob/f9e4ef4b3b0dac92d10fee769fbf60d72659bb1a/AzureFunction/MISP2Sentinel/RequestManager.py#L68
We could remove the need for client_id and client_secret all together and just add instructions for users to add an MSI with relevant RBAC applied to get a token using this code: