Here, message authentication is defined as
A MAC authenticates a message. If Alice sees a message and a MAC and knows the associated secret key, she can verify that the MAC was produced by a principal that knows the key by doing the MAC computation herself. Therefore, if a message comes with a correct MAC attached, it means this message was seen by a holder of the secret key at some point. A MAC is a signature based on a secret key, providing similar assurances to a signature scheme based on public-key cryptography such as RSA-based schemes where the signature must have been produced by a principal in possession of the private key.
So as I understand HMAC for example can be used to authenticate a message am I right? (just had discussion where someone claimed HMAC was only for integrity)
And also, provided I can achieve message authentication with HMAC, how to use it correctly to achieve message authentication? Key generation etc. session keys vs. long term keys. etc.
Or is there maybe better/simpler to implement/configure solution to provide message authentication using symmetric cryptography other then HMAC?
Isn't this kind of authentication something we search for when we want to implement something like say client sending some transaction to the server? (and server accepts it only from legitimate clients)