Org data In: Task Out: Task completion Functions Applications In: Request Out: Response Web Out: Fresh data Tasks completion Attacker Data sources Data Training Agents Azure AI Data Grounding User Video Speech Images Text Generative AI app AI model AI model AI model AI usage AI application AI platform External app AI data Direct prompt injection (UPIA) Sensitive data leakage Unauthorized access/oversharing Overreliance Model denial of service Wallet (GPU abuse) Data poisoning Indirect prompt injection (XPIA) Orchestration vulnerability Supply chain risks Model theft Data poisoning Model vulnerabilities Insecure plugins design or skills Jailbreak Data
98% of attacks1 Enable multifactor authentication Apply least privilege access Keep up to date Utilize antimalware Protect data Make it harder for bad actors to utilize stolen or phished credentials by enabling multifactor authentication. Always authenticate and authorize based on all available data points, including user identity, location, device health, service or workload, data classification, and anomalies. Prevent attackers from spreading across the network by applying least privilege access principles, which limits user access with just-in-time and just-enough-access (JIT/JEA), risk-based adaptive polices, and data protection to help secure both data and productivity. Mitigate the risk of software vulnerabilities by ensuring your organization’s devices, infrastructure, and applications are kept up to date and correctly configured. Endpoint management solutions allow policies to be pushed to machines for correct configuration and ensure systems are running the latest versions. Stop malware attacks from executing by installing and enabling antimalware solutions on endpoints and devices. Utilize cloud-connected antimalware services for the most current and accurate detection capabilities. Know where your sensitive data is stored and who has access. Implement information protection best practices such as applying sensitivity labels and data loss prevention policies. If a breach does occur, it’s critical that security teams know where the most sensitive data is stored and accessed.
people fairly. Reliability and safety AI systems should perform reliably and safely. Privacy and security AI systems should be secure and respect privacy. Inclusiveness AI systems should empower everyone and engage people. Transparency AI systems should be understandable. Accountability People should be accountable for AI systems.
respect privacy. Privacy and security Fairness AI systems should treat all people fairly. Reliability and safety AI systems should perform reliably and safely. Inclusiveness AI systems should empower everyone and engage people. Transparency AI systems should be understandable. Accountability People should be accountable for AI systems.
System Message & Grounding Ground your model and direct its behavior Safety System Monitor and protect model inputs and outputs Model Choose the right model for your use case
easily leaked API keys can be passed around a company (unintentionally) API keys can be painful to rotate https://myopenai.openai.azure.com/openai/ deployments/mychat/chat/completions? api-version=2024-02-15-preview Content-Type: application/json api-key: YOUR_API_KEY Tokens are short-lived No key vault necessary! Role-based access can provide fine-grained access to services https://myopenai.openai.azure.com/openai/deploym ents/mychat/chat/completions? api-version=2024-02-15-preview Content-Type: application/json Authorization: Bearer YOUR_API_TOKEN
Create the Azure OpenAI service 2. Create the Azure Container App 3. Create an identity for the App to use 4. Give your App identity permissions to use the OpenAI service 5. Use an Azure Identity SDK to generate tokens for the OpenAI SDK Example project: aka.ms/keyless-azure-containerapps OpenAI SDK App Identity Azure OpenAI
Identity SDK to get a credential Pass a credential or token provider to the OpenAI SDK Token refresh is taken care of for you! azure_credential = ManagedIdentityCredential() token_provider = get_bearer_token_provider( azure_credential, "https://cognitiveservices.azure.com/.default") client = AzureOpenAI( azure_endpoint=os.getenv("OPENAI_ENDPOINT"), azure_ad_token_provider=token_provider ) Python OpenAIClient client = new( new Uri(GetEnvironmentVariable("OPENAI_ENDPOINT")), new ManagedIdentityCredential()); .NET
Entra servers Visits webapp OAuth2 Leg 1 Initiate the authorization code flow &scope=openid email name Returns redirect to URI Returns authorization URI Signs in Returns redirect to redirectURI OAuth2 Leg 2 Exchange authorization code for token Render webpage Returns access token and ID token
App Service or Container Apps Option 2: MSAL for auth on any host (including local) Use MSAL packages to orchestrate OIDC flow using app registration Video: User Auth with MSAL aka.ms/msal-sdk-stream
the Microsoft identity platform, you need to register a Microsoft Entra application and create a service principal for it. Microsoft Entra Application Object Microsoft Graph Service Principal Microsoft identity platform
go password-less! More secure than secrets/certificates since no strings need to be stored securely or rotated. var openIdIssuer = '${loginEndpoint}${tenant().tenantId}/v2.0' resource webIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = { name: '${name}-id' location: location } resource clientAppFic 'federatedIdentityCredentials@beta' = { name: '${clientApp.uniqueName}/msiAsFic' audiences: ['api://AzureADTokenExchange'] issuer: openIdIssuer subject: webIdentity.properties.principalId } aka.ms/graph-bicep-mi-fic appreg.bicep Upcoming
the app ID of the Entra app registration • Set clientSecretSettingName to special value to use MI FIC • Set openIdIssuer to the Microsoft idP endpoint var loginEndpoint = environment().authentication.loginEndpoint var openIdIssuer = '${loginEndpoint}${tenant().tenantId}/v2.0' resource auth 'Microsoft.App/containerApps/authConfigs@2023-05-01' = { parent: app name: 'current' properties: { platform: { enabled: true } globalValidation: { redirectToProvider: 'azureactivedirectory' unauthenticatedClientAction: 'RedirectToLoginPage' } identityProviders: { azureActiveDirectory: { registration: { clientId: clientId clientSecretSettingName: 'OVERRIDE_USE_MI_FIC_ASSERTION_CLIENTID' openIdIssuer: openIdIssuer } } } } } aka.ms/azai/auth-builtin appreg.bicep
Azure AI Search Azure OpenAI Backend subnet Virtual Network privatelink.openai.azure.com Private DNS Zone cog-gvzpdyppfabnc.openai.azure.com Private endpoint The resource URL remains the same, no app code change needed! Private link
Web Application Firewall plus Front Door: Public Internet Web Application Firewall Front Door App server, orchestrator → Query Knowledge Azure AI Search → Response Azure OpenAI Prompt + knowledge Network security group Azure Virtual Network *Front Door can be replaced with Application Gateway for a regionally distributed app
1 Scalable, highly available, Low latency service provided at network edge 2 Easy setup with managed ruleset (OWASP TOP 10) and custom rules 3 Bot protection using threat intelligence-based filtering (preview) 4 Global insights 5 Built-in DDoS protection 6 Azure Front Door provides built-in CDN capabilities 7 Cost efficient: Pay as you go Public Internet WAF & Front Door Azure Edge Web Servers Azure Web App Azure Regions Public Internet WAF & Application Gateway Web Servers Azure Web App Azure Region
Security posture: Audits Azure resources and their settings Workload protections: Scans for known vulnerabilities in SQL, container images, etc. Data security: Scans stored data for PII and sensitive data Regulatory compliance: Ensure compliance with benchmarks. aka.ms/enable-defender
Azure AI Content Safety Developers Security teams Key: Attempted user-based attack through the application Azure AI Content Safety Inputs and outputs Azure AI Prompt attacks blocked by Azure AI Content Safety prompt shields Signals from Microsoft threat intelligence Contextual security alerts Microsoft Defender for Cloud Application context Investigate in Microsoft Defender XDR or SIEM SecOps Automatic response https://learn.microsoft.com/azure/defender-for-cloud/ai-onboarding
center - aka.ms/dev/ms-entra Get started with Defender for Cloud - aka.ms/enable-defender Python Risk Identification Tool for generative AI – aka.ms/pyrit Azure Well Architected Framework – aka.ms/wellarchitectedframework Azure AI Content Safety – aka.ms/aicontentsafety
Sp34k is a webinar series where we interview industry experts about how to use AI securely and how organizations should use AI, like Microsoft Copilot for Security, to enhance their security. aka.ms/copilotl33tsp34k