Skip to content

SEC-1962: add cache-ref to authenticaiton-provider, add allow-empty-authorities to java-user-service #2187

Closed
@spring-projects-issues

Description

@spring-projects-issues

Xu Huisheng (Migrated from SEC-1962) said:

add cache-ref to <authenticaiton-provider>

At this time, we could use the cache-ref attribute in user-detail-service. It seems to create a new instance of CacheUserDetailsService to cache the UserDetails, but if you only set userCache of JdbcDaoImpl, it will cause an Exception. Because JdbcDaoImpl will evict the password, so if the same user do logout, and try to login again, it will said that the credencial is not correct, then the user cannot login the system since the cache expired.

So the cache-ref of user-detail-service is confused, although it will be set to DaoAuthenticaitonProvider, but create a CacheuserDetailService is such a waste. So I wish there would be a cache-ref for authentication-provider to do same thing, and more meaningful.

add allow-empty-authorities to <java-user-service>

If the login user has no authorities, there will always throw an UserNotFoundException, I wish there could be an attribute to control whether we should throw an exception. so add allow-empty-authorities to do such thing.

The pull request is here: #7

Please review it. Thank you very much.

Metadata

Metadata

Assignees

Labels

in: configAn issue in spring-security-configin: coreAn issue in spring-security-corestatus: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementtype: jiraAn issue that was migrated from JIRA

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions