/**
\page yarp_port_auth YARP port authentication

\tableofcontents

A new connection to a YARP port is established via handshaking on a TCP port,
(see yarp::os::impl::TcpFace). So everyone who can access this TCP port
can connect to your YARP port (as long as he understands the protocol).

So if you are not behind a firewall, you are exposing your YARP infrastructure
to the world.
This is frustrating at a minimum if someone is messing with your nameserver.
And if your application is vulnerable to corrupted data, it is a security leak.
In particular, all iCub users running the yarprun server for the application manager
should be aware of this issue
(see <a href="http://wiki.icub.org/wiki/Managing_Applications#Final_considerations">iCub wiki</a>).

To protect your ports, you can enable the port authentication which adds a key exchange to the initial
handshaking in order to authenticate any connection request. It uses a 3-way HMAC mechanism
with SHA256.

\section yarp_port_auth_usage How to use the port authentication mechanism

Create a file 'auth.conf' in a directory that "yarp resource --find auth.conf" would find, with the following content:
\code
[AUTH]
key  "my_secret_key"
\endcode

You can 'test' it by opening a telnet connection to your nameserver.
Instead of a welcome message you should see only garbage.

Now, only yarp applications with the same key can connect to each other. This
also applies to the nameserver (as it is just a regular port).

\section yarp_port_auth_remarks Remarks
\li Connections via telnet (as in \ref yarp_without_yarp_begin) or http (for browser-access
to the nameserver) are no longer possible.
\li Also if you wrote your own code for communication from a yarp-external application
(as in \ref yarp_without_yarp_python_rpc), you have to include the authentication logic.
\li It imposes additional overhead onto the handshaking. The effect might be visible
when doing many nameserver requests (open port, auth, request, close port) over slow connections.
\li This is no encryption method: your actual data is still transmitted as usual.
\li There might still be a security issue with connection via UDP/MCAST, where data packets
possibly could be inserted into an already established connection.

\section yarp_port_auth_final Final note
I consider this mechanism to be secure for handshaking,
but it comes without any warranty. Every user should
still feel responsible for the security of their system.

*/
