SlideShare a Scribd company logo
Adding Identity Management and Access Control to your App
Identity Manager
2
Identity Manager
3
Account
OAuth 2.0
4
OAuth 2.0
Login with
OAuth 2.0
▪ Mechanism to provide applications access to restricted resources
without sharing credentials.
• Applications use access tokens, issued by OAuth providers (e.g.
FIWARE), to access resources.
• OAuth 2.0 specification is designed for use with HTTP.
▪ Roles:
• Resource Owner: Entity capable of granting access to a protected
resource (e.g. end-user)
• Resource Server: Server hosting protected resources.
• Client: Application making protected resource requests on behalf of
the resource owner.
• Authorization Server: The server issuing access tokens to the client.
OAuth 2.0 Architecture
Authorization Code Grant
OAuth Provider
account.lab.fiware.org
Using OAuth2
Authorization Code Grant
Using OAuth2
Authorization Code Grant
Using OAuth2
Authorization Code Grant
Using OAuth2
Authorization Code Grant
OAuth 2.0 Architecture
Implicit Grant
OAuth Provider
account.lab.fiware.org
OAuth 2.0 Architecture
Resource Owner Password Credentials Grant
OAuth Provider
account.lab.fiware.org
OAuth 2.0 Architecture
Resource Owner Password Credentials Grant
OAuth Provider
account.lab.fiware.org
OAuth 2.0 Libraries
▪ http://oauth.net/2/
• PHP, Cocoa, iOS, Java, Ruby, Javascript, Python.
▪ Example using Node.js
• https://github.com/ging/oauth2-example-client
15
OAuth2 credentials in FIWARE Account
Getting protected user info
17
Web App Account
OAuth2 requests flow
access-token
OAuthLibrary
Request user info using access-token
GET /user?access_token={token}
Web Applications and GEs
18
Generic Enabler
Account
Request+
access-token
Oauth2 flows
access-token
OK + user info (roles)
Web App OAuthLibrary
access_token
GET https://GE_URL HTTP/1.1
Host: GE_hostname
X-Auth-Token: access_token
Securing your back-end
19
Back-end
Apps
Account
Request+
access-token
Web App OauthLibrary
PEP Proxy
access-token
OK + user info (roles)
Oauth2 flows
access_token
GET https://PEP_PROXY HTTP/1.1
Host: PEP_PROXY_hostname
X-Auth-Token: access_token
PEP Proxy in FIWARE Lab Account
Securing your back-end
▪ Level 1: Authentication
• Check if a user has a FIWARE account
▪ Level 2: Basic Authorization
• Checks if a user has permissions to access a resource
• HTTP verb + resource path
▪ Level 3: Advanced Authorization
• Custom XACML policies
Level 1: Authentication
22
Back-end
Apps
Account
Request+
access-token
Web App OauthLibrary
PEP Proxy
access-token
OK + user info (roles)
Oauth2 flows
access_token
Level 2: Basic Authorization
23
Back-end
Apps
Account
Request+
access-token
Web App OauthLibrary
PEP Proxy
access-token
OK + user info
Oauth2 flows
access_token
Authz PDP
GE
XACML <Request>:
roles + verb + path
OK
Basic RBAC policies in
XACML
(simple role permissions)
Level 2: Basic Authorization
Level 3: Advanced Authorization
25
Back-end
Apps
Account
Request+
access-token
Web App OauthLibrary
PEP Proxy extension
Oauth2 flows
access_token
Auth PDP
GE
access-token
OK + user info
XACML <Request>:
roles + verb + path
OK
More generic ABAC
policies in XACML
(custom XACML Rules)
Level 3: Advanced Authorization
IoT Authentication
▪ Context Broker
• IoT Management
• Publish / subscribe model
□ Context producers
□ Context consumers
▪Sensors Authentication
• Sensor registration in IdM applications
• Each sensor has its own account
□ Token creation and validation
IoT Authentication
28
Context Broker
Account
OK + user info (roles)
Context
Producer /
Consumer
access-token
update / query
Token creation
IoT Sensors in FIWARE Account
Security GEs
▪ Identity Management – Keyrock
▪ Authorization PDP – AuthZForce
▪ PEP Proxy - Wilma
Security GEs – IdM - KeyRock
▪ Keystone + Horizon +Extensions
▪ APIs
• OAuth2
• Keystone v3
• SCIM 2.0
▪ Source Code
• https://github.com/ging/fi-ware-idm
▪ Documentation
• http://catalogue.fiware.org/enablers/identity-management-keyrock
▪ FIWARE OAuth2 Demo:
• https://github.com/ging/oauth2-example-client
31
Security GEs – PEP Proxy - Wilma
▪ Policy Enforcement Point
▪ Compatible with OAuth2 and Keystone tokens
▪ Source code:
• https://github.com/ging/fi-ware-pep-proxy
▪ Documentation
• http://catalogue.fiware.org/enablers/pep-proxy-wilma
▪ Global instance
32
Security GEs – Authorization PDP – AuthZForce (1/2)
▪ Single Open Spec (Authorization PDP GE) & Open Source
implementation (GEri Authzforce) of 100% XACML-3.0 standard-
compliant and cloud-ready RESTful ABAC framework with XML
optimization
▪ Multi-tenant REST API for PDP(s)/PAP(s)
▪ Standards:
• OASIS: XACML 3.0 + Profiles (REST, RBAC, Multiple Decision)
• ISO: Fast Infoset
▪ Extensible: attribute providers (PIP), functions, etc.
▪ PDP clustering
33
By 2020, the majority of enterprises will use ABAC as the dominant mechanism
to protect critical assets, up from less than five percent today. (Gartner, 2013)
IBAC
ABAC
RBAC
Security GEs – Authorization PDP – AuthZForce (2/2)
▪ FIWARE catalogue: https://catalogue.fiware.org/enablers/authorization-pdp-authzforce
▪ FIWARE Lab image: authzforce-5.4.1
▪ Authorization PDP GE’s APIary: http://docs.authorizationpdp.apiary.io/#
▪ AuthzForce (GEri) source code:
• API spec in WADL: https://github.com/authzforce/rest-api-model
• Implementation: https://github.com/authzforce/server/
▪ AuthzForce distribution
• Ubuntu/Debian-like: .deb / others: .tar.gz on Maven Central:
http://central.maven.org/maven2/org/ow2/authzforce/authzforce-ce-server-dist/
• Docker: https://hub.docker.com/r/fiware/authzforce-ce-server/
▪ Global instance for testing: https://az.lab.fiware.org/authzforce-ce/
▪ Documentation: http://catalogue.fi-ware.org/enablers/access-control-tha-implementation/documentation
34
Thank you!
http://fiware.org
Follow @FIWARE on Twitter
RBAC vs. ABAC
▪ Role explosion example:
• Roles in a bank: Teller, Supervisor, Branch director
• Many bank agencies: Paris, London, Berlin
• What about Teller in Paris, Teller in London, Teller in Berlin, Supervisor in Paris,
Supervisor in London…? → 9 roles!
▪ RBAC ☹ / ABAC ☺: Doctor-patient and patient-record relationships
• Doctor may only access medical records of his/her own patients
If resource.type = ‘MEDICAL_RECORD’
AND action.id in {‘read’,’write’}
AND user.id = medical_record.doctor_id, then Permit
• A patient may only access medical records about him/herself
If resource.type = ‘MEDICAL_RECORD’
AND action.id =‘read’
AND user.id = medical_record.patient_id, then Permit
▪ RBAC ☹ / ABAC ☺: Dynamic separation of duties
• User may approve purchase order only if not assigned to him/herself (approver ≠
assignee)
• ABAC-style (deny unless permit):
If resource.type = ‘PURCHASE_ORDER’
AND action.id = ‘approve’
AND user.id ≠ purchase_order.assignee, then Permit
XACML Policy Language
XACML Request
XACML Request
….
Category subject
Category x Attribute Y
Attribute Type
(string, date, integer, …)
Category resource
Category action
Attribute
Y
Attribute Value
(romain, 1970-01-01,
…)
Attribute ID
(subject-id, subject-role,
…)
Category n
XACML v3.0 vs. v2.0: upgrade!
▪ More advanced and flexible Target matching capabilities
▪ Custom attribute categories (limited to Resource, Action,
Environment and a few Subject categories in v2.0)
▪ Dynamic Obligations using variables evaluated at runtime (limited to
static values in v2.0) from request context after possible
transformations by XACML functions
▪ Obligations in Rules (limited to Policies and PolicySets in v2.0)
FIWARE ABAC Architecture

More Related Content

What's hot (20)

PDF
Keycloak Single Sign-On
Ravi Yasas
 
PPTX
Secure your app with keycloak
Guy Marom
 
PDF
Super simple application security with Apache Shiro
Marakana Inc.
 
PDF
How to authenticate users in your apps using FI-WARE Account - Introduction
Javier Cerviño
 
PPTX
Single-Page-Application & REST security
Igor Bossenko
 
PPTX
ApacheCon 2014: Infinite Session Clustering with Apache Shiro & Cassandra
DataStax Academy
 
PPTX
Enabling Cloud Native Security with OAuth2 and Multi-Tenant UAA
Will Tran
 
PDF
Stateless Auth using OAuth2 & JWT
Gaurav Roy
 
PDF
Spring security oauth2
axykim00
 
PPTX
Intro to Apache Shiro
Claire Hunsaker
 
PDF
Attacking and Defending Kubernetes - Nithin Jois
OWASP Hacker Thursday
 
PDF
The Ultimate Guide to Mobile API Security
Stormpath
 
PDF
DEF CON 24 - workshop - Craig Young - brainwashing embedded systems
Felipe Prado
 
PPT
OAuth2 Protocol with Grails Spring Security
NexThoughts Technologies
 
PPTX
An Introduction to OAuth2
Aaron Parecki
 
PPTX
Securing RESTful APIs using OAuth 2 and OpenID Connect
Jonathan LeBlanc
 
PPTX
D@W REST security
Gaurav Sharma
 
PPTX
API Security & Federation Patterns - Francois Lascelles, Chief Architect, Lay...
CA API Management
 
PDF
Securing REST APIs
Claire Hunsaker
 
PDF
Modern Security with OAuth 2.0 and JWT and Spring by Dmitry Buzdin
Java User Group Latvia
 
Keycloak Single Sign-On
Ravi Yasas
 
Secure your app with keycloak
Guy Marom
 
Super simple application security with Apache Shiro
Marakana Inc.
 
How to authenticate users in your apps using FI-WARE Account - Introduction
Javier Cerviño
 
Single-Page-Application & REST security
Igor Bossenko
 
ApacheCon 2014: Infinite Session Clustering with Apache Shiro & Cassandra
DataStax Academy
 
Enabling Cloud Native Security with OAuth2 and Multi-Tenant UAA
Will Tran
 
Stateless Auth using OAuth2 & JWT
Gaurav Roy
 
Spring security oauth2
axykim00
 
Intro to Apache Shiro
Claire Hunsaker
 
Attacking and Defending Kubernetes - Nithin Jois
OWASP Hacker Thursday
 
The Ultimate Guide to Mobile API Security
Stormpath
 
DEF CON 24 - workshop - Craig Young - brainwashing embedded systems
Felipe Prado
 
OAuth2 Protocol with Grails Spring Security
NexThoughts Technologies
 
An Introduction to OAuth2
Aaron Parecki
 
Securing RESTful APIs using OAuth 2 and OpenID Connect
Jonathan LeBlanc
 
D@W REST security
Gaurav Sharma
 
API Security & Federation Patterns - Francois Lascelles, Chief Architect, Lay...
CA API Management
 
Securing REST APIs
Claire Hunsaker
 
Modern Security with OAuth 2.0 and JWT and Spring by Dmitry Buzdin
Java User Group Latvia
 

Similar to Adding Identity Management and Access Control to your App (20)

PDF
FIWARE Global Summit - Adding Identity Management, Access Control and API Man...
FIWARE
 
PDF
FIWARE Tech Summit - Complete Framework for Identity, Access Control and API ...
FIWARE
 
PPTX
Web API 2 Token Based Authentication
jeremysbrown
 
PPTX
Adding Identity Management and Access Control to your Application
Fernando Lopez Aguilar
 
PDF
FIWARE Training: Identity Management and Access Control
FIWARE
 
PDF
FIWARE Identity Management and Access Control
FIWARE
 
PDF
Keeping Pace with OAuth’s Evolving Security Practices.pdf
Sirris
 
PPTX
OAuth - Don’t Throw the Baby Out with the Bathwater
Apigee | Google Cloud
 
PPT
Oauth2.0
Yasmine Gaber
 
PPTX
Api security
teodorcotruta
 
PPTX
Adding Identity Management and Access Control to your Application - Exersices
Álvaro Alonso González
 
PPTX
Id fiware upm-dit
Joaquín Salvachúa
 
PDF
Application Security in ASP.NET Core
NETUserGroupBern
 
PDF
Mobile Authentication - Onboarding, best practices & anti-patterns
Pieter Ennes
 
PPTX
Externalized Spring Boot App Configuration
Haufe-Lexware GmbH & Co KG
 
PDF
AllTheTalks.Online 2020: "Basics of OAuth 2.0 and OpenID Connect"
Andreas Falk
 
PDF
Understanding Identity in the World of Web APIs – Ronnie Mitra, API Architec...
CA API Management
 
PDF
2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core
Vladimir Bychkov
 
PDF
Introduction to OAuth
Wei-Tsung Su
 
KEY
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Atlassian
 
FIWARE Global Summit - Adding Identity Management, Access Control and API Man...
FIWARE
 
FIWARE Tech Summit - Complete Framework for Identity, Access Control and API ...
FIWARE
 
Web API 2 Token Based Authentication
jeremysbrown
 
Adding Identity Management and Access Control to your Application
Fernando Lopez Aguilar
 
FIWARE Training: Identity Management and Access Control
FIWARE
 
FIWARE Identity Management and Access Control
FIWARE
 
Keeping Pace with OAuth’s Evolving Security Practices.pdf
Sirris
 
OAuth - Don’t Throw the Baby Out with the Bathwater
Apigee | Google Cloud
 
Oauth2.0
Yasmine Gaber
 
Api security
teodorcotruta
 
Adding Identity Management and Access Control to your Application - Exersices
Álvaro Alonso González
 
Id fiware upm-dit
Joaquín Salvachúa
 
Application Security in ASP.NET Core
NETUserGroupBern
 
Mobile Authentication - Onboarding, best practices & anti-patterns
Pieter Ennes
 
Externalized Spring Boot App Configuration
Haufe-Lexware GmbH & Co KG
 
AllTheTalks.Online 2020: "Basics of OAuth 2.0 and OpenID Connect"
Andreas Falk
 
Understanding Identity in the World of Web APIs – Ronnie Mitra, API Architec...
CA API Management
 
2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core
Vladimir Bychkov
 
Introduction to OAuth
Wei-Tsung Su
 
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Atlassian
 
Ad

More from FIWARE (20)

PPTX
Behm_Herne_NeMo_akt.pptx
FIWARE
 
PDF
Katharina Hogrebe Herne Digital Days.pdf
FIWARE
 
PPTX
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
FIWARE
 
PPTX
Behm_Herne_NeMo.pptx
FIWARE
 
PPTX
Evangelists + iHubs Promo Slides.pptx
FIWARE
 
PPTX
Lukas Künzel Smart City Operating System.pptx
FIWARE
 
PPTX
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
FIWARE
 
PPTX
Dennis Wendland_The i4Trust Collaboration Programme.pptx
FIWARE
 
PPTX
Ulrich Ahle_FIWARE.pptx
FIWARE
 
PPTX
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
FIWARE
 
PDF
Water Quality - Lukas Kuenzel.pdf
FIWARE
 
PPTX
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
FIWARE
 
PPTX
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
FIWARE
 
PPTX
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
FIWARE
 
PPTX
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
FIWARE
 
PDF
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
FIWARE
 
PDF
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FIWARE
 
PPTX
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
FIWARE
 
PPTX
WE_LoRaWAN _ IoT.pptx
FIWARE
 
PPTX
EU Opp_Clara Pezuela - German chapter.pptx
FIWARE
 
Behm_Herne_NeMo_akt.pptx
FIWARE
 
Katharina Hogrebe Herne Digital Days.pdf
FIWARE
 
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
FIWARE
 
Behm_Herne_NeMo.pptx
FIWARE
 
Evangelists + iHubs Promo Slides.pptx
FIWARE
 
Lukas Künzel Smart City Operating System.pptx
FIWARE
 
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
FIWARE
 
Dennis Wendland_The i4Trust Collaboration Programme.pptx
FIWARE
 
Ulrich Ahle_FIWARE.pptx
FIWARE
 
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
FIWARE
 
Water Quality - Lukas Kuenzel.pdf
FIWARE
 
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
FIWARE
 
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
FIWARE
 
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
FIWARE
 
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
FIWARE
 
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
FIWARE
 
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FIWARE
 
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
FIWARE
 
WE_LoRaWAN _ IoT.pptx
FIWARE
 
EU Opp_Clara Pezuela - German chapter.pptx
FIWARE
 
Ad

Recently uploaded (20)

PPTX
ZARA-Case.pptx djdkkdjnddkdoodkdxjidjdnhdjjdjx
RonnelPineda2
 
PPTX
Optimization_Techniques_ML_Presentation.pptx
farispalayi
 
PDF
Pas45789-Energs-Efficient-Craigg1ing.pdf
lafinedelcinghiale
 
PPT
Computer Securityyyyyyyy - Chapter 1.ppt
SolomonSB
 
PPT
Agilent Optoelectronic Solutions for Mobile Application
andreashenniger2
 
PDF
Azure_DevOps introduction for CI/CD and Agile
henrymails
 
PDF
DevOps Design for different deployment options
henrymails
 
PPTX
ipv6 very very very very vvoverview.pptx
eyala75
 
PPTX
Random Presentation By Fuhran Khalil uio
maniieiish
 
PPT
Computer Securityyyyyyyy - Chapter 2.ppt
SolomonSB
 
PPTX
一比一原版(LaTech毕业证)路易斯安那理工大学毕业证如何办理
Taqyea
 
PPTX
原版西班牙莱昂大学毕业证(León毕业证书)如何办理
Taqyea
 
PDF
𝐁𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓
hokimamad0
 
PPT
introductio to computers by arthur janry
RamananMuthukrishnan
 
PPTX
西班牙武康大学毕业证书{UCAMOfferUCAM成绩单水印}原版制作
Taqyea
 
PDF
AI_MOD_1.pdf artificial intelligence notes
shreyarrce
 
PDF
Apple_Environmental_Progress_Report_2025.pdf
yiukwong
 
PDF
Web Hosting for Shopify WooCommerce etc.
Harry_Phoneix Harry_Phoneix
 
PPTX
Template Timeplan & Roadmap Product.pptx
ImeldaYulistya
 
PDF
Digital Security in 2025 with Adut Angelina
The ClarityDesk
 
ZARA-Case.pptx djdkkdjnddkdoodkdxjidjdnhdjjdjx
RonnelPineda2
 
Optimization_Techniques_ML_Presentation.pptx
farispalayi
 
Pas45789-Energs-Efficient-Craigg1ing.pdf
lafinedelcinghiale
 
Computer Securityyyyyyyy - Chapter 1.ppt
SolomonSB
 
Agilent Optoelectronic Solutions for Mobile Application
andreashenniger2
 
Azure_DevOps introduction for CI/CD and Agile
henrymails
 
DevOps Design for different deployment options
henrymails
 
ipv6 very very very very vvoverview.pptx
eyala75
 
Random Presentation By Fuhran Khalil uio
maniieiish
 
Computer Securityyyyyyyy - Chapter 2.ppt
SolomonSB
 
一比一原版(LaTech毕业证)路易斯安那理工大学毕业证如何办理
Taqyea
 
原版西班牙莱昂大学毕业证(León毕业证书)如何办理
Taqyea
 
𝐁𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓
hokimamad0
 
introductio to computers by arthur janry
RamananMuthukrishnan
 
西班牙武康大学毕业证书{UCAMOfferUCAM成绩单水印}原版制作
Taqyea
 
AI_MOD_1.pdf artificial intelligence notes
shreyarrce
 
Apple_Environmental_Progress_Report_2025.pdf
yiukwong
 
Web Hosting for Shopify WooCommerce etc.
Harry_Phoneix Harry_Phoneix
 
Template Timeplan & Roadmap Product.pptx
ImeldaYulistya
 
Digital Security in 2025 with Adut Angelina
The ClarityDesk
 

Adding Identity Management and Access Control to your App

  • 6. OAuth 2.0 ▪ Mechanism to provide applications access to restricted resources without sharing credentials. • Applications use access tokens, issued by OAuth providers (e.g. FIWARE), to access resources. • OAuth 2.0 specification is designed for use with HTTP. ▪ Roles: • Resource Owner: Entity capable of granting access to a protected resource (e.g. end-user) • Resource Server: Server hosting protected resources. • Client: Application making protected resource requests on behalf of the resource owner. • Authorization Server: The server issuing access tokens to the client.
  • 7. OAuth 2.0 Architecture Authorization Code Grant OAuth Provider account.lab.fiware.org
  • 12. OAuth 2.0 Architecture Implicit Grant OAuth Provider account.lab.fiware.org
  • 13. OAuth 2.0 Architecture Resource Owner Password Credentials Grant OAuth Provider account.lab.fiware.org
  • 14. OAuth 2.0 Architecture Resource Owner Password Credentials Grant OAuth Provider account.lab.fiware.org
  • 15. OAuth 2.0 Libraries ▪ http://oauth.net/2/ • PHP, Cocoa, iOS, Java, Ruby, Javascript, Python. ▪ Example using Node.js • https://github.com/ging/oauth2-example-client 15
  • 16. OAuth2 credentials in FIWARE Account
  • 17. Getting protected user info 17 Web App Account OAuth2 requests flow access-token OAuthLibrary Request user info using access-token GET /user?access_token={token}
  • 18. Web Applications and GEs 18 Generic Enabler Account Request+ access-token Oauth2 flows access-token OK + user info (roles) Web App OAuthLibrary access_token GET https://GE_URL HTTP/1.1 Host: GE_hostname X-Auth-Token: access_token
  • 19. Securing your back-end 19 Back-end Apps Account Request+ access-token Web App OauthLibrary PEP Proxy access-token OK + user info (roles) Oauth2 flows access_token GET https://PEP_PROXY HTTP/1.1 Host: PEP_PROXY_hostname X-Auth-Token: access_token
  • 20. PEP Proxy in FIWARE Lab Account
  • 21. Securing your back-end ▪ Level 1: Authentication • Check if a user has a FIWARE account ▪ Level 2: Basic Authorization • Checks if a user has permissions to access a resource • HTTP verb + resource path ▪ Level 3: Advanced Authorization • Custom XACML policies
  • 22. Level 1: Authentication 22 Back-end Apps Account Request+ access-token Web App OauthLibrary PEP Proxy access-token OK + user info (roles) Oauth2 flows access_token
  • 23. Level 2: Basic Authorization 23 Back-end Apps Account Request+ access-token Web App OauthLibrary PEP Proxy access-token OK + user info Oauth2 flows access_token Authz PDP GE XACML <Request>: roles + verb + path OK Basic RBAC policies in XACML (simple role permissions)
  • 24. Level 2: Basic Authorization
  • 25. Level 3: Advanced Authorization 25 Back-end Apps Account Request+ access-token Web App OauthLibrary PEP Proxy extension Oauth2 flows access_token Auth PDP GE access-token OK + user info XACML <Request>: roles + verb + path OK More generic ABAC policies in XACML (custom XACML Rules)
  • 26. Level 3: Advanced Authorization
  • 27. IoT Authentication ▪ Context Broker • IoT Management • Publish / subscribe model □ Context producers □ Context consumers ▪Sensors Authentication • Sensor registration in IdM applications • Each sensor has its own account □ Token creation and validation
  • 28. IoT Authentication 28 Context Broker Account OK + user info (roles) Context Producer / Consumer access-token update / query Token creation
  • 29. IoT Sensors in FIWARE Account
  • 30. Security GEs ▪ Identity Management – Keyrock ▪ Authorization PDP – AuthZForce ▪ PEP Proxy - Wilma
  • 31. Security GEs – IdM - KeyRock ▪ Keystone + Horizon +Extensions ▪ APIs • OAuth2 • Keystone v3 • SCIM 2.0 ▪ Source Code • https://github.com/ging/fi-ware-idm ▪ Documentation • http://catalogue.fiware.org/enablers/identity-management-keyrock ▪ FIWARE OAuth2 Demo: • https://github.com/ging/oauth2-example-client 31
  • 32. Security GEs – PEP Proxy - Wilma ▪ Policy Enforcement Point ▪ Compatible with OAuth2 and Keystone tokens ▪ Source code: • https://github.com/ging/fi-ware-pep-proxy ▪ Documentation • http://catalogue.fiware.org/enablers/pep-proxy-wilma ▪ Global instance 32
  • 33. Security GEs – Authorization PDP – AuthZForce (1/2) ▪ Single Open Spec (Authorization PDP GE) & Open Source implementation (GEri Authzforce) of 100% XACML-3.0 standard- compliant and cloud-ready RESTful ABAC framework with XML optimization ▪ Multi-tenant REST API for PDP(s)/PAP(s) ▪ Standards: • OASIS: XACML 3.0 + Profiles (REST, RBAC, Multiple Decision) • ISO: Fast Infoset ▪ Extensible: attribute providers (PIP), functions, etc. ▪ PDP clustering 33 By 2020, the majority of enterprises will use ABAC as the dominant mechanism to protect critical assets, up from less than five percent today. (Gartner, 2013) IBAC ABAC RBAC
  • 34. Security GEs – Authorization PDP – AuthZForce (2/2) ▪ FIWARE catalogue: https://catalogue.fiware.org/enablers/authorization-pdp-authzforce ▪ FIWARE Lab image: authzforce-5.4.1 ▪ Authorization PDP GE’s APIary: http://docs.authorizationpdp.apiary.io/# ▪ AuthzForce (GEri) source code: • API spec in WADL: https://github.com/authzforce/rest-api-model • Implementation: https://github.com/authzforce/server/ ▪ AuthzForce distribution • Ubuntu/Debian-like: .deb / others: .tar.gz on Maven Central: http://central.maven.org/maven2/org/ow2/authzforce/authzforce-ce-server-dist/ • Docker: https://hub.docker.com/r/fiware/authzforce-ce-server/ ▪ Global instance for testing: https://az.lab.fiware.org/authzforce-ce/ ▪ Documentation: http://catalogue.fi-ware.org/enablers/access-control-tha-implementation/documentation 34
  • 36. RBAC vs. ABAC ▪ Role explosion example: • Roles in a bank: Teller, Supervisor, Branch director • Many bank agencies: Paris, London, Berlin • What about Teller in Paris, Teller in London, Teller in Berlin, Supervisor in Paris, Supervisor in London…? → 9 roles! ▪ RBAC ☹ / ABAC ☺: Doctor-patient and patient-record relationships • Doctor may only access medical records of his/her own patients If resource.type = ‘MEDICAL_RECORD’ AND action.id in {‘read’,’write’} AND user.id = medical_record.doctor_id, then Permit • A patient may only access medical records about him/herself If resource.type = ‘MEDICAL_RECORD’ AND action.id =‘read’ AND user.id = medical_record.patient_id, then Permit ▪ RBAC ☹ / ABAC ☺: Dynamic separation of duties • User may approve purchase order only if not assigned to him/herself (approver ≠ assignee) • ABAC-style (deny unless permit): If resource.type = ‘PURCHASE_ORDER’ AND action.id = ‘approve’ AND user.id ≠ purchase_order.assignee, then Permit
  • 38. XACML Request XACML Request …. Category subject Category x Attribute Y Attribute Type (string, date, integer, …) Category resource Category action Attribute Y Attribute Value (romain, 1970-01-01, …) Attribute ID (subject-id, subject-role, …) Category n
  • 39. XACML v3.0 vs. v2.0: upgrade! ▪ More advanced and flexible Target matching capabilities ▪ Custom attribute categories (limited to Resource, Action, Environment and a few Subject categories in v2.0) ▪ Dynamic Obligations using variables evaluated at runtime (limited to static values in v2.0) from request context after possible transformations by XACML functions ▪ Obligations in Rules (limited to Policies and PolicySets in v2.0)