Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #29906

Re: java unix domain sockets ... or substitute

From "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org>
Newsgroups comp.lang.java.programmer
References <slrnm0ejqn.fp3.avl@login.logic.tuwien.ac.at>
Subject Re: java unix domain sockets ... or substitute
Date 2014-09-04 15:11 +0100
Message-ID <HI2dnY_1ser57pXJnZ2dnUVZ8m6dnZ2d@bt.com> (permalink)

Show all headers | View raw


Andreas Leitgeb wrote:
> - a way to negotiate a bidirectional channel between a client and
>    the server that doesn't involve creating pipe nodes in the
>    filesystem.

Seems quite obvious that this calls for the server to listen on a local TCP/IP 
port (and probably only accept incoming connections from localhost), then layer 
whatever kind of security you want over that.

If you must use Unix group permissions, then Nigel Wade's suggestion of having 
the server write a random number to a file that only it can write and only they 
can read, and using that for validation, seems adequate.  But note that that is 
vulnerable to network sniffing.  But that may not matter to you.  Even if not, 
I'd be inclined to change the number after each connection attempt (sucessfull 
or not), and have the clients retry in case of failure (race conditions, etc).

A better solution for many (most?) purposes would be to use SSL/TLS instead of 
raw TCP/IP.  The server would need a certificate, but you could use a 
self-signed cert.

If you go that route then you could still use Nigel's idea to validate by 
group, or you could set up your own password system that was submitted/checked 
over SSL.  Alternatively you could use client certificates at the SSL level.

A lot -- in fact everything -- depends on what /kind/ of security you want, and 
how /much/ security you want.

    -- chris 

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

java unix domain sockets ... or substitute Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-09-03 17:26 +0000
  Re: java unix domain sockets ... or substitute Wayne <nospam@all.invalid> - 2014-09-03 13:36 -0400
    Re: java unix domain sockets ... or substitute Fredrik Jonson <fredrik@jonson.org> - 2014-09-04 07:42 +0000
    Re: java unix domain sockets ... or substitute Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-09-04 07:52 +0000
  Re: java unix domain sockets ... or substitute Josip Almasi <joe@vrspace.org> - 2014-09-04 09:45 +0200
    Re: java unix domain sockets ... or substitute Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-09-04 09:14 +0000
      Re: java unix domain sockets ... or substitute Josip Almasi <joe@vrspace.org> - 2014-09-05 10:20 +0200
  Re: java unix domain sockets ... or substitute Fredrik Jonson <fredrik@jonson.org> - 2014-09-04 08:34 +0000
    Re: java unix domain sockets ... or substitute Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-09-05 01:06 +0000
  Re: java unix domain sockets ... or substitute Nigel Wade <nmw@ion.le.ac.uk> - 2014-09-04 11:35 +0100
  Re: java unix domain sockets ... or substitute "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2014-09-04 15:11 +0100
    Re: java unix domain sockets ... or substitute Nigel Wade <nmw@ion.le.ac.uk> - 2014-09-04 15:57 +0100
      Re: java unix domain sockets ... or substitute "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2014-09-04 16:21 +0100
        Re: java unix domain sockets ... or substitute Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-09-05 10:55 +0000
  Re: java unix domain sockets ... or substitute (SOLVED) Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-09-05 00:53 +0000
    Re: java unix domain sockets ... or substitute (SOLVED) Josip Almasi <joe@vrspace.org> - 2014-09-05 10:23 +0200

csiph-web