Among many, there are three major problems faced by an analyst before data is useful:
- data aggregation and storage
- data security and access
- data wrangling (ETL/ELT)
This article deals with data security and access using an information resource management system, IRM. My own company, Simplr Insites LLC, is writing such a system alongside a file storage solution in an effort to modernize the research process.
One significant problem faced in research and cooperation is the attainment of clean and useful data. Obtaining this data often means gaining access to systems, forming legal agreements, obfuscating certain data, and embarking on the painful process of data wrangling.
While ETL and ELT are critical steps, just obtaining sensitive data, even from within an organization, is tricky. Consider the following cases related directly to access:
- data sets include confidential information
- data sets are ensnared in legal agreements regarding who can access data
- users want to control access to data to ensure it is not misused
- external users are allowed varying degrees of access
IRM as a Solution
Oracle generated a solution that attempts to tackle the data security issue. The Oracle IRM documentation provides a rather informative graphical overview of their tool:
In this system, an external user accesses a load balanced IRM server application which controls rights and access to different resources and files. Several firewalls help to improve security along with authentication, access grants, and encryption. Web services and internal users utilize the IRM server as well.
Beyond the visible components, tokens can be used to instantly manage resources and propagate access changes.
Most file systems also offer the capability to pull the date when a resource was created or modified and various permissions information. This is useful for logging purposes.
Setting Up an IRM
It is not necessary to rely on Oracle for an IRM solution. In fact, the Oracle IRM only works with Microsoft Windows.
Each component can be paired with a reliable tool, most of which I have blogged about. A set of pairings might include
|Base Application and Resource Management||Django with Secure Login|
|REST API Resource Access||Django OAuth Toolkit|
|Access Management||Django Oauth Toolkit and a Database System|
|Individual Resource Tokens||Randomly Generated and Hashed Key|
|File Storage||GlusterFS or an Encrpytable File System|
|Encryption of Resources||PyCrypto or a Similar Tool|
|Firewalls||IP Tables or another firewall|
|Two Step Verification through SMS||Twilio|
|Key Storage||Stack Exchange Blackbox|
|Logging and Anomaly Detection||Elastic APM and the ElkStack|
Logging is critical to security. Logs allow administrators to spot harmful activity, generate statistical models based on usage, and aid in auditing the system.
Tokens are a perfect solution for controlling document access in the system. They allow a user to gain access to a document, offer scopes for access, and often contain scopes that grant levels of access to a resource.
A user should be required to log in to the application to retrieve a token which refreshes on a regular schedule. These tokens can be revoked and changed by a resource owner or administrator much like using a file system.
While RSA encryption is useful for two way encryption, Fernet encryption is stronger and more useful for storing files. If a system does not offer encryption, tools such as PyCrypto offer Fernet encryption.
Keys should not be stored in the open. If compromised, it is extremely easy to gain access to a key stored in plain text. Instead, tools such as Stack Exchange’s Blackbox store keys in a system backed by a GPG key ring.
Two Step Downloading for Extra Security
Downloading a file in a secure manner might require extra protection, particularly when an external but trusted user desires access to a resource. To avoid spoofing and avoid a compromised computer from gaining access to a resource, two step verification is a recommended step.
In this process the external user provides an access token to obtain a document which is verified. On verification, a text message containing an access code is sent to the external user and the internal user is notified of the access. The external user enters the code and, if required, the resource owner or admin approves the download.
This type of process is not difficult to implement through desktop or web applications using push notifications or persistent storage.
Secured yet accessible storage is a critical problem for any data analyst or scientist. Using an established IRM or implementing a similar tool helps secure access and empower analytics.