SlideShare a Scribd company logo
Secure All Things
By Luis Majano
www.intothebox.org
@lmajano
@ortussolutions
Luis Majano
• Salvadorean Born!
• Imported to the USA
• Computer Engineering
• CEO of Ortus Solutions
Inspiration
Applying security concerns to our web
applications is paramount.
Every application will need it.
Many forms of application security and many
levels.
What is cbSecurity?
https://coldbox-
Module Composition
What is needed for security?
✴ Validates user credentials
✴ Logs them in and out
✴ Tracks their security in session,
custom storage, or none.
✴ Validates Permissions
✴ Validates Roles
✴ Validates nothing 😜
What is needed for security?
✴ Use ANY auth service: IAuthenticationService
✴ Includes cbauth
✴ Login/Logout
✴ Session Tracking in session/request/cache
✴ You Provide a user service: IUserService
✴ You Provide a user object: IAuthUser
✴ Permission and Role Based
✴ Interfaces:
✴ IAuthUser - Roles and Permissions
✴ IJwtSubject - Jwt Scopes, etc.
Security Firewall
1. What do we secure?
1. Events
2. URIs
2. How do we secure?
1. Security Rules
2. Handler + Action Annotations
3. JWT Headers
4. cbSecurity explicit methods
3. Who validates?
Who Validates? ➡ Validators
V
Validators
✴ Configured globally or per-module
✴ Determine the type of authentication/authorization services to use
✴ The firewall calls the validator for a 👍 or 👎
✴ Core Validators
✴ Auth : role/permission-based security via IAuthService and IAuthUser
interfaces
✴ CFML : Leverages CFML cflogin/cflogout features
✴ Basic Auth : Prompts users for credentials using HTTP Basic Auth
✴ JWT Validator : Checks headers for a JWT token and refresh token
✴ Custom Validators: ISecurityValidator
`
Security Rules
Security Rules
✴ Rules
✴ are evaluated from top to bottom (Order is important)
✴ secure incoming events/urls via regex patterns
✴ can have white-listed patterns
✴ can have roles and permissions
✴ can have ip, host header restrictions
✴ can be global or per-module
✴ can come from:
✴ Config Inline
✴ Database
✴ XML, JSON
✴ Object Calls
Security Rules
Security Rule Actions
✴ Each rule determines what action to occur if the request is not valid:
✴ Redirect to another event/URL
✴ Override the incoming event to another event
✴ Block the request with a 401 Not Authorized
✴ If there is no action in the rule, what happens?
✴ Cascades to module settings ➡ global settings
✴ defaultAuthenticationAction
✴ invalidAuthenticationEvent
✴ defaultAuthorizationAction
✴ invalidAuthorizationEvent
Security Rule
Handler Annotation Security
✴ Cascading Security
✴ Component
✴ Access to all actions
✴ Actions
✴ Specific action security
✴ Secure Annotation Value
✴ Nothing - Authenticated
✴ List - Authorizations
Security Rule
Secured URL
✴ cbSecurity stores & flashes the incoming URL
✴ rc._securedURL
✴ Better login experiences
cbSecurity Model
✴ Security Helper Object
✴ Fluent constructs
✴ cbsecure() mixin (handlers/layouts/views/interceptors)
✴ Injection @cbsecurity (models)
✴ Different Types of Methods:
✴ Authentication: Verify if logged in, logout, authenticate
✴ Authorization Contexts: Fluent secure block
✴ Blocking: Throw a NotAuthorized exception
✴ Secure Views: Secure rendering of views
✴ Utility: Generating passwords, checking ip, hostnames, etc
✴ Verification: Verify permissions, etc
cbSecurity - Authentication Methods
getAuthService()
getUserService()
authenticate( username, password )
getUser()
isLoggedIn()
logout()
cbSecurity - Authorization Context Methods
when( permissions, success, fail )
whenAll( permissions, success, fail )
whenNone( permissions, success, fail )
cbSecurity - Blocking Methods
secure( permissions, [message] )
secureAll( permissions, [message] )
secureNone( permissions, [message] )
secureSameUser( user, [message])
secureWhen( context, [errorMessage] )
If context = true, then throw a NotAuthorized exception
cbSecurity - Secure Views Methods
secureView( permissions, successView, failView )
cbSecurity - Utility Methods
createPassword( length:32, letters:true, numbers:true, symbols:true )
getRealIP( trustUpstream:true )
getRealHost( trustUpstream:true )
cbSecurity - Verification Methods
has( permissions ):boolean
all( permissions ):boolean
none( permissions ):boolean
sameUser( user ):boolean
Security Visualizer
Security Visualizer
✴ Visualize all configuration settings
✴ Firewall activity
✴ Firewall rules simulator
✴ Security Headers
✴ Can also be secured
Firewall Logs
✴ Activate firewall logging
✴ Firewall > logs
✴ Collection of security best
practices
✴ Highly configurable
✴ Several on by default
Security Headers
CSRF
Cross-Site Request Forgery
CSRF
Cross-Site Request Forgery
csrfToken()
csrfVerify()
csrf()
csrfField()
csrfRotate()
CSRF
Cross-Site Request Forgery
✴ Leverages the cbcsrf module
✴ Generate & validate tokens
✴ Highly configurable
JWT Security
JWT Security
https://jwt.io/introduction/
CBSecurity 3 - Secure Your ColdBox Applications
Jwt-cfml
✴ https://forgebox.io/view/jwt-cfml
✴ Encode/Decode JSON Web Tokens
✴ HS256
✴ HS384
✴ HS512
✴ RS256
✴ RS384
✴ RS512
✴ ES256
✴ ES384
✴ ES512
Settings
Database
CacheBox
WireBox ID
IJwtStorage
Base Claims
✴ Issuer (iss) - The issuer of the token (defaults to the application's base URL)
✴ Issued At (iat) - When the token was issued (unix timestamp)
✴ Subject (sub) - This holds the identifier for the token (defaults to user id)
✴ Expiration time (exp) - The token expiry date (unix timestamp)
✴ Unique ID (jti) - A unique identifier for the token (md5 of the sub and iat claims)
✴ Scopes (scope) - A space-delimited string of scopes attached to the token
✴ Refresh Token (cbsecurity_refresh) - If you use refresh tokens, this custom
claim will be added to the payload.
Base Claims
JWT SERVICE
✴ JWTService
✴ Helper: jwtAuth()
✴ Injection: JWTService@cbSecurity
✴ Rest and rest-hmvc templates give a full working example
JWT SERVICE
JWT SERVICE
JWT SERVICE
JWT SERVICE
JWT SERVICE
JWT SERVICE
JWT Routes
JWT
Controller
Security Events
cbSecurity_onInvalidAuthentication
cbSecurity_onInvalidAuthorization
Login Interceptions
preAuthentication
postAuthentication
preLogin
postLogin
preLogout
postLogout
cbauth Interceptions
Jwt Interceptions
cbSecurity_onJWTCreation
cbSecurity_onJWTInvalidation
cbSecurity_onJWTValidAuthentication
cbSecurity_onJWTInvalidUser
cbSecurity_onJWTInvalidClaims
cbSecurity_onJWTExpiration
cbSecurity_onJWTStorageRejection
cbSecurity_onJWTValidParsing
cbSecurity_onJWTInvalidateAllTokens
GET AN
EXTRA 10%
OFF
I N T O T H E B O X
Offer ends Monday March 20th at 12:00 am
Code: Early10
WWW.INTOTHEBOX.ORG
Limited offer: 2 Days Only
Early bird tickets

More Related Content

What's hot (20)

PDF
[MGDC] 리눅스 게임 서버 성능 분석하기 - 아이펀팩토리 김진욱 CTO
iFunFactory Inc.
 
PDF
천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기::이창수::AWS Summit Seoul 2018
Amazon Web Services Korea
 
PDF
Lambda@Edge를통한멀티리전기반글로벌트래픽길들이기::이상현::AWS Summit Seoul 2018
Amazon Web Services Korea
 
PDF
イエラエセキュリティMeet up 20210820
GMOサイバーセキュリティ byイエラエ株式会社
 
PDF
Serverless 개발에서의 인증 완벽 가이드::박선용::AWS Summit Seoul 2018
Amazon Web Services Korea
 
PDF
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
Amazon Web Services Korea
 
PPTX
아리랑 위성영상 AI 객체 검출 경진대회 2등 수상자 솔루션
DACON AI 데이콘
 
PDF
katalon studio 툴을 이용한 GUI 테스트 자동화 가이드
SangIn Choung
 
PPTX
Entity Framework Core
Kiran Shahi
 
PDF
React Development with the MERN Stack
Troy Miles
 
PDF
Amazon Redshift의 이해와 활용 (김용우) - AWS DB Day
Amazon Web Services Korea
 
PPT
XSS and CSRF with HTML5
Shreeraj Shah
 
PPTX
Spring 3.x - Spring MVC - Advanced topics
Guy Nir
 
PDF
AWS 를 활용한 저지연 라이브 (Low Latency Live) 서비스 구현 - 류재춘 컨설턴트/에반젤리스트, GS Neot다 :: AW...
Amazon Web Services Korea
 
PDF
PCI DSSにおける認証認可 インフラ編
Nobuhiro Nakayama
 
ODP
HTML5, CSS, JavaScript Style guide and coding conventions
Knoldus Inc.
 
PDF
Amazon DynamoDB Advanced Design Pattern
Amazon Web Services Japan
 
PDF
AWS Black Belt Online Seminar 2017 Amazon S3
Amazon Web Services Japan
 
PDF
Visual Basic IDE Introduction
Ahllen Javier
 
PPTX
CloudWatchの使い方
ShinsukeYokota
 
[MGDC] 리눅스 게임 서버 성능 분석하기 - 아이펀팩토리 김진욱 CTO
iFunFactory Inc.
 
천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기::이창수::AWS Summit Seoul 2018
Amazon Web Services Korea
 
Lambda@Edge를통한멀티리전기반글로벌트래픽길들이기::이상현::AWS Summit Seoul 2018
Amazon Web Services Korea
 
イエラエセキュリティMeet up 20210820
GMOサイバーセキュリティ byイエラエ株式会社
 
Serverless 개발에서의 인증 완벽 가이드::박선용::AWS Summit Seoul 2018
Amazon Web Services Korea
 
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
Amazon Web Services Korea
 
아리랑 위성영상 AI 객체 검출 경진대회 2등 수상자 솔루션
DACON AI 데이콘
 
katalon studio 툴을 이용한 GUI 테스트 자동화 가이드
SangIn Choung
 
Entity Framework Core
Kiran Shahi
 
React Development with the MERN Stack
Troy Miles
 
Amazon Redshift의 이해와 활용 (김용우) - AWS DB Day
Amazon Web Services Korea
 
XSS and CSRF with HTML5
Shreeraj Shah
 
Spring 3.x - Spring MVC - Advanced topics
Guy Nir
 
AWS 를 활용한 저지연 라이브 (Low Latency Live) 서비스 구현 - 류재춘 컨설턴트/에반젤리스트, GS Neot다 :: AW...
Amazon Web Services Korea
 
PCI DSSにおける認証認可 インフラ編
Nobuhiro Nakayama
 
HTML5, CSS, JavaScript Style guide and coding conventions
Knoldus Inc.
 
Amazon DynamoDB Advanced Design Pattern
Amazon Web Services Japan
 
AWS Black Belt Online Seminar 2017 Amazon S3
Amazon Web Services Japan
 
Visual Basic IDE Introduction
Ahllen Javier
 
CloudWatchの使い方
ShinsukeYokota
 

Similar to CBSecurity 3 - Secure Your ColdBox Applications (20)

PDF
Secure all things with CBSecurity 3
Ortus Solutions, Corp
 
PDF
API SECURITY
Tubagus Rizky Dharmawan
 
PDF
Securing Web Applications with Token Authentication
Stormpath
 
PPTX
Building Secure User Interfaces With JWTs (JSON Web Tokens)
Stormpath
 
PDF
Oauth Nightmares Abstract OAuth Nightmares
Nino Ho
 
PPTX
Securing Single Page Applications with Token Based Authentication
Stefan Achtsnit
 
PPTX
Building Secure User Interfaces With JWTs
robertjd
 
PPTX
How to build Simple yet powerful API.pptx
Channa Ly
 
PDF
Secured REST Microservices with Spring Cloud
Orkhan Gasimov
 
PPTX
JWT Authentication with AngularJS
robertjd
 
PPTX
Rest API Security - A quick understanding of Rest API Security
Mohammed Fazuluddin
 
PPTX
Microservices security - jpmc tech fest 2018
MOnCloud
 
PPTX
Web API Security
Stefaan
 
PPTX
IEEE WEB DOCUMENT PPT FOR EXPLANATION OF THE TOPIC
sujalmacbookm2air
 
PDF
Implementing Microservices Security Patterns & Protocols with Spring
VMware Tanzu
 
PPTX
Token Authentication for Java Applications
Stormpath
 
PDF
JavaScript App Security: Auth and Identity on the Client
Jonathan LeBlanc
 
PDF
Security enforcement of Java Microservices with Apiman & Keycloak
Charles Moulliard
 
PDF
JWT - Sécurisez vos APIs
André Tapia
 
PDF
General Method of HTTP Messages Authentication Based on Hash Functions in Web...
Denis Kolegov
 
Secure all things with CBSecurity 3
Ortus Solutions, Corp
 
Securing Web Applications with Token Authentication
Stormpath
 
Building Secure User Interfaces With JWTs (JSON Web Tokens)
Stormpath
 
Oauth Nightmares Abstract OAuth Nightmares
Nino Ho
 
Securing Single Page Applications with Token Based Authentication
Stefan Achtsnit
 
Building Secure User Interfaces With JWTs
robertjd
 
How to build Simple yet powerful API.pptx
Channa Ly
 
Secured REST Microservices with Spring Cloud
Orkhan Gasimov
 
JWT Authentication with AngularJS
robertjd
 
Rest API Security - A quick understanding of Rest API Security
Mohammed Fazuluddin
 
Microservices security - jpmc tech fest 2018
MOnCloud
 
Web API Security
Stefaan
 
IEEE WEB DOCUMENT PPT FOR EXPLANATION OF THE TOPIC
sujalmacbookm2air
 
Implementing Microservices Security Patterns & Protocols with Spring
VMware Tanzu
 
Token Authentication for Java Applications
Stormpath
 
JavaScript App Security: Auth and Identity on the Client
Jonathan LeBlanc
 
Security enforcement of Java Microservices with Apiman & Keycloak
Charles Moulliard
 
JWT - Sécurisez vos APIs
André Tapia
 
General Method of HTTP Messages Authentication Based on Hash Functions in Web...
Denis Kolegov
 
Ad

More from Ortus Solutions, Corp (20)

PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PDF
June Webinar: BoxLang-Dynamic-AWS-Lambda
Ortus Solutions, Corp
 
PDF
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
Ortus Solutions, Corp
 
PDF
What's-New-with-BoxLang-Brad Wood.pptx.pdf
Ortus Solutions, Corp
 
PDF
Getting Started with BoxLang - CFCamp 2025.pdf
Ortus Solutions, Corp
 
PDF
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
Ortus Solutions, Corp
 
PDF
What's New with BoxLang Led by Brad Wood.pdf
Ortus Solutions, Corp
 
PDF
Vector Databases and the BoxLangCFML Developer.pdf
Ortus Solutions, Corp
 
PDF
Using cbSSO in a ColdBox App Led by Jacob Beers.pdf
Ortus Solutions, Corp
 
PDF
Use JSON to Slash Your Database Performance.pdf
Ortus Solutions, Corp
 
PDF
Portable CI wGitLab and Github led by Gavin Pickin.pdf
Ortus Solutions, Corp
 
PDF
Tame the Mesh An intro to cross-platform tracing and troubleshooting.pdf
Ortus Solutions, Corp
 
PDF
Supercharging CommandBox with Let's Encrypt.pdf
Ortus Solutions, Corp
 
PDF
Spice up your site with cool animations using GSAP..pdf
Ortus Solutions, Corp
 
PDF
Passkeys and cbSecurity Led by Eric Peterson.pdf
Ortus Solutions, Corp
 
PDF
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
Ortus Solutions, Corp
 
PDF
Integrating the OpenAI API in Your Coldfusion Apps.pdf
Ortus Solutions, Corp
 
PDF
Hidden Gems in FusionReactor for BoxLang, ACF, and Lucee Users.pdf
Ortus Solutions, Corp
 
PDF
Geting-started with BoxLang Led By Raymon Camden.pdf
Ortus Solutions, Corp
 
PDF
From Zero to CRUD with ORM - Led by Annette Liskey.pdf
Ortus Solutions, Corp
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
June Webinar: BoxLang-Dynamic-AWS-Lambda
Ortus Solutions, Corp
 
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
Ortus Solutions, Corp
 
What's-New-with-BoxLang-Brad Wood.pptx.pdf
Ortus Solutions, Corp
 
Getting Started with BoxLang - CFCamp 2025.pdf
Ortus Solutions, Corp
 
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
Ortus Solutions, Corp
 
What's New with BoxLang Led by Brad Wood.pdf
Ortus Solutions, Corp
 
Vector Databases and the BoxLangCFML Developer.pdf
Ortus Solutions, Corp
 
Using cbSSO in a ColdBox App Led by Jacob Beers.pdf
Ortus Solutions, Corp
 
Use JSON to Slash Your Database Performance.pdf
Ortus Solutions, Corp
 
Portable CI wGitLab and Github led by Gavin Pickin.pdf
Ortus Solutions, Corp
 
Tame the Mesh An intro to cross-platform tracing and troubleshooting.pdf
Ortus Solutions, Corp
 
Supercharging CommandBox with Let's Encrypt.pdf
Ortus Solutions, Corp
 
Spice up your site with cool animations using GSAP..pdf
Ortus Solutions, Corp
 
Passkeys and cbSecurity Led by Eric Peterson.pdf
Ortus Solutions, Corp
 
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
Ortus Solutions, Corp
 
Integrating the OpenAI API in Your Coldfusion Apps.pdf
Ortus Solutions, Corp
 
Hidden Gems in FusionReactor for BoxLang, ACF, and Lucee Users.pdf
Ortus Solutions, Corp
 
Geting-started with BoxLang Led By Raymon Camden.pdf
Ortus Solutions, Corp
 
From Zero to CRUD with ORM - Led by Annette Liskey.pdf
Ortus Solutions, Corp
 
Ad

Recently uploaded (20)

PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 

CBSecurity 3 - Secure Your ColdBox Applications