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.
r
That was speedy @Charith (Cerbos) 🙂 🚀 Thanks
🙏 1
Nice touch with global and local
c
Thanks for raising the issue. We'll try to get a new release out soon.
👍🏻 1
a
r
As soon as I saw it in #C0286P04ZBR it went straight out to prod 😄
👍 1
thanks for coming back to me here, appreciated 🙇🏻