Spring security allows you to configure authorization based upon authority and rules.
Let's try to see what is authority and what is rule and what's the difference between them.
So when we say granting authority or authority, it's a single individual privilege or permission,
we can say the user has read only access are we have to delete access.
So in this scenario, read they delete all these are authorities using authorities.
We can restrict access in fine grained manner, whereas the rule is a group of authorities and privileges.
You can group authorities into a single role.
You may have a requirement in your application that you don't want to go with authorities or want to
change the rules inside my application, like admin, normal user, supervisor, employer, employee.
So for all scenarios, we can also have rules configured using spring security and flight rules.
We can have it group of privileges using rules.
We can restrict access codes.
Great demanded.
The names that you give for authorities are rules.
They're arbitrary in nature.
You don't have to follow that.
What I'm showing in this line, you can have whatever authority you want instead of read.
I can say only the update.
I can say create similarly for rules.
Also, instead of admin, I can say Superman instead of user, I can say customer.
So it's up to your business requirement.
So whatever you mentioned in the database and in security configurations, they have to match that the
names are up to us.
And the way how these rules and authorities works are very similar in nature.
In spring security, there is no difference on how you configure authorities and rules except the third
names to differentiate whether these are an authority or roll.
Usually we have to give you a prefix and this code for all roles which indicates to the spring security,
OK, this is a rule, whereas without this prefix will be treated as a priority.
So now we know what is authority, what is the rule.
Let's try to understand in the next video how to configure rules inside database and how to configure
them inside our application using spring security framework.
And one by.