All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] passkey over network
Date: Mon, 1 Jul 2013 01:57:00 +0200	[thread overview]
Message-ID: <20130630235659.GA4928@tansi.org> (raw)
In-Reply-To: <CAH3kUhG+VQwWWt0stV9VTajb1168mZDWqM2bG-b2H4iAkRCuZQ@mail.gmail.com>

On Sun, Jun 30, 2013 at 07:24:46PM -0300, Roberto Spadim wrote:
> Hi guys, i want to create a map to my crypted disk
> but, instead of putting the passkey every time, or using a pkcs11 (smart
> card), i want to get the passkey from a external server via network
> in other words:
> 
> 1)place a new hard disk
> 2)setup dm-crypt over disk
> 3) mount disk using a external server like "
> https://www.host.com/get_passkey.php?UUID=xxxxx"

That looks overly complicated. Why not use something like

  ssh <user@remote> "cat uuid_file_xxxx" | cryptsetup ...

with a password-less ssh setup. Or improve it, use
the UUID as user-name and make "cat <passwordfile>"
the login-shell. Then you just need
 
  ssh <UUID@remote | cryptswetup 

and users cannot log in, just echo the passphrase.
(For admin purposes you can still log into the remote
server as rtoot and do a su UUID which gives you a non-login
shell.)

This gives you the far better security level of ssh with
two-sided authentication, instead of the basically broken SSL
1-sided authentification with the basically broken PKI and
the risk that anybody that can obtain your UUID or use
a PHP vulnerability, webserver vulnerability or a vulnerability 
in your PHP code can get your passphrase. Also, anybody able to
replace your server (ip spoofing, DNS spoofing, ...) can
inject whatever they like into your client-side script with
the web-solution.

Arno
-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno@wagner.name
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
There are two ways of constructing a software design: One way is to make it
so simple that there are obviously no deficiencies, and the other way is to
make it so complicated that there are no obvious deficiencies. The first
method is far more difficult.  --Tony Hoare

      parent reply	other threads:[~2013-06-30 23:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-30 22:24 [dm-crypt] passkey over network Roberto Spadim
2013-06-30 22:55 ` .. ink ..
2013-06-30 23:53   ` Roberto Spadim
2013-07-01 10:54     ` Alex Elsayed
2013-07-01 15:44       ` Arno Wagner
2013-07-01 16:56         ` .. ink ..
2013-07-01 18:53           ` Arno Wagner
2013-07-01 19:41         ` Alex Elsayed
2013-06-30 23:57 ` Arno Wagner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130630235659.GA4928@tansi.org \
    --to=arno@wagner.name \
    --cc=dm-crypt@saout.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.