SlideShare a Scribd company logo
Secure API Services in Node.js
Welcome!
• Agenda
• Stormpath 101 (5 mins)
• How to secure an API (25 mins)
• Q&A (30 mins)
• Claire Hunsaker
VP of Marketing & Customer Success
• Randall Degges
Node.js Evangelist
Customer Identity Poses Major Challenges
Speed to Market & Cost Reduction
• Complete Identity solution out-of-the-box
• Security best practices and updates by default
• Clean & elegant API/SDKs
• Little to code, no maintenance
Focus on Your Core Competency
Stormpath User Management
User Data
User
Workflows Google ID
Your Applications
Application SDK
Application SDK
Application SDK
ID Integrations
Facebook
Active
Directory
SAML
Features
• Secure, flexible Authentication
(Password, Token, OAuth, API)
• Deep Authorization
Groups, Roles
Customer Organizations
Permissions
• Customer Profile Data
• Single Sign-On Across Your Apps
• Hosted User Screens
What’s the Goal of This Talk?
D’oh!
API Server(s)API Client
API Client
API Client
API Client
Internet
API Server(s)API Server(s)
Browser / Mobile
Web
API Client
Client-to-API Server-to-API
Basic Auth OAuth2
What’s the Goal of This Talk?
About API Keys…
randall@stormpath.com
iLOVEc00kies!
API Server(s)Website
163e087c36c34fa4b4635995c29cf9b5:b6e7bd4c74cf430493fe03b2e30225f8
API Secret
Long, random strings (uuids).
Let Users Have Multiple API Keys
Key 1 Key 2
ID: 3c511ea2ef424dd88bc1575e7e5a2bd7
Secret: 1ae8120c1ec940638913f4e258b8f7fe
ID: cc463f7aabfd4132a2211006886d05f1
Secret: 85172ea5aef144038f019b3111b5e11a
Creating API Keys with Stormpath
req.user.createApiKey(function(err, apiKey) {
if (err) throw err;
console.log('New API key created!');
console.log('API Key ID:', apiKey.id);
console.log('API Key Secret:',
apiKey.secret);
});
LET’S SET UP STORMPATH!
LET’S WRITE SOME CODE!
How Does Basic Auth Work?
API Server(s)
Authorization: Basic <base64(id:secret)>
$ curl --user id:secret http://localhost:3000/api/test
How Does OAuth2 Work? (Step 1)
API Server(s)
Authorization: Basic <base64(id:secret)>
Access Token
$ curl --user id:secret 
-X POST 
--data grant_type=client_credentials 
http://localhost:3000/oauth/token
How Does OAuth2 Work? (Step 2)
API Server(s)
Authorization: Bearer <token>
$ curl -H “Authorization: Bearer <token>” 
http://localhost:3000/api/test
Node & Express Resources
• Talking to OAuth2 Services with Node.js
https://stormpath.com/blog/talking-to-oauth2-services-with-nodejs
• What the Heck is OAuth?
https://stormpath.com/blog/what-the-heck-is-oauth/
• Stormpath Express Library
http://docs.stormpath.com/nodejs/express/latest/
• All Our JavaScript Integrations
http://docs.stormpath.com/nodejs/
QUESTIONS?
THANK YOU

More Related Content

What's hot (20)

PPTX
Token Authentication for Java Applications
Stormpath
 
PPTX
Browser Security 101
Stormpath
 
PDF
Authentication: Cookies vs JWTs and why you’re doing it wrong
Derek Perkins
 
PPTX
Single-Page-Application & REST security
Igor Bossenko
 
PPTX
API Security & Federation Patterns - Francois Lascelles, Chief Architect, Lay...
CA API Management
 
PDF
Super simple application security with Apache Shiro
Marakana Inc.
 
PPTX
Secure Your REST API (The Right Way)
Stormpath
 
PDF
ConFoo 2015 - Securing RESTful resources with OAuth2
Rodrigo Cândido da Silva
 
PPTX
Api security
teodorcotruta
 
PPTX
ApacheCon 2014: Infinite Session Clustering with Apache Shiro & Cassandra
DataStax Academy
 
PDF
JavaOne 2014 - Securing RESTful Resources with OAuth2
Rodrigo Cândido da Silva
 
PPTX
Rest API Security
Stormpath
 
PPTX
Best Practices in Building an API Security Ecosystem
Prabath Siriwardena
 
PDF
JWTs in Java for CSRF and Microservices
Stormpath
 
PPTX
Spring Security
Manish Sharma
 
PPTX
Enabling Cloud Native Security with OAuth2 and Multi-Tenant UAA
Will Tran
 
PPTX
Intro to Apache Shiro
Claire Hunsaker
 
PPTX
D@W REST security
Gaurav Sharma
 
PPTX
Instant Security & Scalable User Management with Spring Boot
Stormpath
 
PPTX
Securing RESTful APIs using OAuth 2 and OpenID Connect
Jonathan LeBlanc
 
Token Authentication for Java Applications
Stormpath
 
Browser Security 101
Stormpath
 
Authentication: Cookies vs JWTs and why you’re doing it wrong
Derek Perkins
 
Single-Page-Application & REST security
Igor Bossenko
 
API Security & Federation Patterns - Francois Lascelles, Chief Architect, Lay...
CA API Management
 
Super simple application security with Apache Shiro
Marakana Inc.
 
Secure Your REST API (The Right Way)
Stormpath
 
ConFoo 2015 - Securing RESTful resources with OAuth2
Rodrigo Cândido da Silva
 
Api security
teodorcotruta
 
ApacheCon 2014: Infinite Session Clustering with Apache Shiro & Cassandra
DataStax Academy
 
JavaOne 2014 - Securing RESTful Resources with OAuth2
Rodrigo Cândido da Silva
 
Rest API Security
Stormpath
 
Best Practices in Building an API Security Ecosystem
Prabath Siriwardena
 
JWTs in Java for CSRF and Microservices
Stormpath
 
Spring Security
Manish Sharma
 
Enabling Cloud Native Security with OAuth2 and Multi-Tenant UAA
Will Tran
 
Intro to Apache Shiro
Claire Hunsaker
 
D@W REST security
Gaurav Sharma
 
Instant Security & Scalable User Management with Spring Boot
Stormpath
 
Securing RESTful APIs using OAuth 2 and OpenID Connect
Jonathan LeBlanc
 

Viewers also liked (15)

PDF
Building Beautiful REST APIs in ASP.NET Core
Stormpath
 
PPTX
Storing User Files with Express, Stormpath, and Amazon S3
Stormpath
 
PPTX
Building Secure User Interfaces With JWTs (JSON Web Tokens)
Stormpath
 
PPTX
Custom Data Search with Stormpath
Stormpath
 
PPTX
Stormpath 101: Spring Boot + Spring Security
Stormpath
 
PPTX
Spring Boot Authentication...and More!
Stormpath
 
PPTX
Beautiful REST+JSON APIs with Ion
Stormpath
 
PPTX
Build a Node.js Client for Your REST+JSON API
Stormpath
 
PPTX
So long scrum, hello kanban
Stormpath
 
PPTX
Elegant Rest Design Webinar
Stormpath
 
PPTX
Build A Killer Client For Your REST+JSON API
Stormpath
 
PPTX
REST API Design for JAX-RS And Jersey
Stormpath
 
PDF
Getting Started With Angular
Stormpath
 
PDF
Build a REST API for your Mobile Apps using Node.js
Stormpath
 
PDF
Building Beautiful REST APIs with ASP.NET Core
Stormpath
 
Building Beautiful REST APIs in ASP.NET Core
Stormpath
 
Storing User Files with Express, Stormpath, and Amazon S3
Stormpath
 
Building Secure User Interfaces With JWTs (JSON Web Tokens)
Stormpath
 
Custom Data Search with Stormpath
Stormpath
 
Stormpath 101: Spring Boot + Spring Security
Stormpath
 
Spring Boot Authentication...and More!
Stormpath
 
Beautiful REST+JSON APIs with Ion
Stormpath
 
Build a Node.js Client for Your REST+JSON API
Stormpath
 
So long scrum, hello kanban
Stormpath
 
Elegant Rest Design Webinar
Stormpath
 
Build A Killer Client For Your REST+JSON API
Stormpath
 
REST API Design for JAX-RS And Jersey
Stormpath
 
Getting Started With Angular
Stormpath
 
Build a REST API for your Mobile Apps using Node.js
Stormpath
 
Building Beautiful REST APIs with ASP.NET Core
Stormpath
 
Ad

Similar to Secure API Services in Node with Basic Auth and OAuth2 (20)

PPTX
No-Code SAML Support for SaaS Applications with Stormpath
Lindsay Brunner
 
PDF
WSO2Con EU 2015: Securing, Monitoring and Monetizing APIs
WSO2
 
PDF
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Nicolás Lopéz
 
PDF
SPUnite17 Creating Scalable Cloud Solutions
NCCOMMS
 
PPTX
CA CloudMinder Vasu Surabhi
Vasu Surabhi
 
PDF
Quality assurance-for-a-blockchain-based-solution
Cygnet Infotech
 
PDF
Quality assurance-for-a-blockchain-based-solution
Maitrikpaida
 
PDF
04_Extending and Securing Enterprise Applications in Microsoft Azure_GAB2019
Kumton Suttiraksiri
 
DOC
Prakhar Sood-Resume-CV
Prakhar Sood
 
PDF
Company and Market Overview
Okta-Inc
 
PDF
Develop enterprise-ready applications for Microsoft Teams
Markus Moeller
 
PPT
Fédération d’identité : des concepts Théoriques aux études de cas d’implément...
e-Xpert Solutions SA
 
PPSX
Skill_Level_ Strider
Tushar R
 
PPTX
How to plan your Modern Workplace Project - SPS Denver October 2018
Ammar Hasayen
 
PPTX
Identity Summit 2015: EnerNOC Case Study: The Transformation of IAM for EnerN...
ForgeRock
 
PDF
Client & Virtual User Experience Monitoring mit Splunk
Georg Knon
 
PDF
Client & Virtual User Experience Monitoring mit Splunk
Georg Knon
 
PPTX
Synergies across APIs and IAM
Sagara Gunathunga
 
PPTX
Secure and Optimize APIs using Azure API Management
BizTalk360
 
PPT
Iam suite introduction
wardell henley
 
No-Code SAML Support for SaaS Applications with Stormpath
Lindsay Brunner
 
WSO2Con EU 2015: Securing, Monitoring and Monetizing APIs
WSO2
 
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Nicolás Lopéz
 
SPUnite17 Creating Scalable Cloud Solutions
NCCOMMS
 
CA CloudMinder Vasu Surabhi
Vasu Surabhi
 
Quality assurance-for-a-blockchain-based-solution
Cygnet Infotech
 
Quality assurance-for-a-blockchain-based-solution
Maitrikpaida
 
04_Extending and Securing Enterprise Applications in Microsoft Azure_GAB2019
Kumton Suttiraksiri
 
Prakhar Sood-Resume-CV
Prakhar Sood
 
Company and Market Overview
Okta-Inc
 
Develop enterprise-ready applications for Microsoft Teams
Markus Moeller
 
Fédération d’identité : des concepts Théoriques aux études de cas d’implément...
e-Xpert Solutions SA
 
Skill_Level_ Strider
Tushar R
 
How to plan your Modern Workplace Project - SPS Denver October 2018
Ammar Hasayen
 
Identity Summit 2015: EnerNOC Case Study: The Transformation of IAM for EnerN...
ForgeRock
 
Client & Virtual User Experience Monitoring mit Splunk
Georg Knon
 
Client & Virtual User Experience Monitoring mit Splunk
Georg Knon
 
Synergies across APIs and IAM
Sagara Gunathunga
 
Secure and Optimize APIs using Azure API Management
BizTalk360
 
Iam suite introduction
wardell henley
 
Ad

Recently uploaded (20)

PPTX
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
PPTX
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
PDF
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
PDF
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
PDF
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
PDF
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
PDF
Open Source Milvus Vector Database v 2.6
Zilliz
 
PDF
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
PDF
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
PPTX
𝙳𝚘𝚠𝚗𝚕𝚘𝚊𝚍—Wondershare Filmora Crack 14.0.7 + Key Download 2025
sebastian aliya
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
PDF
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
PPTX
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
Open Source Milvus Vector Database v 2.6
Zilliz
 
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
𝙳𝚘𝚠𝚗𝚕𝚘𝚊𝚍—Wondershare Filmora Crack 14.0.7 + Key Download 2025
sebastian aliya
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 

Secure API Services in Node with Basic Auth and OAuth2