Single Sign-On in Mendix
How to keep it simple?
Menno de Haas
Mendix Expert / Team Lead
WebFlight
GOAL
Make single sign on in Mendix a little less scary…
Outline
• SSO basics
• Intro use-case
• Implementation
• Discussion
SSO basics
What do you need to know?
Authentication vs Authorization
SAML vs OAuth vs OpenID Connect
WHY is OAuth so hard?
OAuth 2.0 parties
Client application
Resource server
Resource owner
Authorization server
Intro use-case
A simple example…
Architecture
InvoiceApp
Invoice API
Resource owner = ME
Authorization server
Client application Resource server
What is NOT in the demo?
• How to configure your authorization server?
• How to choose the appropriate OAuth 2.0 flow?
• How to work with states during the login flow?
• How to work with JSON Web Tokens?
• How to validate tokens and scopes at API endpoints?
What IS in the demo?
• How to configure a login (authorization code) flow?
• How to configure a logout flow?
Implementation
Demo time!
Login flow
Mx Static HTML Mx REST API Mx SPA Auth0 IdP
login.html Initiate login Login screen Login screen
User consentUser consentCallback
index.html
Login flow
Mx Static HTML Mx REST API Mx SPA Auth0 IdP
login.html Initiate login Login screen Login screen
User consentUser consentCallback
index.html
Login.html
Login.html
Login flow
Mx Static HTML Mx REST API Mx SPA Auth0 IdP
login.html Initiate login Login screen Login screen
User consentUser consentCallback
index.html
Initiate login
Login flow
Mx Static HTML Mx REST API Mx SPA Auth0 IdP
login.html Initiate login Login screen Login screen
User consentUser consentCallback
index.html
Callback
Logout flow
Nanoflow Remove session Remove session
Redirect to
homepage
Mx SPA Auth0 IdP
index.html
Logout flow
Demo

Mendix Single Sign-On OAuth 2.0 Example

Editor's Notes

  • #2 Voorbereidingen: Revoke access account Define roles voor user
  • #7 Kort verschillen aanstippen. Aangeven dat met OAuth en Open ID Connect werken.
  • #8 OAuth 2.0 implementation flexible No default library Mendix Escape Mendix application and return
  • #9 Vertel over verschillende use cases Oauth 2.0: waarom gebruik je dit?
  • #13 Afsluiten met waar je deze informatie wel kunt vinden.