For policies that have a time based element to the...
# community
r
For policies that have a time based element to the condition, for example
timestamp(P.attr.some_claim).timeSince() < duration("1h")
. Is there a good way to make those policy tests deterministic?
P.attr.some_claim
is hardcoded RFC3339 in the test &
timeSince()
uses the current server time.
c
Unfortunately, no. Thanks for raising it though. It's certainly useful to be able to control the time during tests.
r
👍🏻 want me to add an issue?
c
Sure. Go ahead.
That was speedy @Charith (Cerbos) 🙂 🚀 Thanks
Nice touch with global and local
c
Thanks for raising the issue. We'll try to get a new release out soon.
a
r
As soon as I saw it in #announcements it went straight out to prod 😄
thanks for coming back to me here, appreciated 🙇🏻