<gh_stars>0
from django.apps import AppConfig


class ApiConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'backend.apps.api'
    alerts_by_provider = ("https://graph.microsoft.com/v1.0/security/alerts?"
                          "$filter=vendorInformation/provider eq '{name}'")
    patch_alerts_by_provider = "https://graph.microsoft.com/v1.0/security/alerts/{alert_id}"
    azure_required_fields = ['client_id', 'client_secret', 'tenant_id']
    azure_scope = ['https://graph.microsoft.com/.default']
    azure_authority = 'https://login.microsoftonline.com/{tenant_id}'
    azure_valid_providers = [
        'ASC',
        'IPC',
        'MCAS',
        'Microsoft Defender ATP',
        'Azure Advanced Threat Protection',
        'Azure Sentinel'
        ]
    get_body_params_for_get = ['provider']
    get_body_params_for_patch = ['assignedTo', 'feedback', 'status', 'closedDateTime',
                                 'vendorInformation', ]
    get_body_params_for_vendorInformation = ['provider', 'providerVersion', 'subProvider', 'vendor']
    missing_body_error_message = 'Missing body required fields'
    invalid_provider_error_message = ('Invalid provider. The provider must be one of the following: {}'
                                      .format(', '.join(str(x) for x in azure_valid_providers)))

from django.apps import AppConfig


class ApiConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'backend.apps.api'
    alerts_by_provider = ("https://graph.microsoft.com/v1.0/security/alerts?"
                          "$filter=vendorInformation/provider eq '{name}'")
    patch_alerts_by_provider = "https://graph.microsoft.com/v1.0/security/alerts/{alert_id}"
    azure_required_fields = ['client_id', 'client_secret', 'tenant_id']
    azure_scope = ['https://graph.microsoft.com/.default']
    azure_authority = 'https://login.microsoftonline.com/{tenant_id}'
    azure_valid_providers = [
        'ASC',
        'IPC',
        'MCAS',
        'Microsoft Defender ATP',
        'Azure Advanced Threat Protection',
        'Azure Sentinel'
        ]
    get_body_params_for_get = ['provider']
    get_body_params_for_patch = ['assignedTo', 'feedback', 'status', 'closedDateTime',
                                 'vendorInformation', ]
    get_body_params_for_vendorInformation = ['provider', 'providerVersion', 'subProvider', 'vendor']
    missing_body_error_message = 'Missing body required fields'
    invalid_provider_error_message = ('Invalid provider. The provider must be one of the following: {}'
                                      .format(', '.join(str(x) for x in azure_valid_providers)))