+ All Categories
Home > Documents > ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the...

ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the...

Date post: 16-May-2018
Category:
Upload: donhan
View: 221 times
Download: 1 times
Share this document with a friend
66
ENTERPRISE SECURITY ENTERPRISE SECURITY WITH KEYCLOAK WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen
Transcript
Page 1: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

ENTERPRISE SECURITYENTERPRISE SECURITYWITH KEYCLOAKWITH KEYCLOAKFrom the Intranet to Mobile

By Divya Mehra and Stian Thorgersen

Page 2: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

PROJECT TIMELINEPROJECT TIMELINE

Page 3: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

AGENDAAGENDA

Page 4: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen
Page 5: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

THE OLD WAYTHE OLD WAYSecuring monolithic web app relatively easyUsername and password formCredentials verified against table in DBHTTP Session storessecurity context

Page 6: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

IT'S NOT JUST A FORM ANDIT'S NOT JUST A FORM AND

A TABLE ANYMOREA TABLE ANYMORE

Enterprise software has changedNo longer one or two apps inside firewallNow we have manyseparate systemsExposed to mobile usersand partners

Page 7: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

THE NEW WAY?THE NEW WAY? Multiple apps Multiple variants of each app Multiple servicesMultiple user dbs Multiple loginsOutside firewall

Page 8: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

AUTHENTICATIONAUTHENTICATIONPasswords not sufficientUsers create bad passwords (123456 and password)Passwords policies help, but no guaranteeUsers reuse passwordsPasswords can be lostSecure storage is requiredNeed two-factor authentication

Page 9: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

APP TYPESAPP TYPESHave to deal with many app, variants & programminglanguages

Client-side and server-side webMobile (native and hybrid)APIs/Services...

Page 10: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

MOBILEMOBILEUsers don't want to login frequentlyDon't store username and password on phoneWhat if device is lost?Sessions and cookies aren't idealRequires public services

Page 11: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

SINGLE SIGN-ONSINGLE SIGN-ONNot as trivial as it may seemSingle Sign-Out can be even harderNeed Remote Sign-Out

Page 12: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

MANAGEMANAGEAppsServicesUsersDevicesPermissionsSessions and logs

and.. Ideally manage everything from one console

Page 13: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

SELF SERVICESELF SERVICEUsers can manage their own accountsRecover passwordUpdate profileEnable two-factor authenticationManage sessionsAccount history

and.. Ideally manage everything from one console

Page 14: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

INTEGRATIONINTEGRATIONThird party appsExisting InfrastructureNew Infrastructure after acquisitionExternal usersSocial networks

Page 15: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

VULNERABILITIESVULNERABILITIESBroken Authentication and Session Management is#2 on Open Web Application Security Project(OWASP) Top Ten listRecommendation is to not implement your own!

Page 16: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen
Page 17: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen
Page 18: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

PROTOCOLSPROTOCOLSOpenID ConnectSAML 2.0

Page 19: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

OPENID CONNECTOPENID CONNECTBuilt on OAuth 2.0RESTfulJSONEasy to useLess mature - final spec released last year

Page 20: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

SAML 2.0SAML 2.0XMLHarder to use and understandMature - 1.0 was adopted as an OASIS standard in2002

Page 21: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

TOKENSTOKENSDecouples authenticationCross-domainStatelessOnly sent when neededStandards based

Page 22: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

AUTHENTICATIONAUTHENTICATIONAuthenticate with KeycloakLogin forms provided by KeycloakTwo-factor authenticationRequires SSLPasswords are salted and hashed with PBKDF2

Iterations configurable

Page 23: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

<button onclick="keycloak.login()">Login</button>

Page 24: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Welcome App

Page 25: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Login to Keycloak realm

Page 26: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Logged-in to Welcome App

Page 27: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

APP INTEGRATIONAPP INTEGRATIONKeycloak Client AdaptersKeycloak ProxyOpenID Connect Resource Provider librarySAML Service Provider library

Page 28: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

CLIENT ADAPTERSCLIENT ADAPTERSJBoss EAP & WildFlyJBoss FuseJBoss BRMSJavaScriptNodeJSMobile (Apache Cordova and Native)SpringTomcat, JettyMore coming (contributions welcome!)

Page 29: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

EXAMPLEEXAMPLESimple example to demonstrate featuresTwo HTML5 applicationsRESTful services deployed to WildFly

Page 30: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

ADMIN CONSOLEADMIN CONSOLEConfigure and manage everything from oneconsoleIncluding settings, applications, services,users, permissions and sessions

Page 31: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Admin Console - Realm settings

Page 32: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Admin Console - Clients

Page 33: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Admin Console - Client settings

Page 34: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Admin Console - User settings

Page 35: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Admin Console - User role mappings

Page 36: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

ACCOUNTACCOUNTMANAGEMENTMANAGEMENTA console for users to manage their ownaccount

Page 37: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Account Management - Profile

Page 38: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Account Management - Password

Page 39: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Account Management - Applications

Page 40: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Account Management - Account history

Page 41: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

SINGLE SIGN-ONSINGLE SIGN-ONWeb SSOEnterprise/Desktop SSO Bridge (Kerberos)Single Sign-OutRemote Sign-Out

Page 42: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

THEMESTHEMESBrand login pages and account management tointegrate with your corporate brandHTML templates for more than just styling

Page 43: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Login - Default theme

Page 44: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Admin Console - Configure theme

Page 45: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Login - Summit theme

Page 46: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

LOGIN FLOWSLOGIN FLOWSRequired actionsRecover passwordTwo factor authenticationRegistration

Page 47: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Admin Console - Login settings

Page 48: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Login - Extra features enabled

Page 49: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Login - Configure two factor authentication

Page 50: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Login - Update profile

Page 51: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

PASSWORD POLICIESPASSWORD POLICIESSet required complexity for passwordsPrevent reuse of old passwordsRequire regular updating of passwordsSet hashing intervals

Page 52: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Admin Console - Password policies

Page 53: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Login - invalid password update

Page 54: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

USER FEDERATIONUSER FEDERATIONSync users with external directoriesRead-only or read-write

Page 55: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Admin Console - Add LDAP user federation

Page 56: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Admin Console - User federation

Page 57: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

IDENTITY BROKERINGIDENTITY BROKERINGAllow external users to sign-onSupports sign-on withsocial networks

Page 58: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Admin Console - Add SAML Identity Provider

Page 59: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Admin Console - Identity Providers

Page 60: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Login - Identity Brokering

Page 61: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

MAPPERSMAPPERSCustomize tokensMap claims and attributes from external tokensMap attributes and groups from LDAP

Page 62: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Admin Console - Token mappers

Page 63: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Admin Console - Identity Provider mappers

Page 64: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Admin Console - LDAP mappers

Page 65: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

VULNERABILITIESVULNERABILITIESStandard ProtocolsBuilt-in Brute Force protectionIntegrate with Intrusion DetectionProtected against known attacksPatches

Page 66: ENTERPRISE SECURITY WITH KEYCLOAK - Red Hat€¦ · ENTERPRISE SECURITY WITH KEYCLOAK From the Intranet to Mobile By Divya Mehra and Stian Thorgersen

Recommended