concept analogy in category spring

appears as: alogy, An alogy, n analogy
Spring Security in Action

This is an excerpt from Manning's book Spring Security in Action.

With such architectures, we could encounter various vulnerabilities, so you should exercise attention. As mentioned earlier, security is a cross-cutting concern which we design on multiple layers. It’s a best practice when addressing the security concerns of one of the layers to assume as much as possible that the above layer doesn’t exist. Think about the analogy with the castle in figure 1.2. If you manage the “layer” with the 30 soldiers, you want to prepare them to be as strong as possible. And you do this even knowing that before reaching them, one would need to cross the “bridge of fire”.

I’ll end this section with an analogy to this flow. I sometimes buy books from a small shop I’ve known for ages. I have to order books in advance and then pick them up a couple of days later. But the shop isn’t on my daily route, so I can’t go myself to collect the books. I usually ask a friend who lives near me to go there and collect them for me. When my friend asks for my order, the lady from the shop calls me to confirm I’ve sent someone to collect my books. After I confirm, my friend collects the package and brings it to me later in the evening.

In this analogy, the books are the resources. I own them, so I’m the user (resource owner). My friend picking them up for me is the Client. The lady selling the books is the authorization server (we can also consider her or the book store as being the Resource Server). Observe that, to grant permission to my friend (Client) to collect the books (resources), the lady (authorization server) selling the books called me (user) directly. This analogy describes the processes of the authorization code and the implicit grant types. Of course, because we have no token in the story, the analogy is partial and describes both cases.