SlideShare una empresa de Scribd logo
1 de 45
Session
Rick van den Bosch
Securing an Azure Function REST API with Azure Active Directory
#SAFwAD
Session
Rick van den Bosch
@rickvdbosch
rickvandenbosch.net
rickvdbosch@outlook.com
Azure Active Directory
Azure Functions
Static website hosting
ADAL & MSAL
Putting things together
Agenda
Azure Active Directory
“Azure Active Directory (Azure AD) is
Microsoft’s cloud-based
identity and access management service.
Azure AD helps your employees
sign in and access resources”
Azure Active Directory
• Seamless, highly secure access
• Comprehensive identity protection
• Efficient management and compliance at scale
• Customer and partner identities
• Identity platform for developers
• Identity for IaaS (infrastructure as a service)
Azure Active Directory
IT admins
App developers
Subscribers of
- Microsoft 365
- Office 365
- Azure
- Dynamics CRM online
Who uses Azure AD?
Free FREE!
Basic € 0,844 kr 6,294 user / month *
Premium P1 € 5,06 kr 37,761 user / month *
Premium P2 € 7,59 kr 56,641 user / month *
“Pay as you go” feature license.
* Annual commitment
Pricing tiers
“Azure Active Directory (Azure AD) B2C is
an identity management service
that enables you to customize and control
how customers sign up, sign in, and manage their profiles
when using your applications.
This includes applications developed for
iOS, Android, and .NET, among others.”
Azure AD B2C
Azure AD B2C - Pricing
Azure Functions
“Accelerate your development with an
event-driven, serverless compute experience.
Scale on demand and pay only for the resources you consume.”
Azure Functions
• Take advantage of serverless compute with Functions
• Manage your apps instead of infrastructure
• Optimize for business logic
• Develop your way
Azure Functions
Web application backends
Mobile application backends
Real-time file processing
Real-time stream processing
Automation of scheduled tasks
Extending SaaS applications
What you can do with Functions
Two major versions: 1.x and 2.x
Current version: 2.x
Both supported for production
Runtimes
Supported languages
Language 1.x 2.x
C# GA (.NET Framework 4.7) GA (.NET Core 2)
JavaScript GA (Node 6) GA (Node 8 & 10)
F# GA (.NET Framework 4.7) GA (.NET Core 2)
Java N/A Preview (Java 8)
Python Experimental Preview (Python 3.6)
TypeScript Experimental GA (Supported through transpiling to JavaScript)
PHP Experimental N/A
Batch (.cmd, .bat) Experimental N/A
Bash Experimental N/A
PowerShell Experimental N/A
App Service Plan
Run your functions just like your web, mobile, and API apps. When you are already using
App Service for your other applications, you can run your functions on the same plan at no
additional cost.
Consumption plan
When your function runs, Azure provides all of the necessary computational resources.
You don't have to worry about resource management, and you only pay for the time that
your code runs.
Running Azure Functions
Scaling
Scaling can vary on a number of factors
Might scale differently based on the trigger and language selected
• A single function app only scales up to a maximum of 200 instances.
• A single instance may process more than one message or request at a time.
• HttpTriggered only be allocated at most once every 1 second.
• New instances will only be allocated at most once every 30 seconds.
Scaling behavior
Long running
• Keep the runtime short (default < 5m; max. 10m)
Stateless
• Don’t use state in the host
• Idempotent
Cold start
• Fast start up times
• Keep them small
Control
• ‘They’ control scaling
• ‘They’ control when your host is alive
• You control the code!
Best practices
Pricing
• Billed based on per-second resource consumption and executions
• Execution Time: € 0.000014/GB-s
kr 0.000101/GB-s
• Total executions: € 0.169 per million executions
kr 1.259 per million executions
• Monthly free grant: 1 million executions
400.000 GB-s
Calculation resource consumption: avg. mem. Size in GB x execution time in ms.
Mem rounded to nearest 128 MB, max 1.536 MB.
Execution time rounded up to nearest 1 ms.
Minimum: 100 ms & 128 mb
Pricing – Consumption plan
Functions REST API
Table Storage
One weekend, 7 stages
Approximately 80.000 API requests
98.6% had a response time of < 250 ms
96% had a response time of < 30 ms
Total costs: € 3,14
Reference case - Cultural festival
Consumption plan++
• Enhanced performance
• VNET Access
Billed per second, based on vCPU-s and GB-s
Premium plan (preview)
Static website hosting
Available on General-Purpose V2
Special container: web$
Files in this container are:
• served through anonymous access requests
• only available through object read operations
• case-sensitive
Provided at no additional cost
Static website hosting
ADAL & MSAL
Enables application developers to authenticate users to
- Cloud Active Directory
- On-premises Active Directory
• Configurable token cache that stores access tokens and refresh tokens
• Automatic token refresh when an access token expires and a refresh token is available
• Support for asynchronous method calls
Active Directory Authentication Library (ADAL)
Enables Single Page Applications to authenticate users with
- Microsoft Azure Active Directory accounts
- Microsoft accounts
- Accounts in social identity providers like Facebook, Google, LinkedIn etc.
Interacts with
- Microsoft Azure Active Directory
- Microsoft Azure AD B2C
- Microsoft accounts
Microsoft Authentication Library (MSAL)
Preview for JS
Differences (process)
Differences (implementation)
Angular 4/5/6/7 ADAL Wrapper
Can be used to authenticate Angular applications against Azure Active Directory v1
endpoint.
Adal-angular4
Wrapper of the core MSAL.js library
Suitable for use in a production environment
The same production level support as current libraries
Changes may impact your application
When GA: update within six months
@azure/msal-angular
Putting things together
Triggers & Bindings
Serverless abstracts away the compute
Triggers & Bindings abstract away the services you interact with
Dual abstraction
Example: Blob Trigger on a consumption plan
Up to 10-minute delay processing new blobs
Solution:
Switch to App Service plan with Always On enabled.
Use Event Grid trigger with your Blob storage account.
Triggers
public static async Task Run(
[BlobTrigger("upload/{name}", Connection = "scs")]Stream addedBlob,
string name, ILogger log)
{
// Setting up my BlobStorageRepository (it's a wrapper)
var connectionString = Environment.GetEnvironmentVariable("scs",
EnvironmentVariableTarget.Process);
var blobStorageRepository = new BlobStorageRepository(connectionString);
await blobStorageRepository.AddFileAsync("copied", name, addedBlob);
}
Bindings 1/3
Binding 2/3
public static async Task Run(
[BlobTrigger("upload/{name}", Connection = "scs")]Stream addedBlob,
[Blob("copied/{name}", FileAccess.Write, Connection = "scs")]Stream stream,
string name, ILogger log)
{
await addedBlob.CopyToAsync(stream);
}
Binding 3/3
public static async Task RunAsync(
[BlobTrigger("to-process/{name}", Connection = "scs")]Stream addedBlob,
[ServiceBus("process", Connection = "sbcss", EntityType = EntityType.Queue)]
ICollector queueCollector, string name, ILogger log)
{
using (var reader = new StreamReader(addedBlob))
{
var words = (await reader.ReadToEndAsync()).Split(' ');
Parallel.ForEach(words.Distinct(), (word) =>
{
queueCollector.Add(word);
});
}
}
Build a Serverless web app in Azure
About Microsoft identity platform
adal-angular4
@azure/msal-angular
rickvdbos.ch/safwad
Resources
Event
partners
Expo
partners
Expo light
partners

Más contenido relacionado

La actualidad más candente

Cosmos DB and Azure Functions A serverless database processing.pptx
Cosmos DB and Azure Functions  A serverless database processing.pptxCosmos DB and Azure Functions  A serverless database processing.pptx
Cosmos DB and Azure Functions A serverless database processing.pptxicebeam7
 
MongoDB World 2016: Scaling Targeted Notifications in the Music Streaming Wor...
MongoDB World 2016: Scaling Targeted Notifications in the Music Streaming Wor...MongoDB World 2016: Scaling Targeted Notifications in the Music Streaming Wor...
MongoDB World 2016: Scaling Targeted Notifications in the Music Streaming Wor...MongoDB
 
Migrating My.T-Mobile.com to AWS (ENT214) | AWS re:Invent 2013
Migrating My.T-Mobile.com to AWS (ENT214) | AWS re:Invent 2013Migrating My.T-Mobile.com to AWS (ENT214) | AWS re:Invent 2013
Migrating My.T-Mobile.com to AWS (ENT214) | AWS re:Invent 2013Amazon Web Services
 
Real-time Data Processing with Amazon DynamoDB Streams and AWS Lambda
Real-time Data Processing with Amazon DynamoDB Streams and AWS LambdaReal-time Data Processing with Amazon DynamoDB Streams and AWS Lambda
Real-time Data Processing with Amazon DynamoDB Streams and AWS LambdaAmazon Web Services
 
Google Cloud and Data Pipeline Patterns
Google Cloud and Data Pipeline PatternsGoogle Cloud and Data Pipeline Patterns
Google Cloud and Data Pipeline PatternsLynn Langit
 
AWS Architecture Case Study: Real-Time Bidding
AWS Architecture Case Study: Real-Time BiddingAWS Architecture Case Study: Real-Time Bidding
AWS Architecture Case Study: Real-Time BiddingAmazon Web Services
 
Introduction to AWS Kinesis
Introduction to AWS KinesisIntroduction to AWS Kinesis
Introduction to AWS KinesisSteven Ensslen
 
Introduction to Google Cloud Services / Platforms
Introduction to Google Cloud Services / PlatformsIntroduction to Google Cloud Services / Platforms
Introduction to Google Cloud Services / PlatformsNilanchal
 
Introduction to Google Cloud Platform
Introduction to Google Cloud PlatformIntroduction to Google Cloud Platform
Introduction to Google Cloud Platformdhruv_chaudhari
 
BDA403 The Visible Network: How Netflix Uses Kinesis Streams to Monitor Appli...
BDA403 The Visible Network: How Netflix Uses Kinesis Streams to Monitor Appli...BDA403 The Visible Network: How Netflix Uses Kinesis Streams to Monitor Appli...
BDA403 The Visible Network: How Netflix Uses Kinesis Streams to Monitor Appli...Amazon Web Services
 
code lab live Google Cloud Endpoints [DevFest 2015 Bari]
code lab live Google Cloud Endpoints [DevFest 2015 Bari]code lab live Google Cloud Endpoints [DevFest 2015 Bari]
code lab live Google Cloud Endpoints [DevFest 2015 Bari]Nicola Policoro
 
Real-time Streaming and Querying with Amazon Kinesis and Amazon Elastic MapRe...
Real-time Streaming and Querying with Amazon Kinesis and Amazon Elastic MapRe...Real-time Streaming and Querying with Amazon Kinesis and Amazon Elastic MapRe...
Real-time Streaming and Querying with Amazon Kinesis and Amazon Elastic MapRe...Amazon Web Services
 
Microsoft Azure Cost Optimization and improve efficiency
Microsoft Azure Cost Optimization and improve efficiencyMicrosoft Azure Cost Optimization and improve efficiency
Microsoft Azure Cost Optimization and improve efficiencyKushan Lahiru Perera
 
StackEngine Demo - Docker Austin
StackEngine Demo - Docker AustinStackEngine Demo - Docker Austin
StackEngine Demo - Docker AustinBoyd Hemphill
 
Google cloud platform Introduction - 2014
Google cloud platform Introduction - 2014Google cloud platform Introduction - 2014
Google cloud platform Introduction - 2014Simon Su
 
Cncf event driven autoscaling with keda
Cncf   event driven autoscaling with kedaCncf   event driven autoscaling with keda
Cncf event driven autoscaling with kedaJurajHantk
 

La actualidad más candente (20)

Cosmos DB and Azure Functions A serverless database processing.pptx
Cosmos DB and Azure Functions  A serverless database processing.pptxCosmos DB and Azure Functions  A serverless database processing.pptx
Cosmos DB and Azure Functions A serverless database processing.pptx
 
MongoDB World 2016: Scaling Targeted Notifications in the Music Streaming Wor...
MongoDB World 2016: Scaling Targeted Notifications in the Music Streaming Wor...MongoDB World 2016: Scaling Targeted Notifications in the Music Streaming Wor...
MongoDB World 2016: Scaling Targeted Notifications in the Music Streaming Wor...
 
Migrating My.T-Mobile.com to AWS (ENT214) | AWS re:Invent 2013
Migrating My.T-Mobile.com to AWS (ENT214) | AWS re:Invent 2013Migrating My.T-Mobile.com to AWS (ENT214) | AWS re:Invent 2013
Migrating My.T-Mobile.com to AWS (ENT214) | AWS re:Invent 2013
 
Real-time Data Processing with Amazon DynamoDB Streams and AWS Lambda
Real-time Data Processing with Amazon DynamoDB Streams and AWS LambdaReal-time Data Processing with Amazon DynamoDB Streams and AWS Lambda
Real-time Data Processing with Amazon DynamoDB Streams and AWS Lambda
 
Google Cloud and Data Pipeline Patterns
Google Cloud and Data Pipeline PatternsGoogle Cloud and Data Pipeline Patterns
Google Cloud and Data Pipeline Patterns
 
Real-Time Event Processing
Real-Time Event ProcessingReal-Time Event Processing
Real-Time Event Processing
 
AWS Architecture Case Study: Real-Time Bidding
AWS Architecture Case Study: Real-Time BiddingAWS Architecture Case Study: Real-Time Bidding
AWS Architecture Case Study: Real-Time Bidding
 
Introduction to AWS Kinesis
Introduction to AWS KinesisIntroduction to AWS Kinesis
Introduction to AWS Kinesis
 
Introduction to Google Cloud Services / Platforms
Introduction to Google Cloud Services / PlatformsIntroduction to Google Cloud Services / Platforms
Introduction to Google Cloud Services / Platforms
 
Introduction to Google Cloud Platform
Introduction to Google Cloud PlatformIntroduction to Google Cloud Platform
Introduction to Google Cloud Platform
 
BDA403 The Visible Network: How Netflix Uses Kinesis Streams to Monitor Appli...
BDA403 The Visible Network: How Netflix Uses Kinesis Streams to Monitor Appli...BDA403 The Visible Network: How Netflix Uses Kinesis Streams to Monitor Appli...
BDA403 The Visible Network: How Netflix Uses Kinesis Streams to Monitor Appli...
 
code lab live Google Cloud Endpoints [DevFest 2015 Bari]
code lab live Google Cloud Endpoints [DevFest 2015 Bari]code lab live Google Cloud Endpoints [DevFest 2015 Bari]
code lab live Google Cloud Endpoints [DevFest 2015 Bari]
 
Save Azure Cost
Save Azure CostSave Azure Cost
Save Azure Cost
 
Real-time Streaming and Querying with Amazon Kinesis and Amazon Elastic MapRe...
Real-time Streaming and Querying with Amazon Kinesis and Amazon Elastic MapRe...Real-time Streaming and Querying with Amazon Kinesis and Amazon Elastic MapRe...
Real-time Streaming and Querying with Amazon Kinesis and Amazon Elastic MapRe...
 
Microsoft Azure Cost Optimization and improve efficiency
Microsoft Azure Cost Optimization and improve efficiencyMicrosoft Azure Cost Optimization and improve efficiency
Microsoft Azure Cost Optimization and improve efficiency
 
StackEngine Demo - Docker Austin
StackEngine Demo - Docker AustinStackEngine Demo - Docker Austin
StackEngine Demo - Docker Austin
 
AWS Kinesis
AWS KinesisAWS Kinesis
AWS Kinesis
 
Google Cloud Platform
Google Cloud PlatformGoogle Cloud Platform
Google Cloud Platform
 
Google cloud platform Introduction - 2014
Google cloud platform Introduction - 2014Google cloud platform Introduction - 2014
Google cloud platform Introduction - 2014
 
Cncf event driven autoscaling with keda
Cncf   event driven autoscaling with kedaCncf   event driven autoscaling with keda
Cncf event driven autoscaling with keda
 

Similar a SAFwAD @ Intelligent Cloud Conference

Serverless Computing with Azure Functions Best Practices
Serverless Computing with Azure Functions Best PracticesServerless Computing with Azure Functions Best Practices
Serverless Computing with Azure Functions Best PracticesJuan Pablo
 
Azure Function Best Practice
Azure Function Best Practice Azure Function Best Practice
Azure Function Best Practice Juan Pablo
 
Windows Azure Platform + PHP - Jonathan Wong
Windows Azure Platform + PHP - Jonathan WongWindows Azure Platform + PHP - Jonathan Wong
Windows Azure Platform + PHP - Jonathan WongSpiffy
 
Durable Azure Functions
Durable Azure FunctionsDurable Azure Functions
Durable Azure FunctionsPushkar Saraf
 
Azure Functions.pptx
Azure Functions.pptxAzure Functions.pptx
Azure Functions.pptxYachikaKamra
 
Time Series Analytics Azure ADX
Time Series Analytics Azure ADXTime Series Analytics Azure ADX
Time Series Analytics Azure ADXRiccardo Zamana
 
Serverless Comparison: AWS vs Azure vs Google vs IBM
Serverless Comparison: AWS vs Azure vs Google vs IBMServerless Comparison: AWS vs Azure vs Google vs IBM
Serverless Comparison: AWS vs Azure vs Google vs IBMRightScale
 
Microsoft Azure News - December 2019
Microsoft Azure News - December 2019Microsoft Azure News - December 2019
Microsoft Azure News - December 2019Daniel Toomey
 
Azure Serverless Toolbox
Azure Serverless ToolboxAzure Serverless Toolbox
Azure Serverless ToolboxJohan Eriksson
 
Azure satpn19 time series analytics with azure adx
Azure satpn19   time series analytics with azure adxAzure satpn19   time series analytics with azure adx
Azure satpn19 time series analytics with azure adxRiccardo Zamana
 
Building stateful serverless orchestrations with Azure Durable Azure Function...
Building stateful serverless orchestrations with Azure Durable Azure Function...Building stateful serverless orchestrations with Azure Durable Azure Function...
Building stateful serverless orchestrations with Azure Durable Azure Function...Callon Campbell
 
How to Reduce your Spend on AWS
How to Reduce your Spend on AWSHow to Reduce your Spend on AWS
How to Reduce your Spend on AWSJoseph K. Ziegler
 
Windowsazureplatform Overviewlatest
Windowsazureplatform OverviewlatestWindowsazureplatform Overviewlatest
Windowsazureplatform Overviewlatestrajramab
 
AWS APAC Webinar Series: How to Reduce Your Spend on AWS
AWS APAC Webinar Series: How to Reduce Your Spend on AWSAWS APAC Webinar Series: How to Reduce Your Spend on AWS
AWS APAC Webinar Series: How to Reduce Your Spend on AWSAmazon Web Services
 
Serverless in the Azure World
Serverless in the Azure WorldServerless in the Azure World
Serverless in the Azure WorldKasun Kodagoda
 
Google Cloud Platform as a Backend Solution for your Product
Google Cloud Platform as a Backend Solution for your ProductGoogle Cloud Platform as a Backend Solution for your Product
Google Cloud Platform as a Backend Solution for your ProductSergey Smetanin
 
Going Serverless with Azure Functions #1 - Introduction to Azure Functions
Going Serverless with Azure Functions #1 - Introduction to Azure FunctionsGoing Serverless with Azure Functions #1 - Introduction to Azure Functions
Going Serverless with Azure Functions #1 - Introduction to Azure FunctionsKasun Kodagoda
 
Serverlessusecase workshop feb3_v2
Serverlessusecase workshop feb3_v2Serverlessusecase workshop feb3_v2
Serverlessusecase workshop feb3_v2kartraj
 

Similar a SAFwAD @ Intelligent Cloud Conference (20)

Serverless Computing with Azure Functions Best Practices
Serverless Computing with Azure Functions Best PracticesServerless Computing with Azure Functions Best Practices
Serverless Computing with Azure Functions Best Practices
 
Azure Function Best Practice
Azure Function Best Practice Azure Function Best Practice
Azure Function Best Practice
 
Windows Azure Platform + PHP - Jonathan Wong
Windows Azure Platform + PHP - Jonathan WongWindows Azure Platform + PHP - Jonathan Wong
Windows Azure Platform + PHP - Jonathan Wong
 
Durable Azure Functions
Durable Azure FunctionsDurable Azure Functions
Durable Azure Functions
 
Azure Functions.pptx
Azure Functions.pptxAzure Functions.pptx
Azure Functions.pptx
 
Time Series Analytics Azure ADX
Time Series Analytics Azure ADXTime Series Analytics Azure ADX
Time Series Analytics Azure ADX
 
Serverless Comparison: AWS vs Azure vs Google vs IBM
Serverless Comparison: AWS vs Azure vs Google vs IBMServerless Comparison: AWS vs Azure vs Google vs IBM
Serverless Comparison: AWS vs Azure vs Google vs IBM
 
Azure Functions
Azure FunctionsAzure Functions
Azure Functions
 
Microsoft Azure News - December 2019
Microsoft Azure News - December 2019Microsoft Azure News - December 2019
Microsoft Azure News - December 2019
 
Azure Serverless Toolbox
Azure Serverless ToolboxAzure Serverless Toolbox
Azure Serverless Toolbox
 
Azure satpn19 time series analytics with azure adx
Azure satpn19   time series analytics with azure adxAzure satpn19   time series analytics with azure adx
Azure satpn19 time series analytics with azure adx
 
Azure Functions - Introduction
Azure Functions - IntroductionAzure Functions - Introduction
Azure Functions - Introduction
 
Building stateful serverless orchestrations with Azure Durable Azure Function...
Building stateful serverless orchestrations with Azure Durable Azure Function...Building stateful serverless orchestrations with Azure Durable Azure Function...
Building stateful serverless orchestrations with Azure Durable Azure Function...
 
How to Reduce your Spend on AWS
How to Reduce your Spend on AWSHow to Reduce your Spend on AWS
How to Reduce your Spend on AWS
 
Windowsazureplatform Overviewlatest
Windowsazureplatform OverviewlatestWindowsazureplatform Overviewlatest
Windowsazureplatform Overviewlatest
 
AWS APAC Webinar Series: How to Reduce Your Spend on AWS
AWS APAC Webinar Series: How to Reduce Your Spend on AWSAWS APAC Webinar Series: How to Reduce Your Spend on AWS
AWS APAC Webinar Series: How to Reduce Your Spend on AWS
 
Serverless in the Azure World
Serverless in the Azure WorldServerless in the Azure World
Serverless in the Azure World
 
Google Cloud Platform as a Backend Solution for your Product
Google Cloud Platform as a Backend Solution for your ProductGoogle Cloud Platform as a Backend Solution for your Product
Google Cloud Platform as a Backend Solution for your Product
 
Going Serverless with Azure Functions #1 - Introduction to Azure Functions
Going Serverless with Azure Functions #1 - Introduction to Azure FunctionsGoing Serverless with Azure Functions #1 - Introduction to Azure Functions
Going Serverless with Azure Functions #1 - Introduction to Azure Functions
 
Serverlessusecase workshop feb3_v2
Serverlessusecase workshop feb3_v2Serverlessusecase workshop feb3_v2
Serverlessusecase workshop feb3_v2
 

Más de Rick van den Bosch

Configuration in azure done right
Configuration in azure done rightConfiguration in azure done right
Configuration in azure done rightRick van den Bosch
 
Getting started with Azure Cognitive services
Getting started with Azure Cognitive servicesGetting started with Azure Cognitive services
Getting started with Azure Cognitive servicesRick van den Bosch
 
From .NET Core 3, all the rest will be legacy
From .NET Core 3, all the rest will be legacyFrom .NET Core 3, all the rest will be legacy
From .NET Core 3, all the rest will be legacyRick van den Bosch
 
Getting sh*t done with Azure Functions (on AKS!)
Getting sh*t done with Azure Functions (on AKS!)Getting sh*t done with Azure Functions (on AKS!)
Getting sh*t done with Azure Functions (on AKS!)Rick van den Bosch
 
Securing an Azure Function REST API with Azure Active Directory
Securing an Azure Function REST API with Azure Active DirectorySecuring an Azure Function REST API with Azure Active Directory
Securing an Azure Function REST API with Azure Active DirectoryRick van den Bosch
 
Azure Lowlands: An intro to Azure Data Lake
Azure Lowlands: An intro to Azure Data LakeAzure Lowlands: An intro to Azure Data Lake
Azure Lowlands: An intro to Azure Data LakeRick van den Bosch
 
TechDays 2017 - Going Serverless (2/2): Hands-on with Azure Event Grid
TechDays 2017 - Going Serverless (2/2): Hands-on with Azure Event GridTechDays 2017 - Going Serverless (2/2): Hands-on with Azure Event Grid
TechDays 2017 - Going Serverless (2/2): Hands-on with Azure Event GridRick van den Bosch
 
.Net Core - not your daddy's dotnet
.Net Core - not your daddy's dotnet.Net Core - not your daddy's dotnet
.Net Core - not your daddy's dotnetRick van den Bosch
 
TechDays 2016 - Case Study: Azure + IOT + LoRa = ”Leven is Water”
TechDays 2016 - Case Study: Azure + IOT + LoRa = ”Leven is Water”TechDays 2016 - Case Study: Azure + IOT + LoRa = ”Leven is Water”
TechDays 2016 - Case Study: Azure + IOT + LoRa = ”Leven is Water”Rick van den Bosch
 
Take control of your deployments with Release Management
Take control of your deployments with Release ManagementTake control of your deployments with Release Management
Take control of your deployments with Release ManagementRick van den Bosch
 

Más de Rick van den Bosch (12)

Configuration in azure done right
Configuration in azure done rightConfiguration in azure done right
Configuration in azure done right
 
Getting started with Azure Cognitive services
Getting started with Azure Cognitive servicesGetting started with Azure Cognitive services
Getting started with Azure Cognitive services
 
From .NET Core 3, all the rest will be legacy
From .NET Core 3, all the rest will be legacyFrom .NET Core 3, all the rest will be legacy
From .NET Core 3, all the rest will be legacy
 
Getting sh*t done with Azure Functions (on AKS!)
Getting sh*t done with Azure Functions (on AKS!)Getting sh*t done with Azure Functions (on AKS!)
Getting sh*t done with Azure Functions (on AKS!)
 
Securing an Azure Function REST API with Azure Active Directory
Securing an Azure Function REST API with Azure Active DirectorySecuring an Azure Function REST API with Azure Active Directory
Securing an Azure Function REST API with Azure Active Directory
 
Azure Lowlands: An intro to Azure Data Lake
Azure Lowlands: An intro to Azure Data LakeAzure Lowlands: An intro to Azure Data Lake
Azure Lowlands: An intro to Azure Data Lake
 
An intro to Azure Data Lake
An intro to Azure Data LakeAn intro to Azure Data Lake
An intro to Azure Data Lake
 
TechDays 2017 - Going Serverless (2/2): Hands-on with Azure Event Grid
TechDays 2017 - Going Serverless (2/2): Hands-on with Azure Event GridTechDays 2017 - Going Serverless (2/2): Hands-on with Azure Event Grid
TechDays 2017 - Going Serverless (2/2): Hands-on with Azure Event Grid
 
Dude, Where's my Server?
Dude, Where's my Server?Dude, Where's my Server?
Dude, Where's my Server?
 
.Net Core - not your daddy's dotnet
.Net Core - not your daddy's dotnet.Net Core - not your daddy's dotnet
.Net Core - not your daddy's dotnet
 
TechDays 2016 - Case Study: Azure + IOT + LoRa = ”Leven is Water”
TechDays 2016 - Case Study: Azure + IOT + LoRa = ”Leven is Water”TechDays 2016 - Case Study: Azure + IOT + LoRa = ”Leven is Water”
TechDays 2016 - Case Study: Azure + IOT + LoRa = ”Leven is Water”
 
Take control of your deployments with Release Management
Take control of your deployments with Release ManagementTake control of your deployments with Release Management
Take control of your deployments with Release Management
 

Último

The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxalwaysnagaraju26
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyAnusha Are
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 

Último (20)

The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 

SAFwAD @ Intelligent Cloud Conference

  • 1. Session Rick van den Bosch Securing an Azure Function REST API with Azure Active Directory #SAFwAD Session
  • 2. Rick van den Bosch @rickvdbosch rickvandenbosch.net rickvdbosch@outlook.com
  • 3. Azure Active Directory Azure Functions Static website hosting ADAL & MSAL Putting things together Agenda
  • 5. “Azure Active Directory (Azure AD) is Microsoft’s cloud-based identity and access management service. Azure AD helps your employees sign in and access resources” Azure Active Directory
  • 6. • Seamless, highly secure access • Comprehensive identity protection • Efficient management and compliance at scale • Customer and partner identities • Identity platform for developers • Identity for IaaS (infrastructure as a service) Azure Active Directory
  • 7.
  • 8. IT admins App developers Subscribers of - Microsoft 365 - Office 365 - Azure - Dynamics CRM online Who uses Azure AD?
  • 9. Free FREE! Basic € 0,844 kr 6,294 user / month * Premium P1 € 5,06 kr 37,761 user / month * Premium P2 € 7,59 kr 56,641 user / month * “Pay as you go” feature license. * Annual commitment Pricing tiers
  • 10. “Azure Active Directory (Azure AD) B2C is an identity management service that enables you to customize and control how customers sign up, sign in, and manage their profiles when using your applications. This includes applications developed for iOS, Android, and .NET, among others.” Azure AD B2C
  • 11. Azure AD B2C - Pricing
  • 13. “Accelerate your development with an event-driven, serverless compute experience. Scale on demand and pay only for the resources you consume.” Azure Functions
  • 14. • Take advantage of serverless compute with Functions • Manage your apps instead of infrastructure • Optimize for business logic • Develop your way Azure Functions
  • 15. Web application backends Mobile application backends Real-time file processing Real-time stream processing Automation of scheduled tasks Extending SaaS applications What you can do with Functions
  • 16. Two major versions: 1.x and 2.x Current version: 2.x Both supported for production Runtimes
  • 17. Supported languages Language 1.x 2.x C# GA (.NET Framework 4.7) GA (.NET Core 2) JavaScript GA (Node 6) GA (Node 8 & 10) F# GA (.NET Framework 4.7) GA (.NET Core 2) Java N/A Preview (Java 8) Python Experimental Preview (Python 3.6) TypeScript Experimental GA (Supported through transpiling to JavaScript) PHP Experimental N/A Batch (.cmd, .bat) Experimental N/A Bash Experimental N/A PowerShell Experimental N/A
  • 18. App Service Plan Run your functions just like your web, mobile, and API apps. When you are already using App Service for your other applications, you can run your functions on the same plan at no additional cost. Consumption plan When your function runs, Azure provides all of the necessary computational resources. You don't have to worry about resource management, and you only pay for the time that your code runs. Running Azure Functions
  • 20. Scaling can vary on a number of factors Might scale differently based on the trigger and language selected • A single function app only scales up to a maximum of 200 instances. • A single instance may process more than one message or request at a time. • HttpTriggered only be allocated at most once every 1 second. • New instances will only be allocated at most once every 30 seconds. Scaling behavior
  • 21. Long running • Keep the runtime short (default < 5m; max. 10m) Stateless • Don’t use state in the host • Idempotent Cold start • Fast start up times • Keep them small Control • ‘They’ control scaling • ‘They’ control when your host is alive • You control the code! Best practices
  • 23. • Billed based on per-second resource consumption and executions • Execution Time: € 0.000014/GB-s kr 0.000101/GB-s • Total executions: € 0.169 per million executions kr 1.259 per million executions • Monthly free grant: 1 million executions 400.000 GB-s Calculation resource consumption: avg. mem. Size in GB x execution time in ms. Mem rounded to nearest 128 MB, max 1.536 MB. Execution time rounded up to nearest 1 ms. Minimum: 100 ms & 128 mb Pricing – Consumption plan
  • 24. Functions REST API Table Storage One weekend, 7 stages Approximately 80.000 API requests 98.6% had a response time of < 250 ms 96% had a response time of < 30 ms Total costs: € 3,14 Reference case - Cultural festival
  • 25. Consumption plan++ • Enhanced performance • VNET Access Billed per second, based on vCPU-s and GB-s Premium plan (preview)
  • 27. Available on General-Purpose V2 Special container: web$ Files in this container are: • served through anonymous access requests • only available through object read operations • case-sensitive Provided at no additional cost Static website hosting
  • 29. Enables application developers to authenticate users to - Cloud Active Directory - On-premises Active Directory • Configurable token cache that stores access tokens and refresh tokens • Automatic token refresh when an access token expires and a refresh token is available • Support for asynchronous method calls Active Directory Authentication Library (ADAL)
  • 30. Enables Single Page Applications to authenticate users with - Microsoft Azure Active Directory accounts - Microsoft accounts - Accounts in social identity providers like Facebook, Google, LinkedIn etc. Interacts with - Microsoft Azure Active Directory - Microsoft Azure AD B2C - Microsoft accounts Microsoft Authentication Library (MSAL) Preview for JS
  • 33. Angular 4/5/6/7 ADAL Wrapper Can be used to authenticate Angular applications against Azure Active Directory v1 endpoint. Adal-angular4
  • 34. Wrapper of the core MSAL.js library Suitable for use in a production environment The same production level support as current libraries Changes may impact your application When GA: update within six months @azure/msal-angular
  • 37.
  • 38. Serverless abstracts away the compute Triggers & Bindings abstract away the services you interact with Dual abstraction
  • 39. Example: Blob Trigger on a consumption plan Up to 10-minute delay processing new blobs Solution: Switch to App Service plan with Always On enabled. Use Event Grid trigger with your Blob storage account. Triggers
  • 40. public static async Task Run( [BlobTrigger("upload/{name}", Connection = "scs")]Stream addedBlob, string name, ILogger log) { // Setting up my BlobStorageRepository (it's a wrapper) var connectionString = Environment.GetEnvironmentVariable("scs", EnvironmentVariableTarget.Process); var blobStorageRepository = new BlobStorageRepository(connectionString); await blobStorageRepository.AddFileAsync("copied", name, addedBlob); } Bindings 1/3
  • 41. Binding 2/3 public static async Task Run( [BlobTrigger("upload/{name}", Connection = "scs")]Stream addedBlob, [Blob("copied/{name}", FileAccess.Write, Connection = "scs")]Stream stream, string name, ILogger log) { await addedBlob.CopyToAsync(stream); }
  • 42. Binding 3/3 public static async Task RunAsync( [BlobTrigger("to-process/{name}", Connection = "scs")]Stream addedBlob, [ServiceBus("process", Connection = "sbcss", EntityType = EntityType.Queue)] ICollector queueCollector, string name, ILogger log) { using (var reader = new StreamReader(addedBlob)) { var words = (await reader.ReadToEndAsync()).Split(' '); Parallel.ForEach(words.Distinct(), (word) => { queueCollector.Add(word); }); } }
  • 43. Build a Serverless web app in Azure About Microsoft identity platform adal-angular4 @azure/msal-angular rickvdbos.ch/safwad Resources
  • 44.

Notas del editor

  1. As an IT admin, you can use Azure AD to control access to your apps and your app resources, based on your business requirements. As an app developer, Azure AD gives you a standards-based approach for adding single sign-on (SSO) to your app, allowing it to work with a user's pre-existing credentials. As a subscriber, you're already using Azure AD.
  2. Image 1: Mobile application backends Image 2: Automation of scheduled tasks
  3. V2 The current version where new feature work and improvements are being made
  4. monitors the rate of events and determines whether to scale out or scale in Heuristics for each trigger type For example, when you're using an Azure Queue storage trigger, it scales based on the queue length and the age of the oldest queue message.
  5. Second bullet: there isn't a set limit on number of concurrent executions.
  6. The minimum execution time and memory for a single function execution is 100 ms and 128 mb respectively.
  7. When using rxjs 6, Install rxjs-compat !!!