You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I cannot subscribe to a event LeaseListener from SecretLeaseContainer since Im loading vault properties with spring cloud config.
When Spring cloud vault emit the event about lease, my handler is not executed, the listeners of the class SecretLeaseEventPublisher does not contains my subscription.
Spring boot : 2.6.7
Spring Cloud : 2021.0.1
I have added the dependency spring-cloud-starter-bootstrap, and i use bootstrap.yml file for spring cloud vault configuration
Sample
The class with the subscription
@Slf4j
@Configuration
public class CustomLeasingHandlerConfig {
@Autowired
private SecretLeaseContainer leaseContainer;
@PostConstruct
private void postConstruct() {
leaseContainer.addLeaseListener( (event) -> {
log.info("Event lease listener source : {} and event class : {}",event.getSource(), event.getClass());
});
}
This does not work (my listener is never executed)
If I remove this configuration, i don't have any problems.
For example, this is working but i couldn't add specific vault secret engine as the last configuration :
The application configuration
spring:
config:
import:
- vault://
Is the spring config compatible with spring cloud vault module about the management of SecretLeaseContainer and listeners?
It's like if i couldn't use the same secretleasecontainer in my config and spring cloud Config
The text was updated successfully, but these errors were encountered:
juriohacc
changed the title
Fail to hande event LeaseListener with spring config import
Fail to hande event LeaseListener when using spring config import
May 9, 2022
Describe the bug
I cannot subscribe to a event LeaseListener from SecretLeaseContainer since Im loading vault properties with spring cloud config.
When Spring cloud vault emit the event about lease, my handler is not executed, the listeners of the class SecretLeaseEventPublisher does not contains my subscription.
Spring boot : 2.6.7
Spring Cloud : 2021.0.1
I have added the dependency spring-cloud-starter-bootstrap, and i use bootstrap.yml file for spring cloud vault configuration
Sample
The class with the subscription
This does not work (my listener is never executed)
The application configuration
If I remove this configuration, i don't have any problems.
For example, this is working but i couldn't add specific vault secret engine as the last configuration :
The application configuration
Is the spring config compatible with spring cloud vault module about the management of SecretLeaseContainer and listeners?
It's like if i couldn't use the same secretleasecontainer in my config and spring cloud Config
The text was updated successfully, but these errors were encountered: