Skip to content

Provide a TaskScheduler variant for DelegatingSecurityContextExecutor #6043

Closed
@snicoll

Description

@snicoll

Summary

Spring Security provides a DelegatingSecurityContextRunnable abstraction for Runnable that can be used for async and scheduled tasks. The primary contract for task scheduling is TaskScheduler and there's no such wrapper available at the moment.

Actual Behavior

Users are configuring a DelegatingSecurityContextScheduledExecutorService for support of @EnableScheduling which is not the primary contract that @EnableScheduling expects.

Expected Behavior

Spring Security provides a TaskScheduler variant or the documentation routes users to expose a TaskScheduler bean rather than exposing a ScheduledExecutorService bean.

This relates to spring-projects/spring-boot#15032 - Spring Framework considers ScheduledExecutorService as a fallback of the primary TaskScheduler API. It would be nice if Spring Security aligns to that, either in code or in guiding users in the documentation.

Metadata

Metadata

Assignees

Labels

in: coreAn issue in spring-security-corestatus: first-timers-onlyAn issue that can only be worked on by brand new contributors

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions