SlideShare a Scribd company logo
Evolving Data Access
with MongoDB Stitch
Drew DiPalma – Product Manager, Cloud
MongoDB World 2018: Evolving your Data Access with MongoDB Stitch
Internal Users
Customers
Malicious Users
Rendering
Data
App ServerDatabase IoT DevicesPhone
Browser
State
Logic
CRUD Email
QueuesAccess Control
Payments
State
Sign On
Service
Coordination
Images
Applications are evolving
How do we evolve?
Application are living in more locations:
• 48% of apps have backends deployed to a public cloud
• 58% of apps are now developed for multiple platforms
More is expected of development:
• 64% of developers identified as Full-stack (2017)
Too much time is spent on maintaining:
• 41% of time spent maintaining
• 39% on new projects
Communicate simply
Adapt to the environment around us
Sustainable, longterm solutions
Rendering
Data
Database IoT DevicesPhone
Browser
CRUD
Email
Queues
Access Control
Payments
State
Sign On
Service
Coordination
Images
Logic
State
Stitch is comprised of 4 services –
QueryAnywhere
Brings MongoDB's rich
query language safely to
your application
Build full apps for iOS,
Android, Web, and IoT
Functions
Integrate microservices +
server-side logic + cloud
services
Power apps with Server-side
logic, or enable Data as a
Service with custom APIs.
Mobile Sync
Automatically synchronizes
data between documents
held locally in MongoDB
Mobile and your backend
database
(coming soon)
Triggers
Real-time notifications let your
application functions react in
response to database changes
App responds immediately to
change
MongoDB World 2018: Evolving your Data Access with MongoDB Stitch
Stitch QueryAnywhere
• Write generic queries from applications
• Respond with precise information based on the request
SDKs:
• JavaScript, Android, and iOS SDKs
• Integrated Authentication, Database, and Service requests
Stitch Rules:
• Fine-grained access rules relating to all aspects of Stitch
• Access to context from users, request, external services, functions, etc.
MongoDB Query Language + Native DriversIntegrated Rules
Functions3rd Party Services
Native SDKs (JavaScript, Android, iOS)
Rest API
How Applications interact with Stitch –
User
Login
JWTRequest
Filters
Roles
Rules
Specific
Request
ResultsUser-specific
Results
Requests in Stitch
Filters in Stitch
User
db.collection.find()
(plus user info)
db.collection.find({userid: "%%user.id"})db.collection.find({userid: "5b2..."})
[{
userid: "5b2..."
data: …
isSecret: false
},{
userid: "5b2..."
data: …
isSecret: true
}]
Results
{
"name": "userId",
"apply_when": {"%%true" : "%%true"},
"query": {"userid":"%%user.id"}
}
Filters contain an ApplyWhen and a
Query which is appended to a request
Roles in Stitch NEW
[{
userid: "5b2..."
data: …
isSecret: false
},{
userid: "5b2..."
data: …
isSecret: true
}]
Roles are defined by Match statements,
evaluated per document, and assign a set of
Rules per document
User
{name: "Secret Data",
apply_when: {"isSecret": true},
fields: {…}
},
{name: "Not Secret Data",
apply_when: {"isSecret": False},
fields: {…}
}
{name: "Secret Data",
apply_when: {"isSecret": true},
fields: {…}
},
{name: "Not Secret Data",
apply_when: {"isSecret": False},
fields: {…}
}
User
Rules in Stitch
"fields": {
"data": {"read": true}
},
"additional_fields": {
"read": false,
"write": false
}
Each Role has a set of matching Rules that
define read and write access at the field-level
[{
userid: "5b2..."
data: …
isSecret: false
},{
userid: "5b2..."
data: …
isSecret: true
}]
Stitch Rules UI
Basic Rules UI
• Visual Rules
• Simple Read/Write rules only
• Ideal for POC/getting started
Advanced Rules UI
• Fully editable JSON
• Advanced configuration options
• Maps directly to app structure
Advanced Rules Syntax
{
"filters": [{
"name": "userId",
"apply_when": {"%%true" : "%%true"},
"query": {"userid":"%%user.id"}
}, … ],
"roles": [{
name: "Secret Data"
apply_when: {isSecret: false}
"fields": {
"data": {
"read": true
}
},
"additional_fields": {
"read": false,
"write": false
}}, … ],
"schema": {…}
}
Filters
Roles
Rules
Schema
JSON Schema
schema: {
bsonType: "object",
required: ["userid", "data", "isSecret"],
properties: {
userid: {
bsonType: "objectid",
description: "The ID of the Stitch user"
},
data: {
bsonType: "string",
description: "must be a string and is not required"
},
isSecret: {
bsonType: "bool",
description: "True if the data is a secret"
}
additionalProperties: false
}
Schema Validation NEW
schema: {
bsonType: "object",
required: ["userid", "data", "isSecret"],
properties: {
userid: {
bsonType: "objectid",
description: "The ID of the Stitch user"
},
data: {
bsonType: "string",
validate: {"%%true": {"%function": {
"name": "isValid",
"arguments": ["%%user", "%%this"]}}}
description: "must be a string and is not required"
},
isSecret: {
bsonType: "bool",
description: "True if the data is a secret"
}
additionalProperties: false
}
Access via Stitch SDK
Stitch SDKs
Stitch provides:
• Layer of server-side logic
• Ability to set strict API access rules
• Field-level data access on MongoDB
User
Filters
Roles
Rules
Access via API
APIs within Stitch
Stitch provides:
• Ability to link HTTP and Users
• Ability to set strict API access rules
• Field-level data access on MongoDB
HTTP Request
Execute As ->
Filters
Roles
Rules
Access via Services
Service Interactions within Stitch
Stitch provides:
• Safe service coordination
• Rules applied throughout runtime
• Callable from SDK, API, or Event
User
HTTP Request
What’s next for Stitch?
Stitch Roadmap
xx
Everywhere
Bring any MongoDB
Available self-hosted
Expand Regional footprint
Realtime
Authentication Triggers
Timed Triggers
SDK improvements
Simple to use
User/Log Management
Authentication Options
Additional Services
More SDKs
• Check out another talk on Stitch –
• Pissing Off IT and Delivery: A Tale of 2 ODS’s – 2:35 in Grammercy W
• Ch-Ch-Ch-Changes: Taking Your Stitch Application to the Next Level – 2:35 in Murray Hill E
• Ship It Faster with MongoDB Stitch – 3:30 in Grammercy W
• MongoDB Mobile Introduction – 3:30 in Gibson
• Decentralized Identity Management with Blockchain and MongoDB – 4:20 in Madison
• Try out Stitch – stitch.mongodb.com
• Check out SDKs and examples
• Code at – github.com/mongodb/stitch-examples
• Docs at – docs.mongodb.com/Stitch
• Build the Dashboard or Weather IoT apps in our Tutorials section
• Ask Questions or let us know what you’re building through Intercom
What next?

More Related Content

What's hot (18)

PPT
The LEAD Portal: An OGCE based weather science gateway
marcuschristie
 
PDF
Azure Event Grid Lighting Talk (2017-10-05)
Paco de la Cruz
 
ODP
Event sourcing with Eventuate
Knoldus Inc.
 
PPTX
MongoDB.local Seattle 2019: Building Your First MongoDB App Using Atlas & Stitch
MongoDB
 
PPT
Google Apps Secure Data Connector
Guus Disselkoen
 
PPT
PURSe and the PURSe Portlets
marcuschristie
 
PPT
Integrating an App with Amazon Web Services SimpleDB - A Matter of Choices
Mark Maslyn
 
PPTX
MongoDB.local Dallas 2019: Pissing Off IT and Delivery: A Tale of 2 ODS's
MongoDB
 
PPTX
Dev show september 8th 2020 power platform - not just a simple toy
Jens Schrøder
 
PPTX
Authentication on Cloud using Attribute Based Encryption
Ankit Raj
 
PPTX
Common Data Service (CDS), a new database?
Pedro Azevedo
 
PPTX
Attributes based encryption with verifiable outsourced decryption
KaashivInfoTech Company
 
PDF
Attribute based encryption with privacy preserving in clouds
Swathi Rampur
 
PDF
#hacksummit 2016 - event-driven microservices – Events on the outside, on the...
Chris Richardson
 
DOCX
Attribute based encryption with verifiable outsourced decryption
IEEEFINALYEARPROJECTS
 
PDF
CSIS: Cloud Service Identification System
IJECEIAES
 
DOC
Mmb authenticated index for verifiable
Kamal Spring
 
PDF
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
Xamarin
 
The LEAD Portal: An OGCE based weather science gateway
marcuschristie
 
Azure Event Grid Lighting Talk (2017-10-05)
Paco de la Cruz
 
Event sourcing with Eventuate
Knoldus Inc.
 
MongoDB.local Seattle 2019: Building Your First MongoDB App Using Atlas & Stitch
MongoDB
 
Google Apps Secure Data Connector
Guus Disselkoen
 
PURSe and the PURSe Portlets
marcuschristie
 
Integrating an App with Amazon Web Services SimpleDB - A Matter of Choices
Mark Maslyn
 
MongoDB.local Dallas 2019: Pissing Off IT and Delivery: A Tale of 2 ODS's
MongoDB
 
Dev show september 8th 2020 power platform - not just a simple toy
Jens Schrøder
 
Authentication on Cloud using Attribute Based Encryption
Ankit Raj
 
Common Data Service (CDS), a new database?
Pedro Azevedo
 
Attributes based encryption with verifiable outsourced decryption
KaashivInfoTech Company
 
Attribute based encryption with privacy preserving in clouds
Swathi Rampur
 
#hacksummit 2016 - event-driven microservices – Events on the outside, on the...
Chris Richardson
 
Attribute based encryption with verifiable outsourced decryption
IEEEFINALYEARPROJECTS
 
CSIS: Cloud Service Identification System
IJECEIAES
 
Mmb authenticated index for verifiable
Kamal Spring
 
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
Xamarin
 

Similar to MongoDB World 2018: Evolving your Data Access with MongoDB Stitch (20)

PPTX
MongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB
 
PDF
Evolving your Data Access with MongoDB Stitch
MongoDB
 
PPTX
MongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB
 
PDF
MongoDB World 2019: Securing Application Data from Day One
MongoDB
 
PDF
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDB
MongoDB
 
PPTX
Tutorial: Building Your First App with MongoDB Stitch
MongoDB
 
PPTX
MongoDB Stich Overview
MongoDB
 
PPTX
[MongoDB.local Bengaluru 2018] Introduction to MongoDB Stitch
MongoDB
 
PPTX
MongoDB Stitch Introduction
MongoDB
 
PPTX
Serverless Application Development with MongoDB Stitch
Michael Lynn
 
PDF
MongoDB Stitch Introduction
MongoDB
 
PDF
Faites évoluer votre accès aux données avec MongoDB Stitch
MongoDB
 
PDF
MongoDB Mobile
MongoDB
 
PPTX
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB
 
PPTX
MongDB Mobile: Bringing the Power of MongoDB to Your Device
Matt Lord
 
PPTX
SH 2 - SES 1 - Stitch_Workshop_TLV.pptx
MongoDB
 
PPTX
MongoDB Mobile: Bringing the Power of MongoDB to Your Device
MongoDB
 
PPTX
Introducing Stitch
MongoDB
 
PPTX
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
MongoDB
 
PPTX
SH 1 - SES 8 - Stitch_Overview_TLV.pptx
MongoDB
 
MongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB
 
Evolving your Data Access with MongoDB Stitch
MongoDB
 
MongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB
 
MongoDB World 2019: Securing Application Data from Day One
MongoDB
 
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDB
MongoDB
 
Tutorial: Building Your First App with MongoDB Stitch
MongoDB
 
MongoDB Stich Overview
MongoDB
 
[MongoDB.local Bengaluru 2018] Introduction to MongoDB Stitch
MongoDB
 
MongoDB Stitch Introduction
MongoDB
 
Serverless Application Development with MongoDB Stitch
Michael Lynn
 
MongoDB Stitch Introduction
MongoDB
 
Faites évoluer votre accès aux données avec MongoDB Stitch
MongoDB
 
MongoDB Mobile
MongoDB
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB
 
MongDB Mobile: Bringing the Power of MongoDB to Your Device
Matt Lord
 
SH 2 - SES 1 - Stitch_Workshop_TLV.pptx
MongoDB
 
MongoDB Mobile: Bringing the Power of MongoDB to Your Device
MongoDB
 
Introducing Stitch
MongoDB
 
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
MongoDB
 
SH 1 - SES 8 - Stitch_Overview_TLV.pptx
MongoDB
 
Ad

More from MongoDB (20)

PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
PDF
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
PDF
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB
 
PDF
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB
 
PDF
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB
 
PDF
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB
 
PDF
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
PDF
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB
 
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB
 
PDF
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB
 
PDF
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB
 
PDF
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB
 
Ad

Recently uploaded (20)

PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Digital Circuits, important subject in CS
contactparinay1
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 

MongoDB World 2018: Evolving your Data Access with MongoDB Stitch

  • 1. Evolving Data Access with MongoDB Stitch Drew DiPalma – Product Manager, Cloud
  • 4. Rendering Data App ServerDatabase IoT DevicesPhone Browser State Logic CRUD Email QueuesAccess Control Payments State Sign On Service Coordination Images Applications are evolving
  • 5. How do we evolve? Application are living in more locations: • 48% of apps have backends deployed to a public cloud • 58% of apps are now developed for multiple platforms More is expected of development: • 64% of developers identified as Full-stack (2017) Too much time is spent on maintaining: • 41% of time spent maintaining • 39% on new projects Communicate simply Adapt to the environment around us Sustainable, longterm solutions
  • 6. Rendering Data Database IoT DevicesPhone Browser CRUD Email Queues Access Control Payments State Sign On Service Coordination Images Logic State
  • 7. Stitch is comprised of 4 services – QueryAnywhere Brings MongoDB's rich query language safely to your application Build full apps for iOS, Android, Web, and IoT Functions Integrate microservices + server-side logic + cloud services Power apps with Server-side logic, or enable Data as a Service with custom APIs. Mobile Sync Automatically synchronizes data between documents held locally in MongoDB Mobile and your backend database (coming soon) Triggers Real-time notifications let your application functions react in response to database changes App responds immediately to change
  • 9. Stitch QueryAnywhere • Write generic queries from applications • Respond with precise information based on the request SDKs: • JavaScript, Android, and iOS SDKs • Integrated Authentication, Database, and Service requests Stitch Rules: • Fine-grained access rules relating to all aspects of Stitch • Access to context from users, request, external services, functions, etc.
  • 10. MongoDB Query Language + Native DriversIntegrated Rules Functions3rd Party Services Native SDKs (JavaScript, Android, iOS) Rest API How Applications interact with Stitch –
  • 12. Filters in Stitch User db.collection.find() (plus user info) db.collection.find({userid: "%%user.id"})db.collection.find({userid: "5b2..."}) [{ userid: "5b2..." data: … isSecret: false },{ userid: "5b2..." data: … isSecret: true }] Results { "name": "userId", "apply_when": {"%%true" : "%%true"}, "query": {"userid":"%%user.id"} } Filters contain an ApplyWhen and a Query which is appended to a request
  • 13. Roles in Stitch NEW [{ userid: "5b2..." data: … isSecret: false },{ userid: "5b2..." data: … isSecret: true }] Roles are defined by Match statements, evaluated per document, and assign a set of Rules per document User {name: "Secret Data", apply_when: {"isSecret": true}, fields: {…} }, {name: "Not Secret Data", apply_when: {"isSecret": False}, fields: {…} }
  • 14. {name: "Secret Data", apply_when: {"isSecret": true}, fields: {…} }, {name: "Not Secret Data", apply_when: {"isSecret": False}, fields: {…} } User Rules in Stitch "fields": { "data": {"read": true} }, "additional_fields": { "read": false, "write": false } Each Role has a set of matching Rules that define read and write access at the field-level [{ userid: "5b2..." data: … isSecret: false },{ userid: "5b2..." data: … isSecret: true }]
  • 15. Stitch Rules UI Basic Rules UI • Visual Rules • Simple Read/Write rules only • Ideal for POC/getting started Advanced Rules UI • Fully editable JSON • Advanced configuration options • Maps directly to app structure
  • 16. Advanced Rules Syntax { "filters": [{ "name": "userId", "apply_when": {"%%true" : "%%true"}, "query": {"userid":"%%user.id"} }, … ], "roles": [{ name: "Secret Data" apply_when: {isSecret: false} "fields": { "data": { "read": true } }, "additional_fields": { "read": false, "write": false }}, … ], "schema": {…} } Filters Roles Rules Schema
  • 17. JSON Schema schema: { bsonType: "object", required: ["userid", "data", "isSecret"], properties: { userid: { bsonType: "objectid", description: "The ID of the Stitch user" }, data: { bsonType: "string", description: "must be a string and is not required" }, isSecret: { bsonType: "bool", description: "True if the data is a secret" } additionalProperties: false }
  • 18. Schema Validation NEW schema: { bsonType: "object", required: ["userid", "data", "isSecret"], properties: { userid: { bsonType: "objectid", description: "The ID of the Stitch user" }, data: { bsonType: "string", validate: {"%%true": {"%function": { "name": "isValid", "arguments": ["%%user", "%%this"]}}} description: "must be a string and is not required" }, isSecret: { bsonType: "bool", description: "True if the data is a secret" } additionalProperties: false }
  • 20. Stitch SDKs Stitch provides: • Layer of server-side logic • Ability to set strict API access rules • Field-level data access on MongoDB User Filters Roles Rules
  • 22. APIs within Stitch Stitch provides: • Ability to link HTTP and Users • Ability to set strict API access rules • Field-level data access on MongoDB HTTP Request Execute As -> Filters Roles Rules
  • 24. Service Interactions within Stitch Stitch provides: • Safe service coordination • Rules applied throughout runtime • Callable from SDK, API, or Event User HTTP Request
  • 25. What’s next for Stitch?
  • 26. Stitch Roadmap xx Everywhere Bring any MongoDB Available self-hosted Expand Regional footprint Realtime Authentication Triggers Timed Triggers SDK improvements Simple to use User/Log Management Authentication Options Additional Services More SDKs
  • 27. • Check out another talk on Stitch – • Pissing Off IT and Delivery: A Tale of 2 ODS’s – 2:35 in Grammercy W • Ch-Ch-Ch-Changes: Taking Your Stitch Application to the Next Level – 2:35 in Murray Hill E • Ship It Faster with MongoDB Stitch – 3:30 in Grammercy W • MongoDB Mobile Introduction – 3:30 in Gibson • Decentralized Identity Management with Blockchain and MongoDB – 4:20 in Madison • Try out Stitch – stitch.mongodb.com • Check out SDKs and examples • Code at – github.com/mongodb/stitch-examples • Docs at – docs.mongodb.com/Stitch • Build the Dashboard or Weather IoT apps in our Tutorials section • Ask Questions or let us know what you’re building through Intercom What next?