Skip to main content

SELinux and GDPR

The General Data Protection Regulation (GDPR) (Regulation (EU) 2016/679) where by the European Parliament, the Council of the European Union and the European Commission intend to strengthen and unify data protection for all individuals within the European Union (EU). The GDPR aims primarily to give control back to citizens and residents over their personal data and to simplify the regulatory environment. The General Data Protection Regulation (GDPR) applies to all companies processing and holding the personal data of persons residing in the European Union (EU), regardless of the company's location [1].
GDPR Requirements:
Meeting the most important GDPR requirements is a great first step to compliance with the new regulation. Unauthorized data access generating threats should be secured via: (1) Assessment, (2) Prevention, (3) Detection [2]. The principles relating to the processing of personal data are set out in GDPR:
  1. Lawfulness, fairness and transparency
  2. Purpose limitation
  3. Data minimization
  4. Accuracy
  5. Integrity and confidentiality
Define how GDPR applies to your organization:
A data controller is an organization that determines the purpose and methods for processing personal data, such as a retailer that collects personal data while selling products to EU data subjects. A data processor is an organization that processes personal data on behalf of a data controller, such as a marketing firm that sends emails to EU data subjects on behalf of a retailer. GDPR is expected to be applied to all data subjects in the EU, including EU citizens, non citizen residents and even tourists visiting the EU.
GDPR requirements also apply to organizations outside the EU that process or monitor the personal data of EU data subjects, such as a U.S.-based developer that creates an application that, while being used by EU data subjects, collects personal data about them.
SELinux:
Security Enhanced Linux or SELinux is an advanced access control mechanism built into most modern Linux distributions. It was initially developed by the US National Security Agency to protect computer systems from malicious intrusion and tampering [3]. SELinux implements what's known as MAC (Mandatory Access Control). This is implemented on top of what's already present in every Linux distribution, the DAC (Discretionary Access Control).
SELinux is a way to fine-tune such access control requirements. With SELinux, you can define what a user or process can do. It confines every process to its own domain, so the process can interact with only certain types of files and other processes from allowed domains. This prevents a hacker from hijacking any process to gain system-wide access.
SELinux, the best suit for GDPR:
Transparency: Personal data shall be processed lawfully, fairly and in a transparent manner in relation to the data subject using SELinux. Data processing in a more transparent way could include things such as making privacy policies more user friendly and promoting the rights of users. SELinux provides the facility of making groups and assigning permissions and privileges to those groups. Groups can be associated with users to enjoy the given permissions as assigned to linked groups.
Limitation: Personal data shall be collected for specified, explicit and legitimate purposes and not further processed in a manner that is incompatible with those purposes. SELinux is the labeling system for the users and files. Each folder, user, process, executable and script is assigned a label and each label has some permissions written in its .te file. Only matching labels are allowed to access the permissions, other or un-matching labels cannot access the data in SELinux enabled environment.
Data Minimization: Personal data shall be adequate, relevant and limited to what is necessary in relation to the purposes for which they are processed. Data minimization plays a close role with purpose limitation, since controllers should collect enough data to achieve their purpose, but only the amount needed to do that. SELinux labels for web access i.e. httpd_t, are only allowed to communicate with html services only. In this way, only related information is extracted.
Accuracy: Personal data shall be accurate and, where necessary, kept up to date. Only privileged users can access and update the data where needed.
Integrity and confidentiality: Personal data shall be processed in a manner that ensures appropriate security of the personal data, including protection against unauthorized or unlawful processing and against accidental loss, destruction or damage, using appropriate technical or organizational measures. SELinux is the best suit for integrity and confidentiality, through its labeling system, unique groups with associated permissions, security level for container environment and categories in labels for containers isolation.

Article No

Clauses
SELinux support
32: Assessment
Risk assessment related to data processing
SELinux in permissive mode execute the information in logs, where manager can look for the activity against any malicious act.
35: Assessment
If modern technologies are being considered for data processing
SELinux has its modules for each application, protocol and process having its permissions. If new process is added then new module can be made written using Boolean permissions according to the application needs.
36: Assessment, 28: Detection
Authorities should be notified if high risk in data processing,   Makes available to the controller all information necessary to demonstrate compliance
SELinux enabled in enforcing mode generates the alert and logs to notify the authority for some unwanted activity.
33: Detection, 34: Detection and Prevention, 40: Detection and Prevention
In the case of a personal data breach, the controller shall without undue delay notify, The controller shall communicate the personal data breach to the data subject without undue delay, The notification of personal data breaches to supervisory authorities
The logs generated against each activity in /var/audit/audit.log directory is generated with time stamp and alert, so controller can notify on time.
51: Detection: Monitoring
Each Member State shall provide for one or more independent public authorities to be responsible for monitoring the application of this Regulation

57: Detection: Monitoring
Monitor and enforce the application of this Regulation
SELinux is enforced which means that any breach will be stopped by SELinux security and logs will also be generated
59: Detection: Monitoring & Alerting
Each supervisory authority shall draw up an annual report on its activities
All the activities can be noted from the /var/log/messages directory
4: Prevention: Pseudonymization, 6: Prevention: Pseudonymization & Encryption
Pseudonymization means the processing of personal data in such a manner that the personal


data can no longer be attributed to a specific data subject, Existence of appropriate safeguards, which may include encryption or pseudonymisation.
SElinux boolean variables will glue any high level logic such as encryption/purpose limit/pseudonymization to selinux policies
5: Prevention: Data Minimization
Adequate, relevant and limited to what is necessary in relation to the purposes for which they are processed (data minimization).
Each folder, user, process, executable and script is assigned a label and each label has some permissions written in its .te file. Only matching labels can access the permissions, other or un-matching labels cannot access the data in SELinux enabled environment. SELinux labels for web access i.e. httpd_t, are only allowed to communicate with html services only. In this way, only related information is extracted.
22: Prevention
The data controller shall implement suitable measures to safeguard the data subject's rights and freedoms and legitimate interests
SELinux provides the facility to make groups and level according to the interest of the users and permissions are assigned to those groups and levels.
50: Prevention
Develop international cooperation mechanisms to facilitate the effective enforcement of legislation for the protection of personal dataSELinux is enforced which means that any breach will be stopped by SELinux security and logs will also be generated. This enforcement is made sure by NSA


To help enhance the GDPR compliance, we just released our Kubernetes security platform called Shepherd by Wanclouds. It helps restrict access to database volumes and containers and the ability to create custom compliance checks and alerts. As containers are built and deployed at increasing speeds, security professionals need solutions that leverages a more simplified approach and management. Shepherd is able to
  • tracks all the users on your Kubernetes platform/linux level who have access to a particular volume.
  • Records the historical information about the privileged users.
  • Manages root level access to the corresponding VM
  • At the OS level, Shepherd monitors all activities such as users additions/deletion, unconfined processes, kernel modules, firewall rules changes on an ongoing basis
  • Tracks the integrity of the platform that hosts your Kubernetes cluster round the clock
  • Generates alerts for integrity violations
  • Manages access control at the Linux OS level
Shepherd helps organisations globally address the challenges of GDPR compliance, and to meet your GDPR compliance objectives.
You can checkout Shepherd and use its free online instance at https://www.shepherd.one
References:
  1. https://en.wikipedia.org/wiki/General_Data_Protection_Regulation
  2. https://www.fondia.com/blog/what-are-the-data-protection-principles-under-the-gdpr
  3. https://www.digitalocean.com/community/tutorials/an-introduction-to-selinux-on-centos-7-part-1-basic-concepts



Comments

Popular posts from this blog

WanClouds Inc.

IT Services Sector Demand for IT services is driven by fast headway in technology. But spending always depends on the health of economy. The profitability of companies depends on technical expertise, innovative services, and effective marketing. Big companies have advantages in broad service offerings and global reach, which give them the ability to provide outsourcing services to big corporate customers. Small companies can compete effectively by specializing in market niches or by partnering with larger companies that want to broaden their mix of services. WanClouds Inc. WanClouds Inc. is comprised with a team of cloud enthusiasts headquartered in California (USA) with remote offices in Bangalore and Islamabad. Team is experienced with private and public Cloud deployment. And also skilled in Operations, Cloud Networking and Cloud/container security.   WanClouds offer both product and end to end service to solve the operational and security challenges related to Clou...