fix privilege escalation against inter-node communication (#7474)
fix privilege escalation against inter-node communication (#7474)

This commit fixes another privilege escalation issue
abusing the inter-node communication of distributed
servers to obtain/modify the server configuration.

The inter-node communication is authenticated using
JWT-Tokens. Further, IAM users accessing the cluster
via the web UI also get a JWT token and the browser
will add this "user" JWT token to each the request.

Now, a user can extract that JWT token an can craft
HTTP POST requests for the inter-node communication
API endpoint. Since the server accepts ANY valid
JWT token it also accepts inter-node commands from
an authenticated user such that the user can execute
arbitrary commands bypassing the IAM policy engine
and impersonate other users, change its own IAM policy
or extract the admin access/secret key.

This is fixed by only accepting "admin" JWT tokens
(tokens containing the admin access key - and therefore
were generated with the admin secret key). Consequently,
only the admin user can execute such inter-node commands.
krishnasrinivas/minio,krisis/minio,aead/minio,donatello/minio,fwessels/minio,fwessels/minio,balamurugana/minio,harshavardhana/minio,aead/minio,aead/minio,fwessels/minio,krishnasrinivas/minio,krishnasrinivas/minio,harshavardhana/minio,krishnasrinivas/minio,aead/minio,fwessels/minio,minio/minio,aead/minio,harshavardhana/minio,NitishT/minio,vadmeste/minio,NitishT/minio,NitishT/minio,harshavardhana/minio,balamurugana/minio,vadmeste/minio,jimjag/minio,jimjag/minio,minio/minio,harshavardhana/minio,aead/minio,aead/minio,krisis/minio,NitishT/minio,harshavardhana/minio,harshavardhana/minio,harshavardhana/minio,aead/minio,donatello/minio,jimjag/minio,jimjag/minio