Securing remote communications using authentication
In Chapter 9, we introduced the sync
command, which allows Bookmarkr to back up local bookmarks to a remote location and retrieve them when needed. When doing so, the command also synchronizes local and remote bookmarks.
Until now, the communication between the local CLI application and the remote external service has happened in an insecure manner. This means that anyone who invokes the sync
command may retrieve your personal bookmarks, which you clearly don’t want, do you?
To address this issue, we need to implement authentication.
Why is authentication important?
You may be wondering why authentication should be required in the context of CLI applications. After all, a CLI application runs on the user’s computer, which already requires that user to authenticate to their session.
In the context of CLI applications, authentication is usually required when communicating with external services (i.e., sending...