Deploying Low-Cost, Open-Source Multi-Factor Authentication at Scale
Total Page:16
File Type:pdf, Size:1020Kb
Securing HPC: Deploying Low-cost, Open-source Multi-factor Authentication at Scale Patrick Storm, Cyrus Proctor, Nathaniel Mendoza http://tinyurl.com/tacc-mfa-i2 October 17, 2017 What We’ve Done I Built an infrastructure to offer multi-factor authentication (MFA) to HPC users I Took open-source components that worked and built the rest I Six months to assess; 6 months to build; 1 year in production I Deployed across eight production HPC clusters with 10,000 active SSH accounts TACC MFA | October 17, 2017 | 2 | Storm, Proctor, Mendoza Why We’re Here I Orchestrating a transition to MFA is a challenging enterprise I Cost, licensing, user support, and infrastructure deployment decisions are critical I We’ve created and combined the tools to provide MFA at scale for pennies per user I Details of this low-cost, open-source infrastructure are presented as an information resource to those institutions interested in their own deployments TACC MFA | October 17, 2017 | 3 | Storm, Proctor, Mendoza Why We Did It I Extra layer of security which is beneficial for users and service provider I Most common security breaches are compromised accounts I Password reuse, or poor cyber “hygiene” I We see over 500,000 SSH brute-force attempts per day I Costs associated with security response and system downtime are rising I Widely adopted as good practice TACC MFA | October 17, 2017 | 4 | Storm, Proctor, Mendoza For Us, MFA Needed to… I Be cost effective I Provide increased levels of assurance I Enhance overall service reliability I Allow for opt-in support during transition I Continue to abide automated, non-interactive workloads I Function in such a way that security and usability are complimentary TACC MFA | October 17, 2017 | 5 | Storm, Proctor, Mendoza For Us, MFA Needed to… I Offer multiple, practical pathways for system entry I Support SSH, GSISSH, SCP, SFTP, and rsync I Allow for self-enrollment and disassociation I Be flexible enough to handle VPN, VNC, Windows RDP I Scale to multiple resources and operating systems I Integrate into existing HPC infrastructure TACC MFA | October 17, 2017 | 6 | Storm, Proctor, Mendoza Deploying an MFA Infrastructure: Summary Back End Components I Management via LinOTP I Communication via RADIUS User-facing Components I MFA device management via Liferay user portal I Device options via Feitian, Twilio, and Google I System entry services via PAM TACC MFA | October 17, 2017 | 7 | Storm, Proctor, Mendoza LinOTP I LinOTP leverages LDAP for its user database I Users are tied to pairings in local relational database I Secrets are encrypted I Web-based browser interaction via administrative console I View user pairings I Audit logs I Resynchronize tokens I Reset failed login counter TACC MFA | October 17, 2017 | 8 | Storm, Proctor, Mendoza Portal Integration Interactions with LinOTP API I Portlet within Liferay portal deployment I Initialize (or update) token I Generates an interstitial page for unpaired users I Assign token to user I Minimal negotiation with identity management back end to create information firewall I Remove token from user TACC MFA | October 17, 2017 | 9 | Storm, Proctor, Mendoza RADIUS I Secure protocol for handling authentication and accounting requests I Deployed to accept requests from front end authentication sources and broker the connection to LinOTP I Utilizes a plugin to query LinOTP API (HowTo) I Easy to maintain, debug, and scale TACC MFA | October 17, 2017 | 10 | Storm, Proctor, Mendoza Devices & Token Codes I Devices serve a six-digit, time-based one-time password (TOTP), i.e. a “device token code” I One-time password comprised of shared secret key and current time I Algorithm is Open Authentication (OATH) TOTP compliant I A device is initially paired via transaction with the LinOTP back end Current Device Pairing Offerings Include I Soft Token – free, open-source, in-house developed, smartphone-based application I SMS Token – text messaging services served to all common cellphone network providers I Hard Token – key fob with LCD screen TACC MFA | October 17, 2017 | 11 | Storm, Proctor, Mendoza Soft Tokens I In-house developed TACC apps are available in Apple iOS and Google Android app stores I Built upon/compatible with Google Authenticator I During pairing, QR Code generation with embedded secret key shown to user through secure web browser I After pairing, no network connection needed TACC MFA | October 17, 2017 | 12 | Storm, Proctor, Mendoza SMS Tokens I Messaging services mediated by Twilio Inc. I Price per US-based SMS on our back end is $0.0075 I Standard messaging rates may apply for the user I LinOTP provides built-in support I TACC monthly SMS cost on average: $200 Representative SMS This is an automated message from TACC. Your 2-factor code is 463025. TACC MFA | October 17, 2017 | 13 | Storm, Proctor, Mendoza Hard Tokens I Customized with TACC logo printed on front and back I Sourced in bulk from Feitian Technology Company (~$7 per fob) I Chose a six-digit token code with 30 second interval I Contains embedded secret key (40-digit alphanumeric SHA1) I Sold to users (base cost, shipping, admin) for $25 via University of Texas online store TACC MFA | October 17, 2017 | 14 | Storm, Proctor, Mendoza Training Tokens I Specifically designed for users who do not possess an individual account at the center I Mainly for activities at workshops, tutorials, conferences, and institutions I Helps expose users to HPC resources otherwise not available to them I LinOTP provides the capability to set a static, six-digit token code I Regenerated with each new training session TACC MFA | October 17, 2017 | 15 | Storm, Proctor, Mendoza Pluggable Authentication Modules (PAM) I Standardized API for system entry services I Prevalent throughout Linux, BSD, and Sun communities I SSH can be configured to hand off to PAM and await a yes/no response I We developed OpenMFA, a collection of three modules to check: I the success of SSH public key authentication I if an MFA exemption has been granted I if an MFA token code was successful TACC MFA | October 17, 2017 | 16 | Storm, Proctor, Mendoza OpenMFA Public Key Authentication Module I Allows for automated, non-interactive transactions I Crucial component for continuing to serve: I Gateways and portals I Community accounts I Batch transfer of files to remote storage systems I Determine if user utilized public key authentication successfully via SSH as first factor of authentication I Utilizes recent local secure system entry logs TACC MFA | October 17, 2017 | 17 | Storm, Proctor, Mendoza OpenMFA Exemption Control List Module I Grants or denies MFA exemptions I Matches against current date, username/group, and remote IP address I Extended PAM access module with automatic expiration date field I Policies kept in configuration file with powerful rule set MFA exemption control list fields permission : expiration date : users : origins e.g. + : 2019-12-31 : bob : 149.165.228.247 + : ALL : tictacc : ALL + : ALL : ALL : 192.168.12.0/24 - : ALL : ALL : ALL TACC MFA | October 17, 2017 | 18 | Storm, Proctor, Mendoza OpenMFA Token Code Module I Authentication via device token code challenge-responses with RADIUS I Queries LDAP entries to distinguish between possible authentication routes I Four “enforcement” modes of operation for opt-in MFA transitions: I Off: deactivated token module – back to single-factor authentication I Paired: only provide challenge-response when user has token device paired I Countdown: warn non-paired users; acknowledgement via return key press I Full: prompt for token code regardless of pairing status TACC MFA | October 17, 2017 | 19 | Storm, Proctor, Mendoza Typical PAM SSHD Service Configuration MFA Exemption Yes Public Key Granted? SSH Daemon Success? Handoff Yes No Yes No MFA Token Code Yes PAM Success Success? Password Return to Success? No SSH Daemon PAM Stack No PAM Authentication Entry Restart Error (Up to 2) I OpenMFA modules shown in blue, green, and red outlines TACC MFA | October 17, 2017 | 20 | Storm, Proctor, Mendoza OpenMFA Token Code Module Decision Tree Client LinOTP DB Computer Full Enforcement RADIUS SSH Server Daemon Daemon SMS LDAP Query Pairing? No Challenge RADIUS Response Query Yes Send Null Request PAM Yes Success Token Code Accepted? No PAM Authentication Error I Dotted arrows represent remote requests TACC MFA | October 17, 2017 | 21 | Storm, Proctor, Mendoza Preparation I Deployment at this scale necessitated center-wide engagement and coordination I As roll out approached, clear communication to staff and users was key I What follows is a preparatory timeline of events leading up to mandatory MFA TACC MFA | October 17, 2017 | 22 | Storm, Proctor, Mendoza Preparation Timeline I Possible MFA solutions were assessed, including commercial and free options I The decision was made to utilize off-the-shelf open-source DIY components January 7, 2015 • Begin MFA assessment August 10, 2015 • LinOTP stood up September 14, 2015 • Hard tokens purchased January 27, 2016 • Web Portal integration February 4, 2016 • OpenMFA development started May 3, 2016 • All technical components in place TACC MFA | October 17, 2017 | 23 | Storm, Proctor, Mendoza Preparation Timeline I LinOTP was installed and configured to work with LDAP and RADIUS I Testing began with FreeRADIUS PAM module to protect SSHD January 7, 2015 • Begin MFA assessment August 10, 2015 • LinOTP stood up September 14, 2015 • Hard tokens purchased January 27, 2016 • Web Portal integration February 4, 2016 • OpenMFA development started May 3, 2016 • All technical