Hi,
> On 24 Sep 2015, at 13:23 pm, Space One <
sp...@wechall.net> wrote:
> Hi,
> the reason I use UNIX sockets is that I can wrap them arround a verified
> SSL tunnel (using stunnel)!
> All the IDP and memcached servers are reachable via the Internet (and
> some allow ssh access for local users) so I need a protection against
> MITM, unallowed/unverified TCP connections, and against security wholes
> in apache or other wsgi/cgi/php scripts which run at this server!
> So, no memcached server should be available via TCP. If I would bind
> them to a TCP socket at 127.0.0.1 it is still possible that local users
> or scripts (vulnerabilities in PHP scripts) are able to connect to that
> socket.
That’s a pretty uncommon scenario (neat, but uncommon). Most deployments will have the memcache servers deployed in an internal network, not reachable from the outside, with appropriate network filters. Almost the same would apply to the IdP, except for web TCP ports, and definitely no user (except admins) would have access to any of the servers.
> Using a UNIX socket is therefore more secure as this could only be
> exploited by gaining access to the posix user under which simplesamlphp
> runs or if there is actually a vulnerability in simplesamlphp.
In your specific setup, definitely. But coming back to the discussion about documenting security considerations, I don’t think we should document for every single mechanism supported in SimpleSAMLphp, not to talk about specific setups like yours.
On the other hand, it would be really nice to have a general guide to secure a SimpleSAMLphp installation with the most common considerations for everybody. In the end, we cannot cover every single case, and for advanced scenarios like yours, the users are likely to know how to make everything secure, so not a big need for documentation there.
As always, contributions are more than welcome! ;-)
PD.: this is just curiosity: how’s that you need to allow users to login via SSH to your servers?