kubeguard / guard

🔑 Kubernetes Authentication & Authorization WebHook Server
https://kubeguard.dev
Apache License 2.0
593 stars 81 forks source link

Fix expiration pop token duration option #368

Closed julienstroheker closed 1 year ago

julienstroheker commented 1 year ago

Currently conversion PoPTokenValidityDuration is not acting as expected.

When passing a duration such as 15m current code was multiplying 15m (900000000000) with time.Minute (60000000000) with was causing very high expiration date non expected.

This fix assumes options are set using a proper time.Duration and respect it down to the pop token verification with any conversion in between.

AzureMarker commented 1 year ago

@tamalsaha Can you make a new release for this?

tamalsaha commented 1 year ago

https://github.com/kubeguard/guard/releases/tag/v0.15.1