canvas-lms/lib/pandata_events
Xander Moffatt 7d41512c10 correctly set ttl for pandata events auth tokens
why:
* a JWT's exp is "the datetime at which this token will expire"
but the Redis TTL is "the number of seconds until this expired"
* confusing those two means that pandata events auth tokens
are getting cached for 40+ years instead of 1 day,
creating auth errors
* bump the cache key to reset it

closes INTEROP-8561
flag=none

test plan:
* run this in the rails console:
```
sub = 2
service = PandataEvents::CredentialService.new(prefix: :canvas)
service.auth_token(sub)
Canvas.redis.ttl("pandata_events:auth_token:CANVAS_LMS:2:1")
```
* that should return a number that is less than the number
of seconds in one day (86400)
* decoding the JWT returned by `auth_token` should show
an `exp` that is an epoch time for roughly 1 day from now

Change-Id: I4f8dae96f94c46adb8f49bc5b64eb3690811ca9d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344984
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2024-04-10 18:25:14 +00:00
..
credential_service.rb correctly set ttl for pandata events auth tokens 2024-04-10 18:25:14 +00:00
errors.rb