Home » Tag Archives: Spring Security

Tag Archives: Spring Security

Grails with Spring Security

1. Overview of Spring Security Integration with Grails Spring Security touts a number of authentication, authorization, instance-based, and various other features that make it so attractive to secure applications with. With this in mind, due to Grails use of Spring’s Inversion of Control Framework and MVC setup, developers sought to use Spring Security to secure Grails. This has resulted in ...

Read More »

Expression-Based Access Control

spring-interview-questions-answers

1. Overview Today, we’ll be reviewing the differences between Expression-Based Access Control (EBAC), Role Based Access Control (RBAC), and Attribute Based Access Control (ABAC), with a deeper focus on EBAC. 2. What is Expression-Based Access Control? Simply put, Expression-Based Access Control is the use of expressions to write authorization. The phrase Expression-Based Access Control (EBAC) is currently most commonly associated ...

Read More »

Caching in Spring Boot with Spring Security

java-interview-questions-answers

In this post, I’d like to share a lesson learned by one of the teams at O&B. They were using Spring Boot with Spring Security. By default, anything that is protected by Spring Security is sent to the browser with the following HTTP header: Cache-Control: no-cache, no-store, max-age=0, must-revalidate Essentially, the response will never be cached by the browser. While ...

Read More »

Spring Security with Spring Boot 2.0: Securing your endpoints

spring-interview-questions-answers

Up until now in our previous posts we had our endpoints and controllers secured using the default spring security configuration. When Spring Security is on the classpath, the auto-configuration secures all endpoints by default. When it comes to complex applications we need different security policies per endpoints. We need to configure which endpoints should be secured, what type of users ...

Read More »

Authorizing Resources Based On Who Created Them

java-interview-questions-answers

A colleague of mine pointed me to an interesting question on StackOverflow and suggested it may be a good one for me to answer because of my experience with Spring. The question was, “How to authorize specific resources based on users who created those in REST, using annotations.” The gist of it is this: What I’m trying to do is ...

Read More »

Secure a Spring Microservices Architecture with Spring Security and OAuth 2.0

spring-interview-questions-answers

“I love writing authentication and authorization code.” ~ No Java Developer Ever. Tired of building the same login screens over and over? Try the Okta API for hosted authentication, authorization, and multi-factor auth. Every developer wants to build faster and more efficiently, to support scale. Building a microservices architecture with Spring can add resilience and elasticity to your architecture that ...

Read More »

Spring Security with Spring Boot 2.0: UserDetailsService

spring-interview-questions-answers

As we have seen on a previous post the username and password for our spring application was configured through environmental variables. This is ok for prototype purposes however in real life scenarios we have to provide another way to make the users eligible to login to the application. To do so we use the UserDetailsService Interface. The user details service ...

Read More »