This post does not written for the purpose of delivering precise information.
I 'm try to picture the Spring Security's Authorization Flow.
So, some metaphor might not fit in the original usage.
Just enjoy a short story of Authorization in Spring Security.
KimCoding was a newbie at the 'FANCY' fitness center. He had heard a lot about the center and wanted to make sure he got the most out of his membership. He walked in, and the Security Filter Chain greeted him. It was the first line of defense against any unauthorized access to the fitness center.
As KimCoding went through the Authorization Filter, he was asked to provide his Credentials, including his name, date of birth, and address. He was also asked to provide his Collection of GrantedAuthority, which included his membership level and access rights to the fitness center's facilities.
After completing the authentication process, KimCoding was granted access to the fitness center. The Security Context was updated with his information, and the SecurityContextHolder kept track of his authentication status throughout his visit.
While KimCoding was working out, he noticed the AuthorizationManager, who was monitoring access to different areas of the fitness center. The RequestMatcherDelegatingAuthorizationManager was also there, ensuring that KimCoding only had access to areas that matched his granted authority.
As he was finishing up his workout, KimCoding accidentally wandered into a restricted area. He was immediately stopped by the AccessDeniedException, which was there to ensure that only authorized members could access certain areas.
KimCoding quickly apologized and was redirected to an open area where he could continue his workout. As he left the fitness center, he realized just how important the security measures were in ensuring the safety and privacy of all members.
That's a story about "KimCoding visit a fancy fitness center" LOL.
All the important character are described here again.
- KimCoding: A fitness center member, actually just a request
- Security Filter Chain: A series of security filters that protect the fitness center's resources.
- AuthorizationFilter: A security filter that controls access to the specific area
- Authentication : A process that verifies KimCoding's identity and authorization.
- Security Context: A secure storage for the user's authentication and authorization information.
- AuthorizationManager: A manager that decides whether a user is authorized to access a resource.
- RequestMatcherDelegatingAuthorizationManager: A specific implementation of AuthorizationManager that matches requests with a set of rules to determine authorization.
- AccessDeniedException: An exception that is thrown when a user is denied access to a resource.
- RequestMatcher: An interface that matches requests to a set of rules to determine authorization.
This is real Spring Security’s Authorization Flow
I just want you to grap the whole idea about Authorization in this Post.
'Spring security' 카테고리의 다른 글
#1. Understanding about Authentication component of Spring Security (0) | 2023.03.16 |
---|---|
#2. Understanding about Authentication component of Spring Security (0) | 2023.03.16 |