(mellow music)
Welcome back to Azure AI Essentials.
Today, we're going to discuss security and compliance
within Azure cognitive services.
Developers often tell us that security is a top priority,
especially when it comes to developing AI solutions.
To help us discuss Azure cognitive services robust security,
as well as best practices for developers, I've invited Dean,
one of Azure's expert cloud advocates on the topic.
Thank you.
I'm excited to be here today.
As you said, Merna, security is so important
especially when we're dealing with sensitive data
as we often are with AI applications.
- Absolutely.
This is such a critical topic
and top of mind for so many developers.
So I'm excited to get started. Let's dive right in.
Let's start off today by exploring a scenario
where a developer may be building a solution
that handles sensitive data.
For example, let's say developer has been asked
to build out a solution for a medical company
that extracts and labels relevant medical information
from unstructured texts, such as doctor's notes,
clinical documents or electronic health records.
How would they go about using Azure cognitive services
to do that securely
since sensitive patient data is involved?
- Great question.
And this scenario occurs more often than you'd expect
in other industries too, including defense
and safety industries and even financial verticals.
Within this particular use case,
I'd recommend the developer explore Azure's text analytics
for health.
It's a service that provides named entity recognition,
relation extraction, linking, and more.
Let's take a quick look for context.
What you see here is a web interface
created to visualize the power of text analytics for health.
I'm going to select a tech sample of some patient history
and you can see the output from the text analytics API.
Essentially, we sent the sample text to the API
and it returned the J-son containing entities
related to different categories like diagnosis and symptoms
and medications.
It also links these entities
to concepts such as medication nomenclature
and performance relation extraction, such as here,
where it linked the measured pulse value
to the correct category or entity.
- This is great.
And it sounds like a solution
that developers should really care about securing
because it could contain private medical information.
What are some things developers can do
to make sure their AI powered apps are more secure?
- Well, the first thing developers need to do
is ensure that only the right people or applications
can access their text analytics API.
In fact, the same security tips here
will apply for almost all of the Azure cognitive services
that we consume as a cloud API.
For someone to consume the text API,
they will need to be authenticated.
This means we can verify their identity.
Then we need to authorize them,
meaning they need to have the correct permissions
to access their resource,
in our case, the text analytics API.
- So developers can make their cognitive services
more secure by implementing authorization
and authentication. How do they actually do that?
- Well, this is done in Azure
by using role-based access control or RBAC for short.
In short, a developer would give
either a person or a service an identity
and that identity would only have the relevant permissions
for it to perform its own role.
And the point I want to emphasize here
is a concept of least privilege.
This means we should only give access
to the identities that need it
and we should only give those identities
the least possible privileges that they need
to perform their job.
In the event that an identity would be compromised,
which we don't want to happen
this reduces the blast radius significantly.
- These identities make sense in terms of giving a person
or service permissions to make changes to my applications.
But what if I just want them to view it
without permitting them to make changes?
- Great question.
Azure also has the option of using built-in roles,
ones that are pre-defined by Microsoft,
such as Reader or Contributor.
But we can also make custom roles too
that permit only specific API calls and actions.
Personally, I like to leverage custom roles
so that I know that my privileges are locked down
to only the required actions.
In our example, you can see in the diagram here,
we have an identity assigned to a virtual machine
that runs our application
and that identity would be assigned a custom role,
permitting it to only perform a post operation
on the health end point of the text analytics API,
enabling it to form only the actions that it needs.
The second identity we have, this time assigned to a user
has no permissions against our text analytics API
and would therefore be denied access.
- Okay. So let's quickly recap.
Developers can secure their cognitive services
by using predefined or custom roles for people or services.
These identities and roles are authenticated
and authorized to ensure proper access.
Is there anything else developers can do
to secure their cognitive services?
- Sure. If you want to take it one step further,
it is possible to control access to your API
based on source network too.
This is really nice if your application
is running on a virtual machine in Azure
or even in another cloud provider
or on premises data center.
You can lock down the access
to just your predefined networks and subnets.
- That sounds quite useful. How could you do that?
- Well, let's take a look a quick demo
to see just how easy this is.
I'm here in the Azure portal
and I have an Azure text analytics instance
created in my account.
If you navigate to the networking section here on the left
you can see that right now,
my API is accessible from all networks.
We want to limit this to particular verb network in Azure.
So I'll select the selective networks
and private end points.
And then I'll click "Add Existing Virtual Network."
I can now select my subscription, my virtual network
and the subnet within that virtual network
that I wish to permit access from.
This will go ahead and create a service endpoint
in that virtual network to connect privately
to the Azure text analytics API
and also add the virtual network
to the security rules configured on my text analytics API.
This may take a few seconds to enable, but once enabled,
you can click "Add" and we can now see
that this instance of the text analytics is only accessible
from virtual machines in that specific V-net
just as we configured.
- Wow.
It's so simple to secure a virtual network and endpoint.
What if I wanted to do this on premises?
- So if we wanted to permit from on premises networks,
we could add it to the IP address or cider range
to the firewall section at the bottom here, like so
and just press "Save."
Note that this has to be a public IP address.
It also has a handy feature
to permit your current client IP address
if you're doing local dev work or testing too.
Remember though, that even with restricted network access
your API clients will still need to authenticate
and authorize themselves in order to access the API.
- This is a great start.
Thanks Dean, for educating us about security
and providing practical steps that developers everywhere
can take towards securing their cognitive services.
- Of course. Thank you for inviting me on to AI Essentials.
- So, we've covered how to lock down access from an identity
and a network perspective.
These are both great places to start
when securing any Azure cognitive services API
but we've only scratched the surface.
One thing that's great about consuming an API
like the text analytics API
is that security is a shared responsibility model.
And that means Microsoft too.
Microsoft has taken on much of the heavy lifting
for developers, that they'd have to secure
if they were to implement these measures firsthand.
In fact, Azure has invested over $1 billion per year
in cybersecurity and has the best privacy controls
and responsible AI capabilities
as well as the most compliance certifications
of any cloud in the world.
By using Azure cognitive services,
developers have a great secure foundation
right from the start.
But at the end of the day, it's a shared responsibility.
And that means there's responsibility
on developers as well to ensure their applications
and access is secure.
Microsoft has provided an Azure security baseline,
a list of actionable controls,
specific to cognitive services,
that developers can pragmatically follow
to ensure they have a solid baseline of security
for their cognitive services deployments.
We've also built Azure policies
that developers can implement
to not only make sure that their applications are consistent
with the security baseline,
but also that they remain compliant.
We encourage everyone watching to take a deeper look
at all the security and compliance resources
available to you through Azure cognitive services.
Thank you for tuning in to another episode
of Azure AI EssentialS.
(mellow music)