7 Layers of MLOps Security

Part 1, Securing your data

Series Links

Protecting Data

1. Data Access

Three Azure Pim Roles, VM in eng, Non Prod Data reader, Prod Database reader
Azure PIM example across different roles
Tavle of different permissions for developers for dev. staging and prod
Sample Developer Permissions

2. Data Segmentation

Kafka data being shown for three topics
Kafka Topic Example From CloudKarafka

3. Metadata

[
{
"description": "quarter",
"mode": "REQUIRED",
"name": "qtr",
"type": "STRING"
},
{
"description": "sales representative",
"mode": "NULLABLE",
"name": "rep",
"type": "STRING"
},
{
"description": "total sales",
"mode": "NULLABLE",
"name": "sales",
"type": "FLOAT"
}
]
from datetime import date
from pprint import pprint

from marshmallow import Schema, fields


class ArtistSchema(Schema):
name = fields.Str()


class AlbumSchema(Schema):
title = fields.Str()
release_date = fields.Date()
artist = fields.Nested(ArtistSchema())
Different database schemas connected together to track lineage
Keeping track of data lineage- Image Credit — Octapai

4. Data Protection (masking, tokenizing, encrypting, hashing)

A lock representing encryption, a token for tokenization and stars for masking
Different forms of data protection | Icons from theNounProject
An unauthorized user seeing masked data vs an authorized user seeing raw data
Masking policies in Snowflake | From Snowflake Website
3 Radar Charts on a Trasactional, ML and BI use case
Comparison Of Data Protection on Different Use Cases

5. Data loss prevention (DLP)

Many forms of media including email, server, cloud, mobile focused on DLP
What is Data Loss Prevention (DLP) | Data Leakage Mitigation | Imperva

End to End Example — Verified Reviews

Tavle of different permissions for developers for dev. staging and prod
Sample Developer Permissions
Tables for our data store

ReviewID, PK
UserID,
ReviewSentiment
BirthYear
Gender
Location

[
{
"registrationTime": "1623167711",
"registeredBy": "ServiceAccount1",
"description": "For the marketing team to use for review analytics",
"version": "1",
"columns": [
{
"name": "ReviewID",
"description": "Which Review this was based off",
"mode": "REQUIRED",
"type": "STRING",
"originatingSource": "transactional:Reviews",
"sensitivity": "Regular",
"protection": "None"
},
{
"name": "UserID",
"description": "Which User the review and demographics info came from",
"mode": "REQUIRED",
"type": "STRING",
"originatingSource": "transactional:UserDemographics",
"sensitivity": "Regular",
"protection": "None"
},
{
"name": "ReviewSentiment",
"description": "How positive or negative this review was",
"mode": "REQUIRED",
"type": "Decimal",
"originatingSource": "mlmodel:Sentiment",
"sensitivity": "Regular",
"protection": "None"
},
{
"name": "ReviewSentiment",
"description": "How positive or negative this review was",
"mode": "REQUIRED",
"type": "Decimal",
"originatingSource": "mlmodel:Sentiment",
"sensitivity": "Regular",
"protection": "None"
},
{
"name": "BirthYear",
"description": "How old the reviewer is",
"mode": "REQUIRED",
"type": "Integer",
"originatingSource": "transactional:UserDemographics",
"sensitivity": "Regular",
"protection": "None"
},
{
"name": "Gender",
"description": "Gender of the reviewer",
"mode": "REQUIRED",
"type": "Integer",
"originatingSource": "transactional:UserDemographics",
"sensitivity": "Regular",
"protection": "None"
},
{
"name": "Location",
"description": "Location of the reviewer",
"mode": "REQUIRED",
"type": "String",
"originatingSource": "transactional:UserDemographics",
"sensitivity": "Regular",
"protection": "None"
}
]
}
]

Conclusion

Next Time — Part 2: Data Storage Security

--

--

ML Lead @ Voiceflow

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store