HomePhabricator
Diffusion Comm f45d933ef293

[identity] add ttl to nonces tables

Description

[identity] add ttl to nonces tables

Summary:
Added an expiration time as an RFC 3339 date-and-time string and as a UNIX timestamp to DynamoDB. I added the RFC 3339 version to preserve precision, since UNIX timestamps only go to the second. Open to removing it, though.

The UNIX timestamp lets us set a TTL on the DDB table with Terraform (see next diff). DynamoDB will then remove expired nonces, saving us from having to implement a cron job ourselves.

Depends on D8825

Test Plan: verified that the expirationTime and expirationTimeUnix attributes appeared in my local DDB table.

Reviewers: jon, bartek

Reviewed By: bartek

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D8830

Details

Provenance
varunAuthored on Aug 15 2023, 8:57 PM
Reviewer
bartek
Differential Revision
D8830: [identity] add ttl to nonces tables
Parents
rCOMMcaa2afbd43be: [identity] helper functions to interact with nonces table
Branches
Unknown
Tags
Unknown