SlideShare a Scribd company logo
LEMONLDAP::NG 2.0:
MUTLI-FACTOR
AUTHENTICATION,
IDENTITY
FEDERATION,
WEBSERVICE AND API
PROTECTION
Clément OUDOT – Identity Solutions Manager
clement.oudot@worteks.com
05/11/19 2
Single Sign On
05/11/19 3
LDAPCon  Single Sign On
●
LDAPCon 2007: The FederID Project
●
LDAPCon 2011: The LemonLDAP::NG project
●
LDAPCon 2015: The OpenID Connect Protocol
●
LDAPCon 2017: Understanding main SSO protocols: CAS,
SAML and OpenID Connect
●
LDAPCon 2019: LemonLDAP::NG workshop and conference
05/11/19 4
SSO Workflow
Authentication
Portal Application
2. Authentication
1. First access
3. Send SSO Token
Trust link
4. Validate SSO token
05/11/19 5
LemonLDAP::NG Software
05/11/19 6
History
2003
2006
2010
2016
2018
Project creation
Fork – version NG
Protocols CAS, SAML
and OpenID
Version 1.0
Protocol OpenID
Connect
Second factors (2FA)
Version 2.0
05/11/19 7
Main features
●
Web Single Sign On
●
Access control
●
Applications portal
●
Authentication modules choice and chain
●
Password management, account creation
●
Multi-factor authentication (MFA)
●
Protection of Web applications and API/WebServices
●
Graphical customisation
●
Packages for Debian/Ubuntu/RHEL/CentOS
05/11/19 8
Login page
05/11/19 9
Portal with application menu
05/11/19 10
Web Administration interface
05/11/19 11
Command Line Interface
05/11/19 12
Free Software
●
License GPL
●
OW2 project
●
Forge: https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng
●
Site: https://lemonldap-ng.org
●
OW2 Community Award in 2014 and 2018
●
SSO component of FusionIAM project: https://fusioniam.org/
05/11/19 13
Component roles
Configurations Sessions
Portal
Manager Handler
Application
menu
CAS
SAML
OpenID Connect
Self Services
SOAP/REST
server
Session
management
Configurations Sessions
Notifications Second factors
Access Control SSOaaS
Web Service
Token
Custom
05/11/19 14
Web application protection with Handler
Sessions
Portal
Handler
Web Application
Authentication
Session creation
Session read
SSO cookie
HTTP headers
05/11/19 15
Multi Factor Authentication
16
Multi Factor Authentication
●
Multi-factor authentication (MFA) is a method of confirming a
user's claimed identity in which a user is granted access only
after successfully presenting 2 or more pieces of evidence (or
factors) to an authentication mechanism:
●
knowledge (something they and only they know)
●
possession (something they and only they have)
●
inherence (something they and only they are)
17
One-Time Password
●
One-Time Password (OTP) is a password that is valid for only
one login session or transaction
●
Two standards:
●
HOTP (RFC 4226): HMAC-Based One-Time Password
●
TOTP (RFC 6238): Time-Based One-Time Password
●
Rely on a secret shared between user and server
TOTP
●
Shared secret key K
●
T0: start time
●
TI: time interval
●
Time Counter TC = floor((unixtime(now) − unixtime(T0)) / TI)
●
TOTP = Truncate( SHA1(K 0x5c5c… SHA1(K 0x3636… TC))⊕ 0x5c5c… ∥ SHA1(K ⊕ 0x3636… ∥ TC))  ∥ SHA1(K ⊕ 0x3636… ∥ TC))  ⊕ 0x5c5c… ∥ SHA1(K ⊕ 0x3636… ∥ TC))  ∥ SHA1(K ⊕ 0x3636… ∥ TC)) 
) & 0x7FFFFFFF
●
TOTP Value = TOTP mod 10d, where d is the desired number
of digits of the one-time password
Using a TOTP
●
Registration on client:
shared key can be
registered manually or using
a QR code
●
Server associates shared
secret to user
●
At next authentication,
TOTP value is computed by
client and server
Universal Second Factor
●
Universal 2nd Factor (U2F) is an open authentication
standard that strengthens and simplifies two-factor
authentication using specialized USB or NFC devices.
●
Managed by FIDO Alliance https://fidoalliance.org/
Using U2F
●
Registration: Token generates
private/public keys and a
handle and send public key
and handle to server
●
The server associates the
public key and the handle to
user
●
At next authentication, server
sends the handle and a crypto
challenge and the U2F token
signs the challenge and sends
it back
[LDAPCon 2019] LemonLDAP::NG 2.0: Mutli-factor authentication, Identity Federation, WebService and API protection
[LDAPCon 2019] LemonLDAP::NG 2.0: Mutli-factor authentication, Identity Federation, WebService and API protection
24
Support in LL::NG
●
LemonLDAP::NG can use the following 2FA:
●
TOTP
●
U2F
●
TOTP or U2F
●
Mail
●
External
●
REST
●
Yubikey
05/11/19 25
Identity federation
05/11/19 26
Main features
●
LL::NG can act as client and as server
●
Attributes sharing
●
Manage authentication contexts and levels
●
Autogeneration of public/private keys
●
Access control per services
●
Publication of configuration data (metadata)
●
Multi-protocols gateway
●
Single logout
05/11/19 27
CAS
CAS client CAS server
First access
Redirection for
authentication
Service TicketService
Ticket
Service ticket validation
Access to identity
05/11/19 28
SAML
Service Provider (SP) Identity Provider (IDP)
First access
IDP choice
Authentication
request
Authentication
response
Authentication
response
Signature verification
Read assertion
05/11/19 29
OpenID Connect
Relying Party (RP) OpenID Provider (OP)
First access
OP choice
Authentication
request
JWT
JWT
Signature verification
Read JWT
Get UserInfo
05/11/19 30
API / WebService protection
05/11/19 31
How to protect a WebService
●
Global authentication:
●
HTTP Basic
●
SSL client certificate
●
User oriented authentication?
05/11/19 32
LL::NG ServiceToken Handler
●
New Handler "Service Token" installed between application
and WebService
●
Main Handler generates a token based on time session_id
and virtual hosts: cipher(time, session_id, vhost_list)
●
The token is sent by application to WebService
●
The Handler "Service Token" intercepts the token, validates it
and apply access rules, and sent HTTP headers to
WebService
05/11/19 33
LL::NG ServiceToken Handler
Sessions
Portal
Handler
Web Application
Authentication
Session creation
Session read
SSO cookie
HTTP headers
Token
Handler
Service Token
Web Service Token
HTTP headers
Session read
05/11/19 34
Using OAuth2
●
When LL::NG acts as OIDC provider, it delivers an OAuth2
access token
●
This access token can be validated with different operations:
●
Call /oauth2/userinfo, which will return user attributes
●
Call /oauth2/introspect, which will return token information
(including the token owner) – see RFC 7662
●
Use LL::NG OAuth2 Handler
05/11/19 35
LL::NG OAuth2 Handler
Sessions
Portal
Web Application
Authentication
Session creation
OIDC response
Handler
OAuth2
Web Service
Access Token
HTTP headers
Session read
ID Token
Access Token
05/11/19 36
Example – UserInfo Endpoint
$ curl -k 
-H "Authorization: Bearer a74d504ec9e784785e70a1da2b95d1d2" 
https://auth.openid.club/oauth2/userinfo | json_pp
{
  "family_name" : "OUDOT",
  "name" : "Clément OUDOT",
  "email" : "clement@oodo.net",
  "sub" : "coudot"
}
05/11/19 37
Example – Intropsection Endpoint
$ curl -k 
-H "Authorization: Basic bGVtb25sZGFwOnNlY3JldA==" 
-X POST -d "token=a74d504ec9e784785e70a1da2b95d1d2" 
https://auth.openid.club/oauth2/introspect | json_pp
{
"client_id" : "lemonldap",
"sub" : "coudot",
"exp" : 1572446485,
"active" : true,
"scope" : "openid profile address email phone"
}
05/11/19 38
Example – Oauth2 Handler
$ curl -k 
-H "Authorization: Bearer a74d504ec9e784785e70a1da2b95d1d2" 
https://oauth2.openid.club/api.pl
{
"check" : "true",
"user" : "coudot"
}
3939
THANKS FOR YOUR
ATTENTION
More informations:
info@worteks.com
@worteks_com
linkedin.com/company/worteks

More Related Content

PDF
Talk Microservices to Me: The Role of IAM in Microservice Architecture
PPTX
Bitcoin cryptography
PDF
FIPS 140-2 Validations in a Secure Enclave
PDF
Bitcoin Wallet &amp Keys
PPTX
Modern problems in backend engineering, Siim Kaspar Uustalu
PPTX
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
PDF
The Bitcoin Lightning Network
PPTX
Cryptography by Afroz haider mir
Talk Microservices to Me: The Role of IAM in Microservice Architecture
Bitcoin cryptography
FIPS 140-2 Validations in a Secure Enclave
Bitcoin Wallet &amp Keys
Modern problems in backend engineering, Siim Kaspar Uustalu
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
The Bitcoin Lightning Network
Cryptography by Afroz haider mir

What's hot (18)

PDF
Telecommunication Evolution
PPTX
Write Smart Contracts with Truffle Framework
PDF
Bitmark and Hyperledger Workshop: the Digital Assets and Property
ODP
Hyperledger Fabric and Tools
PDF
Module: drand - the Distributed Randomness Beacon
PDF
Building Local-loop Services for Customers
PDF
A living programming environment for a living blockchain
PDF
How (un)secure is SSL/TLS?
PDF
Analyzing Data at Scale with Apache Spark
PPTX
Deploy a blockchain web-app with Hyperledger Fabric 1.4 - Concepts & Code
PDF
Routing security - Budapest 2011
PDF
Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?
PDF
Blockchain – The future of Internet by Moinur Rahman
PPSX
Secure socket layer
PDF
Libbitcoin slides
PDF
javanetworking
PDF
Meteor and Bitcoin (Lightning Talk)
PDF
2019 03 18_kenneth_simplebitcoinwebsite
Telecommunication Evolution
Write Smart Contracts with Truffle Framework
Bitmark and Hyperledger Workshop: the Digital Assets and Property
Hyperledger Fabric and Tools
Module: drand - the Distributed Randomness Beacon
Building Local-loop Services for Customers
A living programming environment for a living blockchain
How (un)secure is SSL/TLS?
Analyzing Data at Scale with Apache Spark
Deploy a blockchain web-app with Hyperledger Fabric 1.4 - Concepts & Code
Routing security - Budapest 2011
Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?
Blockchain – The future of Internet by Moinur Rahman
Secure socket layer
Libbitcoin slides
javanetworking
Meteor and Bitcoin (Lightning Talk)
2019 03 18_kenneth_simplebitcoinwebsite
Ad

Similar to [LDAPCon 2019] LemonLDAP::NG 2.0: Mutli-factor authentication, Identity Federation, WebService and API protection (20)

PDF
[POSS 2019] MicroServices authentication and authorization with LemonLDAP::NG
PDF
#OSSPARIS19 - MicroServices authentication and authorization with LemonLDAP::...
PDF
[Pass The SALT 2018] Second factor authentication in LemonLDAP::NG
PDF
OpenID Connect "101" Introduction -- October 23, 2018
PPTX
Access management
PPTX
Help! I Have An Identity Crisis: A look at various mechanisms of Single Sign On
PDF
[OW2con19] LemonLDAP::NG success stories
PDF
LemonLDAP::NG Success Stories presented at OW2con'19, June 12-13, Paris.
 
PPTX
Mit 2014 introduction to open id connect and o-auth 2
PDF
Saml authentication bypass
PDF
How to 2FA-enable Open Source Applications
PDF
JDD2015: Security in the era of modern applications and services - Bolesław D...
PDF
TrustBearer - CTST 2009 - OpenID & Strong Authentication
PDF
Implementing Microservices Security Patterns & Protocols with Spring
PDF
Introduction to SAML & OIDC
PPTX
Making Sense of API Access Control
KEY
OpenID - An in depth look at what it is, and how you can use it
PDF
Distributed Identities with OpenID
PDF
WebAuthn & FIDO2
PPTX
Configuring Single Sign-On (SSO) via Identity Management | MuleSoft Mysore Me...
[POSS 2019] MicroServices authentication and authorization with LemonLDAP::NG
#OSSPARIS19 - MicroServices authentication and authorization with LemonLDAP::...
[Pass The SALT 2018] Second factor authentication in LemonLDAP::NG
OpenID Connect "101" Introduction -- October 23, 2018
Access management
Help! I Have An Identity Crisis: A look at various mechanisms of Single Sign On
[OW2con19] LemonLDAP::NG success stories
LemonLDAP::NG Success Stories presented at OW2con'19, June 12-13, Paris.
 
Mit 2014 introduction to open id connect and o-auth 2
Saml authentication bypass
How to 2FA-enable Open Source Applications
JDD2015: Security in the era of modern applications and services - Bolesław D...
TrustBearer - CTST 2009 - OpenID & Strong Authentication
Implementing Microservices Security Patterns & Protocols with Spring
Introduction to SAML & OIDC
Making Sense of API Access Control
OpenID - An in depth look at what it is, and how you can use it
Distributed Identities with OpenID
WebAuthn & FIDO2
Configuring Single Sign-On (SSO) via Identity Management | MuleSoft Mysore Me...
Ad

More from Worteks (20)

PDF
[Open Source Experience 2021] Une infrastructure Cloud et une solution IDaaS ...
PDF
[Identity Days 2021] W'IDaaS - Identity as a Service
PDF
[Identity Days 2021] Quel avenir pour OpenLDAP ?
PDF
[Pass the SALT 2021] Hosting Identity in the Cloud with free softwares
PDF
[OW2con'21] Hosting Identity in the Cloud with OW2 free softwares
PDF
[AFUP Lyon 2021] LDAP Tool Box Self Service Password
PDF
[OpenDay 2021] Logiciel libre, entreprises et modèles économiques
PDF
[Campus du Libre 2020] Présentation de la solution W'Sweet
PDF
[Identity Days 2020] Politique des mots de passe des annuaires LDAP et outils...
PDF
[Université Lyon 1] Exemples de logiciels libres : LemonLDAP::NG et W'Sweet
PDF
[Pass the SALT 2020] Understand password policy in OpenLDAP and discover tool...
PDF
[OW2online 2020] LDAP Synchronization Connector
PDF
[Aperhologramme 2020] Comment faire du logiciel libre ?
PDF
[POSS 2019] OVirt and Ceph: Perfect Combination.?
PDF
[POSS 2019] TLS for Dummies
PDF
[POSS 2019] Learn AWK in 15 minutes
PDF
[LDAPCon 2019] The FusionIAM initiative
PDF
[Identity Days 2019] Maîtrisez les accès à vos applications Web (Cloud et On...
PDF
[RedHat Forum 2019] REX - COMMENT MONTER UNE OFFRE DE CLOUD EN MARQUE BLANCHE...
PDF
[BlueMindSummit] Présentation de la solution W'Sweet
[Open Source Experience 2021] Une infrastructure Cloud et une solution IDaaS ...
[Identity Days 2021] W'IDaaS - Identity as a Service
[Identity Days 2021] Quel avenir pour OpenLDAP ?
[Pass the SALT 2021] Hosting Identity in the Cloud with free softwares
[OW2con'21] Hosting Identity in the Cloud with OW2 free softwares
[AFUP Lyon 2021] LDAP Tool Box Self Service Password
[OpenDay 2021] Logiciel libre, entreprises et modèles économiques
[Campus du Libre 2020] Présentation de la solution W'Sweet
[Identity Days 2020] Politique des mots de passe des annuaires LDAP et outils...
[Université Lyon 1] Exemples de logiciels libres : LemonLDAP::NG et W'Sweet
[Pass the SALT 2020] Understand password policy in OpenLDAP and discover tool...
[OW2online 2020] LDAP Synchronization Connector
[Aperhologramme 2020] Comment faire du logiciel libre ?
[POSS 2019] OVirt and Ceph: Perfect Combination.?
[POSS 2019] TLS for Dummies
[POSS 2019] Learn AWK in 15 minutes
[LDAPCon 2019] The FusionIAM initiative
[Identity Days 2019] Maîtrisez les accès à vos applications Web (Cloud et On...
[RedHat Forum 2019] REX - COMMENT MONTER UNE OFFRE DE CLOUD EN MARQUE BLANCHE...
[BlueMindSummit] Présentation de la solution W'Sweet

Recently uploaded (20)

PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Empathic Computing: Creating Shared Understanding
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Big Data Technologies - Introduction.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Programs and apps: productivity, graphics, security and other tools
Mobile App Security Testing_ A Comprehensive Guide.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Spectroscopy.pptx food analysis technology
Empathic Computing: Creating Shared Understanding
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Network Security Unit 5.pdf for BCA BBA.
Per capita expenditure prediction using model stacking based on satellite ima...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
20250228 LYD VKU AI Blended-Learning.pptx
Approach and Philosophy of On baking technology
Encapsulation_ Review paper, used for researhc scholars
Big Data Technologies - Introduction.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...

[LDAPCon 2019] LemonLDAP::NG 2.0: Mutli-factor authentication, Identity Federation, WebService and API protection

  • 1. LEMONLDAP::NG 2.0: MUTLI-FACTOR AUTHENTICATION, IDENTITY FEDERATION, WEBSERVICE AND API PROTECTION Clément OUDOT – Identity Solutions Manager clement.oudot@worteks.com
  • 3. 05/11/19 3 LDAPCon  Single Sign On ● LDAPCon 2007: The FederID Project ● LDAPCon 2011: The LemonLDAP::NG project ● LDAPCon 2015: The OpenID Connect Protocol ● LDAPCon 2017: Understanding main SSO protocols: CAS, SAML and OpenID Connect ● LDAPCon 2019: LemonLDAP::NG workshop and conference
  • 4. 05/11/19 4 SSO Workflow Authentication Portal Application 2. Authentication 1. First access 3. Send SSO Token Trust link 4. Validate SSO token
  • 6. 05/11/19 6 History 2003 2006 2010 2016 2018 Project creation Fork – version NG Protocols CAS, SAML and OpenID Version 1.0 Protocol OpenID Connect Second factors (2FA) Version 2.0
  • 7. 05/11/19 7 Main features ● Web Single Sign On ● Access control ● Applications portal ● Authentication modules choice and chain ● Password management, account creation ● Multi-factor authentication (MFA) ● Protection of Web applications and API/WebServices ● Graphical customisation ● Packages for Debian/Ubuntu/RHEL/CentOS
  • 9. 05/11/19 9 Portal with application menu
  • 12. 05/11/19 12 Free Software ● License GPL ● OW2 project ● Forge: https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng ● Site: https://lemonldap-ng.org ● OW2 Community Award in 2014 and 2018 ● SSO component of FusionIAM project: https://fusioniam.org/
  • 13. 05/11/19 13 Component roles Configurations Sessions Portal Manager Handler Application menu CAS SAML OpenID Connect Self Services SOAP/REST server Session management Configurations Sessions Notifications Second factors Access Control SSOaaS Web Service Token Custom
  • 14. 05/11/19 14 Web application protection with Handler Sessions Portal Handler Web Application Authentication Session creation Session read SSO cookie HTTP headers
  • 15. 05/11/19 15 Multi Factor Authentication
  • 16. 16 Multi Factor Authentication ● Multi-factor authentication (MFA) is a method of confirming a user's claimed identity in which a user is granted access only after successfully presenting 2 or more pieces of evidence (or factors) to an authentication mechanism: ● knowledge (something they and only they know) ● possession (something they and only they have) ● inherence (something they and only they are)
  • 17. 17 One-Time Password ● One-Time Password (OTP) is a password that is valid for only one login session or transaction ● Two standards: ● HOTP (RFC 4226): HMAC-Based One-Time Password ● TOTP (RFC 6238): Time-Based One-Time Password ● Rely on a secret shared between user and server
  • 18. TOTP ● Shared secret key K ● T0: start time ● TI: time interval ● Time Counter TC = floor((unixtime(now) − unixtime(T0)) / TI) ● TOTP = Truncate( SHA1(K 0x5c5c… SHA1(K 0x3636… TC))⊕ 0x5c5c… ∥ SHA1(K ⊕ 0x3636… ∥ TC)) ∥ SHA1(K ⊕ 0x3636… ∥ TC)) ⊕ 0x5c5c… ∥ SHA1(K ⊕ 0x3636… ∥ TC)) ∥ SHA1(K ⊕ 0x3636… ∥ TC)) ) & 0x7FFFFFFF ● TOTP Value = TOTP mod 10d, where d is the desired number of digits of the one-time password
  • 19. Using a TOTP ● Registration on client: shared key can be registered manually or using a QR code ● Server associates shared secret to user ● At next authentication, TOTP value is computed by client and server
  • 20. Universal Second Factor ● Universal 2nd Factor (U2F) is an open authentication standard that strengthens and simplifies two-factor authentication using specialized USB or NFC devices. ● Managed by FIDO Alliance https://fidoalliance.org/
  • 21. Using U2F ● Registration: Token generates private/public keys and a handle and send public key and handle to server ● The server associates the public key and the handle to user ● At next authentication, server sends the handle and a crypto challenge and the U2F token signs the challenge and sends it back
  • 24. 24 Support in LL::NG ● LemonLDAP::NG can use the following 2FA: ● TOTP ● U2F ● TOTP or U2F ● Mail ● External ● REST ● Yubikey
  • 26. 05/11/19 26 Main features ● LL::NG can act as client and as server ● Attributes sharing ● Manage authentication contexts and levels ● Autogeneration of public/private keys ● Access control per services ● Publication of configuration data (metadata) ● Multi-protocols gateway ● Single logout
  • 27. 05/11/19 27 CAS CAS client CAS server First access Redirection for authentication Service TicketService Ticket Service ticket validation Access to identity
  • 28. 05/11/19 28 SAML Service Provider (SP) Identity Provider (IDP) First access IDP choice Authentication request Authentication response Authentication response Signature verification Read assertion
  • 29. 05/11/19 29 OpenID Connect Relying Party (RP) OpenID Provider (OP) First access OP choice Authentication request JWT JWT Signature verification Read JWT Get UserInfo
  • 30. 05/11/19 30 API / WebService protection
  • 31. 05/11/19 31 How to protect a WebService ● Global authentication: ● HTTP Basic ● SSL client certificate ● User oriented authentication?
  • 32. 05/11/19 32 LL::NG ServiceToken Handler ● New Handler "Service Token" installed between application and WebService ● Main Handler generates a token based on time session_id and virtual hosts: cipher(time, session_id, vhost_list) ● The token is sent by application to WebService ● The Handler "Service Token" intercepts the token, validates it and apply access rules, and sent HTTP headers to WebService
  • 33. 05/11/19 33 LL::NG ServiceToken Handler Sessions Portal Handler Web Application Authentication Session creation Session read SSO cookie HTTP headers Token Handler Service Token Web Service Token HTTP headers Session read
  • 34. 05/11/19 34 Using OAuth2 ● When LL::NG acts as OIDC provider, it delivers an OAuth2 access token ● This access token can be validated with different operations: ● Call /oauth2/userinfo, which will return user attributes ● Call /oauth2/introspect, which will return token information (including the token owner) – see RFC 7662 ● Use LL::NG OAuth2 Handler
  • 35. 05/11/19 35 LL::NG OAuth2 Handler Sessions Portal Web Application Authentication Session creation OIDC response Handler OAuth2 Web Service Access Token HTTP headers Session read ID Token Access Token
  • 36. 05/11/19 36 Example – UserInfo Endpoint $ curl -k -H "Authorization: Bearer a74d504ec9e784785e70a1da2b95d1d2" https://auth.openid.club/oauth2/userinfo | json_pp {   "family_name" : "OUDOT",   "name" : "Clément OUDOT",   "email" : "clement@oodo.net",   "sub" : "coudot" }
  • 37. 05/11/19 37 Example – Intropsection Endpoint $ curl -k -H "Authorization: Basic bGVtb25sZGFwOnNlY3JldA==" -X POST -d "token=a74d504ec9e784785e70a1da2b95d1d2" https://auth.openid.club/oauth2/introspect | json_pp { "client_id" : "lemonldap", "sub" : "coudot", "exp" : 1572446485, "active" : true, "scope" : "openid profile address email phone" }
  • 38. 05/11/19 38 Example – Oauth2 Handler $ curl -k -H "Authorization: Bearer a74d504ec9e784785e70a1da2b95d1d2" https://oauth2.openid.club/api.pl { "check" : "true", "user" : "coudot" }
  • 39. 3939 THANKS FOR YOUR ATTENTION More informations: info@worteks.com @worteks_com linkedin.com/company/worteks