SlideShare a Scribd company logo
Securing the Unsecured Using SSO
and XACML to Protect Web Apps
App Manager 1.0 .0
Dinusha Senanayaka
WSO2 App Manager Team
Why App Manager ?
2
100% Open Source,
under Apache 2
License
Policy-based
Authorization
Insights into App
Subscriptions &
Behaviors
Single-Sign-On (SSO)
across Web AppsUnified App Store
Central App
Management
(web & mobile)
Access Control based
on Organizational
User Roles
Leverages on proven components of WSO2:
- Analytics Platform - App Usage Statistics
- Security offering - Authentication, Authorization,
Federated Identity and SSO
- Enterprise Store - App Provisioning & Management
WSO2 App Manager Components
3
Single Sign-On between Web Apps
Pros for End User
◉ Do not have to memorize long list of passwords to access multiple applications
Pros for Application developers
◉ Do not have to worry about implementing security for Web Apps
◉ Can focus only developing Application business logic
Pros for Administrators
◉ Do not have to manage multiple user accounts for different applications
4
SAML2 Web Browser based SSO Profile
5
Single Logout between Web Apps
6
Demo
7
Two Type of Web Apps
◉ Non-secured web apps
◉ Already secured web apps
How to manage with App Manager ?
8
Secure Non-secured Web Apps Using
App Manager
◉ Just publish the web app in App Manager
9
Already secured Web Apps through
App Manager
◉ Need some modifications to be done on web App
◉ Could use JWT token or SAML response to identify the user
inside web app
10
JWT and SAML Token Headers
◉ Ways of sending authenticated user details to the backend
◉ Web app could either process JWT (Json) header or SAML Response (XML) header
to get user details
11
JWT/ SAML Response
{
"iss": "wso2.org/products/am",
"exp": 1435218328463,
"Subject": "beth@wso2.com",
"http://wso2.org/claims/card_holder": "beth",
"http://wso2.org/claims/card_number": "45678563456986",
"http://wso2.org/claims/emailaddress": "beth@wso2.com",
"http://wso2.org/claims/expiration_date": "2020-12-20",
"http://wso2.org/claims/givenname": "Beth",
"http://wso2.org/claims/lastname": "Carder",
"http://wso2.org/claims/organization": "WSO2",
"http://wso2.org/claims/role": "Internal/private_beth-AT-wso2.
com,Internal/subscriber,Internal/store-admin,
Internal/everyone,SALES",
"http://wso2.org/claims/streetaddress": "Califonia",
"http://wso2.org/claims/telephone": "877 309 2070",
"http://wso2.org/claims/zipcode": "0789",
"http://wso2.org/ffid": "34567"
}
12
JWT/ SAML Response
<?xml version="1.0" encoding="UTF-8"?>
<saml2p:Response xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" Destination="http://ec2-54-84-233-242.compute-1.amazonaws.com:8280/plan-trip/1.0.0/" ID="
aipcfpjgmlffcbhcdnapgkdncjdcjdbkalkmejpe" InResponseTo="0" IssueInstant="2015-06-25T07:30:28.203Z" Version="2.0">
<saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">appm</saml2:Issuer>
<saml2p:Status>
<saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
</saml2p:Status>
<saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" ID="ifghfahaljakniomfjeelcknnpaopmjbagonchak" IssueInstant="2015-06-25T07:30:28.203Z"
Version="2.0">
<saml2:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">appm</saml2:Issuer>
<saml2:Subject>
<saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">beth@wso2.com</saml2:NameID>
<saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<saml2:SubjectConfirmationData InResponseTo="0" NotOnOrAfter="2015-06-25T07:35:28.203Z" Recipient="http://ec2-54-84-233-242.compute-1.amazonaws.
com:8280/plan-trip/1.0.0/"/>
</saml2:SubjectConfirmation>
</saml2:Subject>
<saml2:Conditions NotBefore="2015-06-25T07:30:28.203Z" NotOnOrAfter="2015-06-25T07:35:28.203Z">
<saml2:AudienceRestriction>
<saml2:Audience>PlanYourTrip-1.0.0</saml2:Audience>
</saml2:AudienceRestriction>
</saml2:Conditions>
<saml2:AuthnStatement AuthnInstant="2015-06-25T07:30:28.203Z" SessionIndex="550a41fc-ba6a-4dff-bc58-7ec11ed6d0d3">
<saml2:AuthnContext>
<saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml2:AuthnContextClassRef>
</saml2:AuthnContext>
</saml2:AuthnStatement>
<saml2:AttributeStatement>
<saml2:Attribute Name="http://wso2.org/claims/role" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string"
>Internal/private_beth-AT-wso2.com,Internal/subscriber,Internal/store-admin,Internal/everyone,SALES</saml2:AttributeValue>
</saml2:Attribute>
</saml2:AttributeStatement>
</saml2:Assertion>
</saml2p:Response>
13
Sample Code Snippet to Identify User
from JWT Header
var header = request.getHeader("X-JWT-Assertion");
// Create Base64 Object
var Base64 = require('../modules/base64.js');
if(header !=null){
var jwtAssertions = header.split("."); //JWT header by default contains three '.' separated sections
var jsonString = Base64.decode(jwtAssertions[1]);
jsonString = jsonString.replace("http://wso2.org/claims/emailaddress", "email");
jsonString = jsonString.replace("http://wso2.org/claims/role", "roles");
var obj = parse(jsonString);
var email = obj.email;
var roles = obj.roles;
if (roles.indexOf("admin") != -1) {
session.put("user",{"mail":email,"admin":true});
} else {
session.put("user",{"mail":email,"admin":false});
}
}
var user = session.get("user");
if(user==null){
response.sendRedirect(baseAt+"/login.jag");
}else if(user.admin){
}
14
Federated Authentication for Web
Apps
15
◉ Authentication : SAML2 SSO
◉ Authorization: ?
16
XACML : eXtensible Access Control
Markup Language
XACML Reference Architecture
17
How App Manager Enforce XACML
Evaluation for Web Apps ?
18
XACML Policy Editor in App Manager
19
Demo
20
Summary
◉ How App Manager provides security (SSO) for Web Apps
◉ Non secured web apps
◉ Already secured web apps
◉ Federated Authentication for web apps using App Manager
◉ Fine grained authorization to web app resources using XACML
21
Contact us !

More Related Content

PPTX
Owasp web security
PPTX
Introduction to OAuth2
PPTX
A10 - Unvalidated Redirects and Forwards
PPTX
2 fa it101
PDF
Lessons Learned From Four Years of API Management Implementation Success at Unum
PDF
Token, token... From SAML to OIDC
PDF
WSO2 App Manager: Managing Application Lifecycles Across Your Enterprise
PDF
#3 Wso2 masterclassitalia - wso2 Identity Server: must-have per gestire le id...
Owasp web security
Introduction to OAuth2
A10 - Unvalidated Redirects and Forwards
2 fa it101
Lessons Learned From Four Years of API Management Implementation Success at Unum
Token, token... From SAML to OIDC
WSO2 App Manager: Managing Application Lifecycles Across Your Enterprise
#3 Wso2 masterclassitalia - wso2 Identity Server: must-have per gestire le id...

Similar to Securing the Unsecured: Using SSO and XACML to Protect Your Web Apps (20)

PPTX
Extended Security with WSO2 API Management Platform
PDF
WSO2 App Manager - Product Overview
PDF
JDD2015: Security in the era of modern applications and services - Bolesław D...
PDF
SSO with the WSO2 Identity Server
PDF
Sso with the wso2 identity server
PDF
API Security In Cloud Native Era
PDF
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
PPTX
WSO2Con USA 2017: Building a Secure Enterprise
PPTX
WSO2Con 2025 - Building Secure Customer Experience Apps
PDF
WSO2 Identity Server - Product Overview
PDF
Leveraging federation capabilities of identity server for api gateway
PPTX
Introduction to the WSO2 Identity Server &Contributing to an OS Project
PDF
API Security Best Practices & Guidelines
PDF
Security Patterns with WSO2 ESB
PPTX
Rest API Security - A quick understanding of Rest API Security
PPTX
Synergies across APIs and IAM
PDF
[4developers2016] - Security in the era of modern applications and services (...
PPTX
Solving Single-Sign-On
PDF
OpenSSO Tech Overview Aquarium
PDF
OAuth based reference architecture for API Management
Extended Security with WSO2 API Management Platform
WSO2 App Manager - Product Overview
JDD2015: Security in the era of modern applications and services - Bolesław D...
SSO with the WSO2 Identity Server
Sso with the wso2 identity server
API Security In Cloud Native Era
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con USA 2017: Building a Secure Enterprise
WSO2Con 2025 - Building Secure Customer Experience Apps
WSO2 Identity Server - Product Overview
Leveraging federation capabilities of identity server for api gateway
Introduction to the WSO2 Identity Server &Contributing to an OS Project
API Security Best Practices & Guidelines
Security Patterns with WSO2 ESB
Rest API Security - A quick understanding of Rest API Security
Synergies across APIs and IAM
[4developers2016] - Security in the era of modern applications and services (...
Solving Single-Sign-On
OpenSSO Tech Overview Aquarium
OAuth based reference architecture for API Management
Ad

More from WSO2 (20)

PDF
Demystifying CMS-0057-F - Compliance Made Seamless with WSO2
PDF
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
PDF
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
PDF
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
PDF
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
PDF
Platformless Modernization with Choreo.pdf
PDF
Application Modernization with Choreo for the BFSI Sector
PDF
Choreo - The AI-Native Internal Developer Platform as a Service: Overview
PDF
[Roundtable] Choreo - The AI-Native Internal Developer Platform as a Service
PPTX
WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)
PPTX
WSO2Con 2025 - Building Secure Business Customer and Partner Experience (B2B)...
PPTX
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
PPTX
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
PPTX
WSO2Con 2025 - Unified Management of Ingress and Egress Across Multiple API G...
PPTX
WSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on Code
PPTX
WSO2Con 2025 - Architecting Cloud-Native Applications
PDF
Mastering Intelligent Digital Experiences with Platformless Modernization
PDF
Accelerate Enterprise Software Engineering with Platformless
PDF
architecting-ai-in-the-enterprise-apis-and-applications.pdf
PDF
Driving Innovation: Scania's API Revolution with WSO2
Demystifying CMS-0057-F - Compliance Made Seamless with WSO2
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
Platformless Modernization with Choreo.pdf
Application Modernization with Choreo for the BFSI Sector
Choreo - The AI-Native Internal Developer Platform as a Service: Overview
[Roundtable] Choreo - The AI-Native Internal Developer Platform as a Service
WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)
WSO2Con 2025 - Building Secure Business Customer and Partner Experience (B2B)...
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
WSO2Con 2025 - Unified Management of Ingress and Egress Across Multiple API G...
WSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on Code
WSO2Con 2025 - Architecting Cloud-Native Applications
Mastering Intelligent Digital Experiences with Platformless Modernization
Accelerate Enterprise Software Engineering with Platformless
architecting-ai-in-the-enterprise-apis-and-applications.pdf
Driving Innovation: Scania's API Revolution with WSO2
Ad

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Encapsulation theory and applications.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPT
Teaching material agriculture food technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
cuic standard and advanced reporting.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Spectroscopy.pptx food analysis technology
PPTX
A Presentation on Artificial Intelligence
PDF
Machine learning based COVID-19 study performance prediction
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Per capita expenditure prediction using model stacking based on satellite ima...
A comparative analysis of optical character recognition models for extracting...
Encapsulation theory and applications.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Teaching material agriculture food technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
MIND Revenue Release Quarter 2 2025 Press Release
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
The AUB Centre for AI in Media Proposal.docx
cuic standard and advanced reporting.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Review of recent advances in non-invasive hemoglobin estimation
Advanced methodologies resolving dimensionality complications for autism neur...
Spectroscopy.pptx food analysis technology
A Presentation on Artificial Intelligence
Machine learning based COVID-19 study performance prediction
Building Integrated photovoltaic BIPV_UPV.pdf
Programs and apps: productivity, graphics, security and other tools
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx

Securing the Unsecured: Using SSO and XACML to Protect Your Web Apps

  • 1. Securing the Unsecured Using SSO and XACML to Protect Web Apps App Manager 1.0 .0 Dinusha Senanayaka WSO2 App Manager Team
  • 2. Why App Manager ? 2 100% Open Source, under Apache 2 License Policy-based Authorization Insights into App Subscriptions & Behaviors Single-Sign-On (SSO) across Web AppsUnified App Store Central App Management (web & mobile) Access Control based on Organizational User Roles Leverages on proven components of WSO2: - Analytics Platform - App Usage Statistics - Security offering - Authentication, Authorization, Federated Identity and SSO - Enterprise Store - App Provisioning & Management
  • 3. WSO2 App Manager Components 3
  • 4. Single Sign-On between Web Apps Pros for End User ◉ Do not have to memorize long list of passwords to access multiple applications Pros for Application developers ◉ Do not have to worry about implementing security for Web Apps ◉ Can focus only developing Application business logic Pros for Administrators ◉ Do not have to manage multiple user accounts for different applications 4
  • 5. SAML2 Web Browser based SSO Profile 5
  • 8. Two Type of Web Apps ◉ Non-secured web apps ◉ Already secured web apps How to manage with App Manager ? 8
  • 9. Secure Non-secured Web Apps Using App Manager ◉ Just publish the web app in App Manager 9
  • 10. Already secured Web Apps through App Manager ◉ Need some modifications to be done on web App ◉ Could use JWT token or SAML response to identify the user inside web app 10
  • 11. JWT and SAML Token Headers ◉ Ways of sending authenticated user details to the backend ◉ Web app could either process JWT (Json) header or SAML Response (XML) header to get user details 11
  • 12. JWT/ SAML Response { "iss": "wso2.org/products/am", "exp": 1435218328463, "Subject": "beth@wso2.com", "http://wso2.org/claims/card_holder": "beth", "http://wso2.org/claims/card_number": "45678563456986", "http://wso2.org/claims/emailaddress": "beth@wso2.com", "http://wso2.org/claims/expiration_date": "2020-12-20", "http://wso2.org/claims/givenname": "Beth", "http://wso2.org/claims/lastname": "Carder", "http://wso2.org/claims/organization": "WSO2", "http://wso2.org/claims/role": "Internal/private_beth-AT-wso2. com,Internal/subscriber,Internal/store-admin, Internal/everyone,SALES", "http://wso2.org/claims/streetaddress": "Califonia", "http://wso2.org/claims/telephone": "877 309 2070", "http://wso2.org/claims/zipcode": "0789", "http://wso2.org/ffid": "34567" } 12
  • 13. JWT/ SAML Response <?xml version="1.0" encoding="UTF-8"?> <saml2p:Response xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" Destination="http://ec2-54-84-233-242.compute-1.amazonaws.com:8280/plan-trip/1.0.0/" ID=" aipcfpjgmlffcbhcdnapgkdncjdcjdbkalkmejpe" InResponseTo="0" IssueInstant="2015-06-25T07:30:28.203Z" Version="2.0"> <saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">appm</saml2:Issuer> <saml2p:Status> <saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/> </saml2p:Status> <saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" ID="ifghfahaljakniomfjeelcknnpaopmjbagonchak" IssueInstant="2015-06-25T07:30:28.203Z" Version="2.0"> <saml2:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">appm</saml2:Issuer> <saml2:Subject> <saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">beth@wso2.com</saml2:NameID> <saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"> <saml2:SubjectConfirmationData InResponseTo="0" NotOnOrAfter="2015-06-25T07:35:28.203Z" Recipient="http://ec2-54-84-233-242.compute-1.amazonaws. com:8280/plan-trip/1.0.0/"/> </saml2:SubjectConfirmation> </saml2:Subject> <saml2:Conditions NotBefore="2015-06-25T07:30:28.203Z" NotOnOrAfter="2015-06-25T07:35:28.203Z"> <saml2:AudienceRestriction> <saml2:Audience>PlanYourTrip-1.0.0</saml2:Audience> </saml2:AudienceRestriction> </saml2:Conditions> <saml2:AuthnStatement AuthnInstant="2015-06-25T07:30:28.203Z" SessionIndex="550a41fc-ba6a-4dff-bc58-7ec11ed6d0d3"> <saml2:AuthnContext> <saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml2:AuthnContextClassRef> </saml2:AuthnContext> </saml2:AuthnStatement> <saml2:AttributeStatement> <saml2:Attribute Name="http://wso2.org/claims/role" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"> <saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string" >Internal/private_beth-AT-wso2.com,Internal/subscriber,Internal/store-admin,Internal/everyone,SALES</saml2:AttributeValue> </saml2:Attribute> </saml2:AttributeStatement> </saml2:Assertion> </saml2p:Response> 13
  • 14. Sample Code Snippet to Identify User from JWT Header var header = request.getHeader("X-JWT-Assertion"); // Create Base64 Object var Base64 = require('../modules/base64.js'); if(header !=null){ var jwtAssertions = header.split("."); //JWT header by default contains three '.' separated sections var jsonString = Base64.decode(jwtAssertions[1]); jsonString = jsonString.replace("http://wso2.org/claims/emailaddress", "email"); jsonString = jsonString.replace("http://wso2.org/claims/role", "roles"); var obj = parse(jsonString); var email = obj.email; var roles = obj.roles; if (roles.indexOf("admin") != -1) { session.put("user",{"mail":email,"admin":true}); } else { session.put("user",{"mail":email,"admin":false}); } } var user = session.get("user"); if(user==null){ response.sendRedirect(baseAt+"/login.jag"); }else if(user.admin){ } 14
  • 16. ◉ Authentication : SAML2 SSO ◉ Authorization: ? 16
  • 17. XACML : eXtensible Access Control Markup Language XACML Reference Architecture 17
  • 18. How App Manager Enforce XACML Evaluation for Web Apps ? 18
  • 19. XACML Policy Editor in App Manager 19
  • 21. Summary ◉ How App Manager provides security (SSO) for Web Apps ◉ Non secured web apps ◉ Already secured web apps ◉ Federated Authentication for web apps using App Manager ◉ Fine grained authorization to web app resources using XACML 21