KEMBAR78
Securing SQL Azure DB? How? | PPTX
April 25
Boris Hristov, SQL Server MVP
Securing
SQL Azure DB?
Thanks to our Sponsors:
Global Sponsor:
Platinum Sponsors:
Swag Sponsors: Media Partners:
With the support of:
So who am I?
@BorisHristov
That’s not a marketing talk!
Disclaimer:
time
coolness
Session’s Timeline
Dynamic Data Masking Row Level Security
Dynamic Data
Masking
“Have you ever…”
SELECT * FROM
dbo.Customers
custid FirstNam
e
LastName PhoneNumber EmailAddress CreditcardNumber
1 Boris Hristov +359889000000 brshristov@live.com 1111-1111-1111-1111
2 Ivan Donev +359889000000 idonev@live.com 2222-2222-2222-2222
3 Stanislav Zhelyaskov +359889000000 szhelyaskov@live.com 3333-3333-3333-3333
4 Ivan Minchev +359889000000 iminchev@live.com 4444-4444-4444-4444
custid FirstNam
e
LastName PhoneNumbe
r
EmailAddress CreditcardNumber
1 Boris Hristov +359889000000 bxx@xxxx.com xxxx-xxxx-xxxx-1111
2 Ivan Donev +359889000000 ixxx@xxxx.com xxxx-xxxx-xxxx-2222
3 Stanislav Zhelyaskov +359889000000 sxx@xxxx.com xxxx-xxxx-xxxx-3333
4 Ivan Minchev +359889000000 ixx@live.com xxxx-xxxx-xxxx-4444
SELECT * FROM
dbo.Customers
Dynamic Data
Masking
DEMO
Dynamic Data Masking
Row Level
Security
“Have you ever…”
SELECT * FROM dbo.Orders
orderid custid orderdate shipdate shipcountry
1 1 4/20/2015 20:15:49 4/20/2015 20:15:49 Bulgaria
2 1 4/20/2015 20:15:49 4/20/2015 20:15:49 Norway
3 2 4/20/2015 20:15:49 4/20/2015 20:15:49 Norway
4 2 4/20/2015 20:15:49 4/20/2015 20:15:49 Bulgaria
5 3 4/20/2015 20:15:49 4/20/2015 20:15:49 Bulgaria
SELECT * FROM dbo.Orders
orderid custid orderdate shipdate shipcountry
1 1 4/20/2015 20:15:49 4/20/2015 20:15:49 Bulgaria
4 2 4/20/2015 20:15:49 4/20/2015 20:15:49 Bulgaria
5 3 4/20/2015 20:15:49 4/20/2015 20:15:49 Bulgaria
How is that
possible?
“Ту партс!”
-- user defined function
CREATE FUNCTION Security.fn_securitypredicate (@SalesRep AS sysname)
RETURNS TABLE
WITH SCHEMABINDING
AS
RETURN SELECT 1 AS fn_securitypredicate_result
WHERE @SalesRep = USER_NAME()
OR USER_NAME() = 'Manager';
-- security policy
CREATE SECURITY POLICY SalesFilter
ADD FILTER PREDICATE Security.fn_securitypredicate(SalesRep)
ON dbo.Sales WITH (STATE = ON);
No GUI, folks 
DEMO
Row Level Security
Cool, huh?
Not that fast…
time
coolness
Session’s Timeline
Dynamic Data Masking Row Level Security
DEMO
Row Level Security Issues
So is that a
security feature
then?
Or is that a
programmability
feature?
Summary
There’s a lot going on in SQL Azure DB
Easily mask sensitive data with Dynamic Data Masking
Limit the rows users can see with Row Level Security
Be aware of the current issues of RLS
Upcoming events
SQLSaturday #384 on May 30th in Varna!
http://www.sqlsaturday.com/384/
Thank you!
Contacts:
brshristov@live.com
www.borishristov.com
@BorisHristov

Securing SQL Azure DB? How?