Spring-Security-101 Flashcards
Which min java version is required for Spring security?
8
What is the artifactid for spring security?
spring-boot-starter-security
What is full form of CSRF?
Cross Site Request Forgery
What is Synchronizer Token Pattern?
It requires that each http request must contain random token name csrf
How can an eavesdropper cannot read the csrf token?
Because it is encryted and also the same origin policy restricts
What is a Same Site attribute in cookies?
This attributes has two values , String and LAx
The Strict says the cookin must come from the same site, or else cookie wont be included, Lax says the request could come from the top level domain
In case because of Samesite attribute, the cookin is not included, how will it save the CSRF attack?
As cookies has the sessionid included, since the cookie wont be inculded in case of not the same site. Thus the absence of session id .
How we can let the MPfile to be uploaded with csrf security?
We can use the CSRF attache din Body ( this ill lead to upload and read the temporary file) or in URL param(not recommended)
What is the role of cache headers i it?
By default the caching is disabled for all sorts of http request and resources, but yes can be tweaked.
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
What is content-sniffing?
There are many browsers like that reads the content-type first of the resources send for a bettter UX.
What is the issue associated with content-sniffing?
It will help attackers to post an XSS attack
What is XSS?
Cross-Site Scripting
How does SSecure safeguards the content-sniffing?
Bu adding the http header: X-Content-Type-Options: nosniff
What is the full form of HSTS?
Http Strict Transport Security
What is HSTS?
So it hap[pens when a user has typed without https, this will add the site to the browser by default https prptocol list