LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-06-2014, 04:11 PM   #1
darthfoolish
Member
 
Registered: May 2006
Posts: 52

Rep: Reputation: 15
Unhappy Restrict access to SSL private key using SELinux on RHEL 6.2?


I have a problem with Apache certs in a really paranoid organisation which wants to keep the private key as secure as possible.

I could encrypt the key, but this requires a passphrase dialogue on service start/restart, which probably won't fly with them.

Also could automate passphrase entry, but this requires that the passphrase is stored somewhere that the box can get to, even less likely to fly.

So, I was wondering if I could leverage SELinux to restrict access to the private key to the httpd process. i.e. no users, even root, would be able to view (vi or cat etc) or copy the file.

However, I have no idea how to do this, or even if it's possible, does anyone have a clue?
 
Old 03-07-2014, 01:24 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
SELinux, or rather its default "targeted" policy, is a "hard on the outside, chewy on the inside" policy: it tightens security for 'net-facing services confining them to their own context while leaving movement of local users mostly unrestricted. I'd venture you would either need to strip out and redefine parts of the current policy or build a MLS policy yourself to accomplish what you want.
 
Old 03-18-2014, 06:38 AM   #3
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
http://en.wikipedia.org/wiki/Hardware_security_module
 
Old 03-29-2014, 11:27 AM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
The problem is that apache must be able to access the key to decrypt the stream... If apache can access the key, then a vulnerability within apache can expose the key.

I don't believe there is a way around it...
 
  


Reply

Tags
access, httpd, key, private, selinux



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
public key VS private key in automation Upendra Pratap Singh Linux - Server 1 05-03-2012 02:59 PM
Ssh access only using private key vishesh Linux - Server 2 01-20-2011 03:09 AM
SSL Public key/Private question masenko703 Linux - Newbie 6 06-03-2009 11:14 PM
Public key, private key explained calande Linux - Security 3 06-12-2008 05:23 AM
RSA public key encryption/private key decription koningshoed Linux - Security 1 08-08-2002 07:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration