traefik-plugins / traefik-jwt-plugin

Traefik plugin which checks JWT tokens for required fields. Supports Open Policy Agent (OPA) and signature validation with JWKS
Apache License 2.0
98 stars 34 forks source link

Cancel old BackgroundRefresh if config is reloaded #68

Closed simonpahl closed 6 months ago

simonpahl commented 7 months ago

This PR cancels BackgroundRefresh goroutines in the case when a plugin is instantiated with the same name. This happens e.g. when a watched config has a change.

This will not prevent the leak if the Plugin is deleted from a config or will be renamed, but it will prevent leaks from changes in a config that have nothing to do with the plugin.

eshepelyuk commented 7 months ago

@simonpahl is this ready for review or keeping it in draft is intentional ?

eshepelyuk commented 6 months ago

@simonpahl is this ready for review or keeping it in draft is intentional ?

@simonpahl ?

simonpahl commented 6 months ago

sorry i was not available for a week

eshepelyuk commented 6 months ago

sorry i was not available for a week

plz adjust commit message, so corresponding #67 will be closed after merging this

simonpahl commented 6 months ago

I mentioned the issue number in the commit. Will this suffice?

eshepelyuk commented 6 months ago

I mentioned the issue number in the commit. Will this suffice?

no, its not enough for auto closing

https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword

eshepelyuk commented 6 months ago

Thanks @simonpahl Available in 0.8.1