REDCap Security Overview



REDCap General Security Overview

Introduction

REDCap is a web application for building and managing online surveys and databases, and thus proper security practices must be instituted on the network and server(s) hosting REDCap and also within the REDCap software itself. This level of security exists in order to protect the data stored within REDCap as well as information pertaining to the identity and activity of REDCap end-users. This document provides some best practices for hosting REDCap at your local institution (most of which are applicable to most web applications that have a database back end), but the document will largely discuss many of the features that REDCap employs at the software level to maintain security of users and data within the application.

1REDCap Infrastructure: Best Practices and Dependencies: It must be pointed out that much of the security surrounding REDCap has nothing to do with the REDCap software itself, but rather it relies on the IT infrastructure and environment in which REDCap has been installed. This includes the web server and database server, as well as the connection between the two and the connection of the web server with the REDCap end-user. Typical best practices are that the web server and database server be two separate servers and that the database server be behind a firewall. The web server may be located either behind the firewall or in the DMZ. Many institutions host REDCap with their web server behind a firewall, but this is often done because it is required by institutional protocol. Many institutions (including Vanderbilt University) do host their web server in the DMZ so that it is available outside the firewall to the entire internet. SSL is required on the web server in order to maintain secure communication with the end-user, so the web server must be set up with an SSL certificate. With regard to performing data backups for REDCap, most institutions that host REDCap perform a daily (or twice daily) backup of their REDCap database tables, often using mysqldump or other similar software.

REDCap has no hard requirements with regard to server processing power, memory, or hard drive space since it is very light weight in most respects and requires very little initial drive space by either the web server or database server. It is typically recommended that 10GB be allotted to the web server and database server each in the beginning. That amount of storage space is typically sufficient for most institutions running REDCap for the first year (or longer), even under heavy usage. It is not always predictable how much drive space will be consumed by REDCap over time since all institutions and users are different, but after several months of solid utilization by day-to-day REDCap users, the amount of space used over time becomes fairly predictable.

2REDCap User Privileges: To ensure that REDCap users have access only to data and information that they are supposed to have within the application, user privileges are utilized within the software. Each user has their own account, and their user account will only have access to REDCap projects that they themselves have created or to projects which other users have granted them access. Some of the general user privileges in the application are dictated by the customizable settings that each institution can adjust, such as whether or not users can create their own projects or if an administrator must create it for them, among other settings.

User privileges are also granular on the project level and can be modified within any given project by someone with proper privileges accessing the project's User Rights page. The creator of a project will automatically be given full rights to everything within the project, after which they may grant other users access to the project and limit their user privileges as desired. Within each project, there are user controls to limit access to various functionality and modules, such as being able to export data, to enter data, to add or modify database fields or survey questions, to build or run reports, to modify user privileges, to view the logging records, and so on. Another feature called Data Access Groups can be implemented to help segregate users and the data they enter by placing users into data access groups, after which they will only be able to access records created by someone in their group. This particular feature is entirely optional but is especially helpful in certain situations, such as for multi-institutional projects where the data entered by one institution should not be accessible or viewable by other institutions with access to that same project.

3REDCap Authentication: REDCap implements authentication to validate the identity of end-users that log in to the system. Several authentication methods are available for use in REDCap: LDAP, Shibboleth, an internal tablebased authentication method, as well as a combination of LDAP and table-based together. Institutions running REDCap can choose which authentication method works best for them. Using the table-based authentication is often the easiest to set up because it is built-in and requires no setup and no configuration with external services in order to operate.

REDCap contains an auto-logout setting, which is customizable (default auto-logout time is 30 minutes), and will automatically log a user out of the system if they have not had any activity (e.g. typing, moving the mouse) on their current web page for the set amount of time. This prevents someone else from accessing their account and their project data if they leave a workstation without properly logging out or closing their browser window. There exist some customizable settings that govern login activity, such as being able to manually set the number of failed login attempts before a user is locked out of the system for a specified amount of time. Also available is a user suspension status, which can be set for any given user. Suspending a user allows them to remain a user in the system but denying them access to the entire REDCap application until their suspended status has been revoked. For various reasons, suspending a user is preferable to deleting the user permanently from the system.

There also exist some security settings that are specific to table-based authentication. These include allowing users to set their own password and, if desired, prevent them from re-using a recent password. Users can also be automatically forced to change their password after a specified number of days. If using LDAP or Shibboleth authentication, the system can be set to allow any and all users to be able to automatically create their own REDCap account, or conversely it can be set for those users to only be able to access REDCap when an administrator has first added them to a User Whitelist. In this way, the local REDCap administrators get to choose whether they want to be more or less restrictive with regard to how new users gain access to REDCap.

4REDCap Logging and Audit Trail: REDCap maintains a built-in audit trail that logs all user activity and all pages viewed by every user, including contextual informtion (e.g. the project or record being accessed). Whether the activity be entering data, exporting data, modifying a field, running a report, or add/modifying a user, among a plethora of other activities, REDCap logs all actions. The logging record can itself be viewed within a project by users that have been given privileges to view the Logging page. The Logging page allows such users to view or export the entire audit trail for that project, and also to filter the audit trail in various ways based upon the type of activity and/or user. The built-in audit trail in REDCap allows administrators to be able to determine all the activity and all the data viewed or modified by any given user.

5REDCap Data Export and De-Identification: REDCap allows users to export any and all data from their REDCap projects, supposing they have been given full data export privileges. Data may be exported in various ways and in various formats. Data may be exported as a CSV (comma-delimited) file from a report, and also in the form of a PDF file from the data entry page when viewing a particular record. The Data Export Tool page allows users to export a project's collected data to a CSV file, which can be opened in Excel or several popular statistical analysis packages, such as SAS, SPSS, Stata, and R.

The Data Export Tool also has advanced export features that allow one to implement data deidentification methods, such as being able to automatically remove free-form text fields, remove dates, perform date shifting, and remove fields tagged as identifiers (e.g. PHI) from the data file being exported by the user. User privileges can also be set so that some users may be allowed to export data from the project but will have the data de-identification methods imposed as a means of preventing them from exporting sensitive data, either mistakenly or intentionally.

6REDCap Data Storage: REDCap stores its data and all system and project information in various relational database tables (i.e. utilizing foreign keys and indexes) within a single MySQL database, which is an open source RDBMS (relational database management system). The front end of REDCap is written in PHP, which is widely used, robust, open source scripting language. Setting up the web server and database server and securing the communication of the servers to each other and to the end-user are the responsibilities of the partner institution that is installing REDCap, and thus must be completed prior to installing REDCap. The institution installing REDCap will store all data captured in REDCap on its own servers. Thus, all project data is stored and hosted there at the local institution, and no project data is ever transmitted at any time by REDCap from that institution to another institution or organization.

REDCap's native webpage encoding, and database storage collation is UTF-8, which allows for non-English languages to be utilized in user-defined text that gets stored in REDCap. This includes data entered for a project or the text defined for a survey question or database field label, among many other types of user-defined text. REDCap's database tables implement MySQL's Innodb storage engine, which allows for the use of foreign keys for referential integrity, transactions, and row-level locking (as opposed to table-level locking), all of which are needed in REDCap for consistency, performance, and scalability.

7REDCap Security: To help protect and secure the data stored in REDCap's back-end database, the software application employs various methods to protect against malicious users who may attempt to identify and exploit any security vulnerabilities in the system. Such methods will be described here in technical detail.

In REDCap, all incoming data gets intentionally filtered, sanitized, and escaped. This includes all data submitted in an HTTP Post request and all query string data found in every URL while accessing REDCap, among other modes through which user-defined data gets submitted in the application. Server environment variables that are vulnerable to forgery by users are also checked and sanitized. All user submitted data is properly filtered for any possibly harmful markup tags and is then escaped before ever being displayed on a web page within the application. SQL queries sent to the database server from REDCap are all properly escaped before being sent. If any values used in an SQL query originated from user-defined values, they would have already been sanitized beforehand as well, as described above. User-defined data used within SQL queries also have their data type checked to prevent any mismatching of data types (e.g. making sure a number is really a number). These processes of satization, filtering, data type checking, and escaping all help to protect against methods of attack, such as Cross-Site Scripting (XSS) and SQL Injection. To specifically protect against Cross-Site Request Forgery (CSRF), which is another method of attack, REDCap utilizes a "nonce" (a secret, user-specific token) on every web form used in the application. The nonce is generated anew on each web page as the user navigates within REDCap during a session.

Many institutions that have installed REDCap have made use of enterprise-level web application security scanners, such as HP Webinspect and Acunetix, to scan and test REDCap's security and its ability to withstand various methods of attack. REDCap has performed very well in such instances. Any partner institution that wishes to scan REDCap using security scanning software is free to do so without the consent of Vanderbilt University or REDCap developers so long as the particular instance of REDCap being scanned is their own and not hosted by another institution. If an institution decides to perform a security scan of REDCap and finds any medium- to high-risk security issues that are directly REDCap related, they are encouraged to contact the REDCap developers at Vanderbilt so that such issues can be addressed.

8Data Interoperability: REDCap has modules for easily exporting and importing data, which are very useful for getting data in and out of REDCap manually through the web interface. But for various reasons, there sometimes exists the need to be able to migrate data from system to system, often in an automated or programmatic fashion. REDCap has the capability to move data in and out of individual REDCap projects using a couple different methods that do not require a web interface.

The REDCap API is an interface that allows external applications to connect to REDCap remotely, and is used for programmatically retrieving or modifying data or settings within REDCap, such as performing automated data imports/exports from a specified REDCap project or exporting a project's metadata (i.e. data dictionary). More actions and supported features will be developed and added to the API as time goes on. The API is built-in feature of REDCap, so no installation is required. The REDCap API implements the use of tokens as a means of authenticating and validating all API requests that are received. Similar to the Data Import Tool in REDCap's web interface, the API also implements data validation when the API is used for data import purposes in order to ensure that only valid data gets stored. The API provides a very efficient way to move data either to or from another system easily.

Another data interoperability service that REDCap can utilize is the REDCap DTS (Data Transfer Services). The REDCap DTS software allows data to be pushed into REDCap projects from external systems (e.g. electronic medical record system, electronic data warehouse) and provides an adjudication process whereby REDCap users approve all incoming data from DTS before it is officially saved in their REDCap project. The REDCap DTS does not come pre-installed in REDCap but is a separate add-on piece of software that must be installed in addition to REDCap itself. The DTS supports only data coming into REDCap from a source system (whereas the API supports both data import and export). Because DTS assumes that all incoming data from the source system may not be trusted as valid or that only a subset of the data coming from the source system needs to be imported, DTS utilizes an adjudication web page inside REDCap's web interface where end-users can review the data obtained from the source system before confirming that it be imported into their REDCap project. Typically, the DTS is automated to run as a daily cron job to pull data from the source system, after which REDCap users can then adjudicate and approve any new data to import into their REDCap project.


REDCap Server Security - External Instance

HostWorks, Inc.

The IHR external instance of REDCap is housed on a server hosted by HostWorks, Inc. Below is some information directly from HostWorks on their Security, Logging, and Monitoring Systems:

HostWorks, Inc. feels security is of great importance and we take all practical steps to protect information you supply to us and to your customers. We feel that logging and monitoring go hand in hand with security to supply the safest and most reliable environment possible. HostWorks, Inc. continually evaluates and implements enhancements in security technology and practices. The following is a summary of the measures HostWorks, Inc. takes to protect your information.

1SERVER SECURITY: WINDOWS IIS: HostWorks, Inc. configures its Internet Web servers using the guidelines set in theMicrosoft IIS Baseline Security Checklist for Windows settings and IIS settings; Security updates and patches that become available from Microsoft are implemented at the earliest and most suitable time after being implemented on a test environment. FTP: All FTP access is controlled with access control lists and all access is logged, the only anonymous FTP access to any server is prohibited to Read Only access and is only available upon request; TCP/IP address restrictions are utilized whenever possible. If at all possible, FTP access is performed across a VPN tunnel. All access to web servers is controlled based on account settings. No access is given without request and shared environment access will always be restricted to the users own web site files and directories. APPLICATIONS: All applications which can produce log information do so, and the information is monitored for potential issues; All Applications are updated when security patches are released, but only after testing for potential problems is completed.

2NETWORK SECURITY: The following are the methods HostWorks, Inc. utilizes to secure the traffic both in and out of our network: Antivirus/Antimalware software is utilized on servers where applicable; Antivirus detection is enabled at the firewalls; All network traffic passes by an intrusion detection system which reports any traffic matching known attack signatures; Dual redundant firewalls secure the perimeter of the network only allowing legitimate traffic and from authorized sources; SSL/TLS or VPN connections are utilized whenever possible for network communication to and from outside sources. ENCRYPTION: HostWorks, Inc. utilizes encryption on web servers for the following events: Any area that requires the passing of sensitive information such as names, addresses and credit card info to and from the client browser and the server as well as access to all administration areas as required by a specific project will utilize an https:// address, which uses a secure SSL connection. The SSL encryption is supplied by digital certificates issued by Network Solutions which uses 128 or 256-bit SSL encryption when communicating with browsers; Any personal identifying information we/you collect is stored in a secure database. Only our Web Managers and authorized administrative personnel have access to this database. We utilize a combination protocol level as well as an application level encryption. We utilize the internal encrypted function of Microsoft SQL database, in addition to code-based encryption for input fields for two-way passing of data as required by the project. Any web application development that reads or writes to the DB must be built to utilize encryption; SSL encryption can also be used in our transmitted e-mail to protect your information. This SSL encryption is generated by the E-Mail server. The only way e-mail can be encrypted is if both the sending and receiving servers support SSL encryption. If either server does not support it, then the e-mail is transmitted without encryption. While there is virtually no way to stop the interception of e-mail being transmitted to or from an e-mail server over the Internet the SSL encryption can render the data unreadable. LOGGING: The following applications produce log files on HostWorks, Inc. web server that will be monitored and maintained by HostWorks, Inc. for use in analyzing and troubleshooting the web server activity. The IIS log will be analyzed to produce statistical reports of the amount and type of Internet traffic by WebTrends Professional Suite software: Microsoft Windows System (Event Viewer) - Logs all system and OS related errors, warnings and events; Microsoft Windows Security (Event Viewer) - Logs all OS and system related logons, Success and Failure; Microsoft Windows Application (Event Viewer) - Logs all application related errors, warnings and events; Microsoft SQL Server - Logs all Database server related errors, warnings and events; Microsoft IIS Server - All possible details from IIS Activity will be logged; Microsoft FTP Server - All attempted logins, errors, uploads and activity.

3MONITORING: The following is a list of the items that HostWorks, Inc. monitors on a continuous 24x7 basis: Domain Name Service (DNS) - Is DNS resolving the Domain correctly; FTP - File Transfer Protocol - Is the FTP port responsive; HTTP - Web Server - Is the HTTP port responsive; HTTPS - Secure Web Server - Is the SSL Port responsive; PING- Generic TCP Test; POP3 - Client Email - Is the POP3 port responsive; SMTP - Internet Mail - Is the SMTP port responsive; NT Services - Monitors any local service, with the ability to automatically restart unresponsive services. We will monitor Cold Fusion Application Server service, IIS Admin service, MSSQL Server service, and any other requested services; NT Event Log - Can monitor for any specific NT event by description or Event ID; Windows Networking - Windows NT Networking; Log File - Specific items inside a log file can be checked for occurrence; ODBC Connectivity - ODBC (SQL, etc) - Checks availability of ODBC connection; Disk Space - Monitors the amount of free hard drive space and alerts when this amount gets below a specified level.

HostWorks, Inc. utilizes a network operation center for housing their equipment, called FORTRUST. FORTRUST is the data center used by Hostworks. You can review additional information about FORTRUST, including HIPAA compliance information in the following documents: FORTUST - Who We Are & FORTRUST - Denver Spec Sheet.


REDCap Server Security - DMZ Instance

Kaiser Permanente CHR, Oregon

The IHR DMZ instance of REDCap is housed on a secure server hosted by the Kaiser Permanente Center for Health Research (CHR) located in Oregon. Below is some information directly from CHR on their Security, Logging, and Monitoring Systems of the DMZ REDCap.

1SERVER SECURITY MEASURES:

  • Server room access is restricted to specific IT personnel only and is controlled via key-card access. Access is monitored and recorded 24-7.
  • All server data is encrypted at rest (FIPS 140-2 compliant)
  • Web, database, and file servers used to host REDCap are configured on separate virtual instances for increased fault tolerance and security
  • Standard server maintenance is done on a monthly basis to ensure the latest server patches are applied
  • Server backups occur nightly
  • External facing web servers are tested monthly by an external firm for the latest software versions and intrusion/threat vulnerability.
  • Disaster recovery includes a 2-week plan to return to operations via the last successful backup
  • Only restricted internal IP address ranges are allowed for REDCap API requests
  • Cylance Antivirus protection is applied to all servers.
  • Splunk log monitoring is applied to all servers for additional security

2APPLICATION SECURITY MEASURES:

  • REDCap version releases are monitored weekly for security and bug fixes. The updates are assessed using a standard set of functional application tests and then applied to the production environment. Production updates are made on a monthly basis unless the security risk requires an immediate update.
  • Data access within REDCap is limited to assigned project only. Access can be further restricted to specific record groups or de-identified data only.
  • Project changes must be approved by administrator accounts before applied to the production instance
  • Users are automatically logged out of the application after 15 minutes of inactivity.
  • User accounts are automatically suspended after 90 days of inactivity.
  • REDCap maintains an internal audit trail of all user activity and data changes.
  • SSL encryption is used for all browser transactions.
  • All user account requests are documented and approved by designated study staff prior to creation
  • All user accounts are reviewed annually for appropriate access

DMZ REDCap Access Flow Overview


Citing REDCap

See the Protocols page for more information.


HELPFUL REDCap LANGUAGE FOR GRANTS, CONSENTS, & PROTOCOLS

See the Protocols page for more information.


TWILIO SECURITY

1TWILIO OVERVIEW: REDCap has the capability to make voice calls and send SMS text messages to survey respondents by using a third-party web service named Twilio (www.Twilio.com). In this way, you could invite a participant to take a survey by sending them an SMS message or by calling them on their phone. There are many different options available for how you can invite participants and how they can take your surveys, either as a voice call survey or as an SMS conversation. Additional information about the security and privacy policies of Twilio can be found in the following documents: Twilio Security Practices & Twilio Privacy Policy.


Two-Factor Authentication (2FA)

CHR has made the decision to require two-factor authentication for logging into REDCap. Two-factor authentication will be required starting on 8/17/2020.

What is two-factor authentication (2FA)?

Two-factor authentication is an extra layer of security used to make sure that people trying to gain access to an online account are who they say they are. You may already be using 2FA to access other online systems like banking or social media sites. When you enter only your username and one password to access an account, that is considered a single-factor authentication. We are adding a second factor, or piece of information required to complete the login process, to make your account more secure.

Why are we making this change?

The use of 2FA has increased in recent years as a way of enhancing security, especially in systems that contain sensitive data. Many Kaiser Permanente systems already require two-factor authentication to log in. The second layer in two-factor authentication means a hacker or other nefarious individual would need to steal your password along with your phone to access your account. Our goal is to make our systems more secure and protect the sensitive data of our members and participants.

Who will it impact?

All users who currently log into the CHR instance of REDCap with a username and password will be impacted. This change will not impact people who are using links to complete surveys. These people are still considered participants and are not using REDCap accounts to access the system.

How will it work?

Starting Monday, August 17th, you will still enter your username and password as the first step to logging into the system. After successfully entering your username and password, you will be prompted to select one of two options for the second layer of authentication. You can choose to have a code emailed to you that will be entered into the REDCap login screen. Or you can download and set up the Google Authenticator app that will generate a login code on your smart phone. The app can be set up ahead of time so you are prepared to immediately use two-factor authentication on 8/17/2020.

Instructions on how to set up and use the two options for authentication are here.