As I continue to play with JHipster, I've run into an issue of getting liquibase to work with my development database. Out of the box, I decided to use in-memory H2 as a dev database and MySQL in production. This seemed reasonable when I started, but I quickly discovered that if I try to add a change set to load data into my database using liquibase, it doesn't work with in-memory H2. It looks like liquibase is only going to work with more persistent databases.
I have spent a lot of time recently trying to understand the difference between Authority and Role in Spring Security. This is a brief review of what I found. When creating a UserDetailsService or overriding configure(AuthenticationManagerBuilder auth) in the security config class that extends WebSecurityConfigurerAdapter, I basically get complete control over what I populate inside of the UserDetails that is used/returned. This is important because the UserDetails interface really only cares about how to return one thing: Collection<? extends GrantedAuthority> getAuthorities(); A GrantedAuthority just seems like a glorified String wrapper that names some thing. The question is... what is that thing? This is where the subtle difference between Authority and Role comes into play. I think that Role is an older thought/construct that automatically gets plugged into Authority if we just create a user with a Role. But completely forget about the code a...
Comments
Post a Comment