SlideShare a Scribd company logo
Lock That Sh*t
Down!
Auth Security Patterns for
Apps, APIs, and Infra
Brian Demers and Matt Raible
@briandemers / @mraible
October 28, 2021
@briandemers / @mraible
Who are we?
Brian Demers
Open Source Developer and Java Champion
Fun facts: likes to snowboard; into 🐝
@bdemers
Matt Raible
Open Source Developer and Java Champion
Fun facts: likes to ski; into classic VWs ✌
@mraible
@briandemers / @mraible
Today's Agenda What is Auth?
AuthN vs AuthZ
01
App Auth Security Patterns
Web, SPA, Mobile
02
API Auth Security Patterns
Tokens, OAuth, Secrets
03
Infra Auth Security Patterns
Linux, SSH, Docker, Kubernetes
04
Action!
How to implement these patterns
05
@briandemers / @mraible
@briandemers / @mraible
01
What is Auth?
@briandemers / @mraible
@briandemers / @mraible
Soooo ...
Why should you care?
@briandemers / @mraible
A brief history of Auth
@briandemers / @mraible
60s: First
Password
1977:
RSA
1994:
SSL
2006:
SAML 2.0
2012:
OAuth 2.0
2014:
OIDC
2017:
PKCE
@briandemers / @mraible
Developer Personas
App Developer
Frontend Developer
Mobile App Developer
Web Developer
API Developer
Java Developer
Backend Developer
Probably likes tests
DevOps
System Administrator
Deployer
Operations
Monitoring
Security
Concerned Consultant
Paranoid Geek
Security over
performance
@briandemers / @mraible
@briandemers / @mraible
02
App Auth
Security
Patterns
@briandemers / @mraible
@briandemers / @mraible
Web vs SPA vs
Mobile App
@briandemers / @mraible
@briandemers / @mraible
HTTP Basic
@briandemers / @mraible
@briandemers / @mraible
Form-based Authentication
@briandemers / @mraible
CHALLENGE SOLUTION
@briandemers / @mraible
SAML
@briandemers / @mraible
SAML is to OIDC as
SOAP is to REST.
-Joël Franusic (@jf)
@briandemers / @mraible
JWT Authentication
@briandemers / @mraible
@briandemers / @mraible
@briandemers / @mraible
Why JWTs Suck as Session Tokens
-@rdegges on developer.okta.com, 2017
What do we do about JWT?
-Security. Cryptography. Whatever. podcast, 2021
@briandemers / @mraible
OpenID Connect (OIDC) for Auth
@briandemers / @mraible
Identity
Provider
🔒Verify
@briandemers / @mraible
Multi-Factor Authentication (MFA)
@briandemers / @mraible
@briandemers / @mraible
Multi-Factor Authentication (MFA)
@briandemers / @mraible
Passwordless
password
Password1
Password1!
We like to think we know what we are talking
about, at least Okta hasn't fired us yet…
@briandemers / @mraible
@briandemers / @mraible
SAML
⭐ ⭐
App Auth
Security
Patterns HTTP Basic
⭐
Embedded Auth
⭐
OpenID Connect
⭐ ⭐ ⭐ ⭐
MFA
⭐ ⭐ ⭐ ⭐ ⭐
Passwordless
⭐ ⭐ ⭐ ⭐ ⭐
JWT Auth
⭐ ⭐
@briandemers / @mraible
@briandemers / @mraible
App Auth Security Patterns
Tired Wired
Apps handling passwords
Stateless to scale
OAuth Implicit Flow
Sensitive data in URL
Let someone else worry about it
Sessions are tried and true
OAuth Auth Code w/ PKCE
Use headers or the body
@briandemers / @mraible
@briandemers / @mraible
03
API Auth
Security
Patterns
@briandemers / @mraible
@briandemers / @mraible
HTTP Basic
@briandemers / @mraible
spring:
cloud:
config:
fail-fast: true
retry:
initial-interval: 1000
max-interval: 2000
max-attempts: 100
uri: http://admin:${jhipster.registry.password}@localhost:8761/config
# name of the config server's property source (file.yml) that we want to use
name: store
profile: prod # profile(s) of the property source
label: main # toggle to switch to a different version stored in git
jhipster:
registry:
password: admin
@briandemers / @mraible
Tokens
@briandemers / @mraible
$20
@briandemers / @mraible
OAuth 2.0
@briandemers / @mraible https://aaronparecki.com/2019/12/12/21/its-time-for-oauth-2-dot-1
@briandemers / @mraible
OAuth 2.0
@briandemers / @mraible
@briandemers / @mraible
OAuth 2.0
@briandemers / @mraible
@briandemers / @mraible
OAuth 2.1
@briandemers / @mraible
https://oauth.net/2.1
Authorization Code + PKCE
Client Credentials
Device Grant
@briandemers / @mraible
OAuth Client Credentials
@briandemers / @mraible
@briandemers / @mraible
API Gateway
API
Gateway
App
App
App
/dogs
/cats
/fish
@briandemers / @mraible
{ Rest }
Client
@briandemers / @mraible
Use API SDKs
@briandemers / @mraible
@briandemers / @mraible
Encrypt and Rotate Secrets
@briandemers / @mraible
@briandemers / @mraible
RBAC and ACLs
@briandemers / @mraible
Groups
Admin
User
Help Desk
Privilege
Record : Read
Record : Create
Record : Update
Record : Delete
Users
@briandemers / @mraible
OAuth 2.1
⭐ ⭐ ⭐ ⭐ ⭐
API Auth
Security
Patterns HTTP Basic
⭐ ⭐
Tokens
⭐ ⭐ ⭐
API SDKs
⭐ ⭐ ⭐ ⭐
Encrypt Secrets
⭐ ⭐ ⭐ ⭐ ⭐
RBAC and ACLs
⭐ ⭐ ⭐ ⭐ ⭐
API Gateway
⭐ ⭐ ⭐ ⭐ ⭐
@briandemers / @mraible
@briandemers / @mraible
API Auth Security Patterns
Tired Wired
Build it yourself
Static API Tokens
CORS wildcard
Use existing libraries
Short lived access tokens
Restrict access with CORS
@briandemers / @mraible
@briandemers / @mraible
04
Infra Auth
Security
Patterns
@briandemers / @mraible
CHALLENGE SOLUTION
@briandemers / @mraible
Linux
@briandemers / @mraible
Software is Automation
and Automation is
less toil.
-Mark Shuttleworth
Canonical CEO
Larry Ewing
@briandemers / @mraible
SSH with Keys
@briandemers / @mraible
https://www.ssh.com/academy/ssh/protocol
Certificates
CC BY 3.0: EFF.org
@briandemers / @mraible
@briandemers / @mraible
@briandemers / @mraible
SSO for Servers
https://www.redhat.com/sysadmin/pluggable-authentication-modules-pam
Active Directory
Pluggable Authentication Modules (PAM) for Linux
Okta's Advanced Server Access
https://www.redhat.com/sysadmin/pluggable-authentication-modules-pam
Scan Docker Images
@briandemers / @mraible
@briandemers / @mraible
Know Your Cloud and Cluster Security
@briandemers / @mraible https://twitter.com/acloudguru/status/1344724013122260993
@briandemers / @mraible
The 4C's of Cloud Native Security
https://kubernetes.io/docs/concepts/security/overview/
@briandemers / @mraible
@briandemers / @mraible
Kubernetes Tips
Kubernetes Tips
Only expose what needs to be public
Scan and update Kubernetes YAML
Check out Kubescape
https://www.infoq.com/podcasts/continuous-delivery-with-kubernetes
@briandemers / @mraible
@briandemers / @mraible
Encrypt Kubernetes Secrets
@briandemers / @mraible
apiVersion: v1
kind: Secret
metadata:
name: registry-secret
namespace: demo
type: Opaque
data:
registry-admin-password: ZTVmNzU2YWEtMmEyMy00NzE3LTgwOTMtNzcyYTRkOTliZDI4 # base64
encoded "e5f756aa-2a23-4717-8093-772a4d99bd28"
@briandemers / @mraible
Automation is Key
@briandemers / @mraible
WSJ
@briandemers / @mraible
@briandemers / @mraible
@briandemers / @mraible
Certificates
⭐ ⭐ ⭐ ⭐
Infra Auth
Security
Patterns Linux
⭐ ⭐ ⭐ ⭐ ⭐
SSH with Keys
⭐ ⭐ ⭐
Scan Docker Images
⭐ ⭐ ⭐ ⭐ ⭐
Encrypt K8s Secrets
⭐ ⭐ ⭐ ⭐ ⭐
Automate Your Infra
⭐ ⭐ ⭐ ⭐ ⭐
SSO for Servers
⭐ ⭐ ⭐ ⭐ ⭐
@briandemers / @mraible
@briandemers / @mraible
Infra Auth Security Patterns
Tired Wired
FROM: some-large-image:1.2.3
Secrets in Images
Shared Credentials
Use minimal images
HashiCorp Vault
Limit Access
@briandemers / @mraible
@briandemers / @mraible
05
Action!
@briandemers / @mraible
@briandemers / @mraible
Action
How to codify these patterns?
@briandemers / @mraible
spring
security
@briandemers / @mraible
Action
How to test for lack of
patterns?
@briandemers / @mraible
https://implicitdetector.io
Audit Server Access
@briandemers / @mraible
Action
How to test for vulnerabilities?
@briandemers / @mraible
@briandemers / @mraible
What about ?
@briandemers / @mraible
The OWASP Top 10 really
hasn’t changed all that
much in the last ten years.
-Johnny Xmas (@J0hnnyXm4s)
@briandemers / @mraible
@briandemers / @mraible
developer.okta.com/blog
@oktadev
@briandemers / @mraible
@briandemers / @mraible
Thanks!
Brian Demers
@briandemers @bdemers
@bdemers
brian.demers@okta.com
Matt Raible
@mraible @mraible
@mraible
matt.raible@okta.com
https://speakerdeck.com/mraible
developer.okta.com

More Related Content

PDF
Front End Development for Back End Java Developers - West Midlands Java User ...
PDF
Java Web Application Security - Jazoon 2011
PDF
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
PDF
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
PDF
Apache Roller, Acegi Security and Single Sign-on
PDF
Front End Development for Back End Java Developers - Jfokus 2020
PDF
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
PDF
Security Patterns for Microservice Architectures - ADTMag Microservices & API...
Front End Development for Back End Java Developers - West Midlands Java User ...
Java Web Application Security - Jazoon 2011
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Apache Roller, Acegi Security and Single Sign-on
Front End Development for Back End Java Developers - Jfokus 2020
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
Security Patterns for Microservice Architectures - ADTMag Microservices & API...

What's hot (20)

PDF
Front End Development for Back End Java Developers - NYJavaSIG 2019
PDF
Front End Development for Backend Developers - GIDS 2019
PDF
Java Web Application Security - UberConf 2011
PDF
Front End Development for Back End Developers - vJUG24 2017
PDF
Web App Security for Java Developers - PWX 2021
PDF
Java REST API Framework Comparison - PWX 2021
PDF
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
PDF
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
PPT
Choosing a Java Web Framework
PDF
Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019
PDF
Java REST API Framework Comparison - UberConf 2021
PDF
10 Excellent Ways to Secure Spring Boot Applications - Okta Webinar 2020
PDF
JAX-RS JavaOne Hyderabad, India 2011
PDF
Front End Development for Back End Java Developers - South West Java 2019
PPT
Os Johnson
PDF
Front End Development for Back End Developers - Denver Startup Week 2017
PDF
Spark IT 2011 - Developing RESTful Web services with JAX-RS
PDF
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019
PDF
Java Web Application Security - Utah JUG 2011
PDF
4Developers 2015: Do you think you're doing microservice architecture? - Marc...
Front End Development for Back End Java Developers - NYJavaSIG 2019
Front End Development for Backend Developers - GIDS 2019
Java Web Application Security - UberConf 2011
Front End Development for Back End Developers - vJUG24 2017
Web App Security for Java Developers - PWX 2021
Java REST API Framework Comparison - PWX 2021
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
Choosing a Java Web Framework
Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019
Java REST API Framework Comparison - UberConf 2021
10 Excellent Ways to Secure Spring Boot Applications - Okta Webinar 2020
JAX-RS JavaOne Hyderabad, India 2011
Front End Development for Back End Java Developers - South West Java 2019
Os Johnson
Front End Development for Back End Developers - Denver Startup Week 2017
Spark IT 2011 - Developing RESTful Web services with JAX-RS
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019
Java Web Application Security - Utah JUG 2011
4Developers 2015: Do you think you're doing microservice architecture? - Marc...
Ad

Similar to Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - JokerConf 2021 (20)

PDF
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
PDF
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra
PDF
Centralise legacy auth at the ingress gateway, SREday
PDF
Centralise legacy auth at the ingress gateway
PDF
Centralise legacy auth at the ingress gateway
PDF
Web App Security for Java Developers - UberConf 2021
PDF
JDD2015: Security in the era of modern applications and services - Bolesław D...
PDF
APIsecure 2023 - OAuth, OIDC and protecting third-party credentials, Ed Olson...
PPTX
Microservices security - jpmc tech fest 2018
PDF
Draft Ietf Oauth V2 12
PPTX
DevOops Redux Ken Johnson Chris Gates - AppSec USA 2016
PDF
When and Why Would I use Oauth2?
PDF
Building an API Security Ecosystem
PDF
Best Practices in Building an API Security Ecosystem
PDF
Secured REST Microservices with Spring Cloud
PDF
CCICI CIP 1.0 Testbed - Security access implementation and reference - v1.0
PDF
OpenID Foundation Workshop at EIC 2018 - Introduction to the FAPI Read & Writ...
PDF
Draft Hammer Oauth 10
PDF
OpenID Foundation FAPI WG: June 2017 Update
PDF
Practical API Security - Midwest PHP 2018
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra
Centralise legacy auth at the ingress gateway, SREday
Centralise legacy auth at the ingress gateway
Centralise legacy auth at the ingress gateway
Web App Security for Java Developers - UberConf 2021
JDD2015: Security in the era of modern applications and services - Bolesław D...
APIsecure 2023 - OAuth, OIDC and protecting third-party credentials, Ed Olson...
Microservices security - jpmc tech fest 2018
Draft Ietf Oauth V2 12
DevOops Redux Ken Johnson Chris Gates - AppSec USA 2016
When and Why Would I use Oauth2?
Building an API Security Ecosystem
Best Practices in Building an API Security Ecosystem
Secured REST Microservices with Spring Cloud
CCICI CIP 1.0 Testbed - Security access implementation and reference - v1.0
OpenID Foundation Workshop at EIC 2018 - Introduction to the FAPI Read & Writ...
Draft Hammer Oauth 10
OpenID Foundation FAPI WG: June 2017 Update
Practical API Security - Midwest PHP 2018
Ad

More from Matt Raible (20)

PDF
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
PDF
Micro Frontends for Java Microservices - Belfast JUG 2022
PDF
Micro Frontends for Java Microservices - Dublin JUG 2022
PDF
Micro Frontends for Java Microservices - Cork JUG 2022
PDF
Comparing Native Java REST API Frameworks - Seattle JUG 2022
PDF
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
PDF
Comparing Native Java REST API Frameworks - Devoxx France 2022
PDF
Native Java with Spring Boot and JHipster - Garden State JUG 2021
PDF
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
PDF
Native Java with Spring Boot and JHipster - SF JUG 2021
PDF
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
PDF
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
PDF
JHipster and Okta - JHipster Virtual Meetup December 2020
PDF
Security Patterns for Microservice Architectures - SpringOne 2020
PDF
Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...
PDF
Security Patterns for Microservice Architectures - London Java Community 2020
PDF
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020
PDF
Security Patterns for Microservice Architectures - Oktane20
PDF
Full Stack Reactive with React and Spring WebFlux - Switzerland JUG 2020
PDF
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Switzerl...
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
Micro Frontends for Java Microservices - Belfast JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Comparing Native Java REST API Frameworks - Devoxx France 2022
Native Java with Spring Boot and JHipster - Garden State JUG 2021
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Native Java with Spring Boot and JHipster - SF JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
JHipster and Okta - JHipster Virtual Meetup December 2020
Security Patterns for Microservice Architectures - SpringOne 2020
Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...
Security Patterns for Microservice Architectures - London Java Community 2020
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020
Security Patterns for Microservice Architectures - Oktane20
Full Stack Reactive with React and Spring WebFlux - Switzerland JUG 2020
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Switzerl...

Recently uploaded (20)

PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Digital Strategies for Manufacturing Companies
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Understanding Forklifts - TECH EHS Solution
PDF
top salesforce developer skills in 2025.pdf
PDF
System and Network Administration Chapter 2
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Nekopoi APK 2025 free lastest update
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPT
Introduction Database Management System for Course Database
PPTX
L1 - Introduction to python Backend.pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
ai tools demonstartion for schools and inter college
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PTS Company Brochure 2025 (1).pdf.......
Digital Strategies for Manufacturing Companies
ISO 45001 Occupational Health and Safety Management System
Understanding Forklifts - TECH EHS Solution
top salesforce developer skills in 2025.pdf
System and Network Administration Chapter 2
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
How Creative Agencies Leverage Project Management Software.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
Nekopoi APK 2025 free lastest update
Operating system designcfffgfgggggggvggggggggg
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Which alternative to Crystal Reports is best for small or large businesses.pdf
Introduction Database Management System for Course Database
L1 - Introduction to python Backend.pptx
Odoo Companies in India – Driving Business Transformation.pdf
How to Choose the Right IT Partner for Your Business in Malaysia
ai tools demonstartion for schools and inter college
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Design an Analysis of Algorithms I-SECS-1021-03

Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - JokerConf 2021