Before anything else, we need to enable authentication, and for doing this, we need to define which authentication mechanism we want to use. Here, we will be using CRAM-MD5 because it is built into Mesos and is a popular authentication algorithm used in Simple Mail Transfer Protocol (SMTP) and Lightweight Directory Access Protocol (LDAP).
We will work on the following:
- Master: This will enable the authentication of frameworks and agents.
- Agent: We will create a file with the agent's secrets and this file will be used to authenticate the master.
- Marathon: This accepts credentials in a different manner to Mesos. Instead of storing everything in one file, only secrets are stored in the file. We can pass this principal using the command-line flag.