storj/satellite/satellitedb/dbx/identity.dbx
Egon Elbre 4a6e34bb2c satellite/satellitedb/dbx: document peer_identity table
Change-Id: I112ef00cb80638a8168dd46a531522b0785b537a
2023-02-24 14:06:46 +00:00

37 lines
885 B
Plaintext

// peer_identity is a cache for storagenode certificates.
model peer_identity (
key node_id
// node_id refers to storj.NodeID.
field node_id blob
// leaf_serial_number is the certificate serial number.
field leaf_serial_number blob (updatable)
// chain is the x509 certificate as ASN.1 DER.
field chain blob (updatable)
// updated_at is the time it was last updated.
field updated_at timestamp ( autoinsert, autoupdate )
)
create peer_identity ( noreturn )
update peer_identity (
where peer_identity.node_id = ?
noreturn
)
read one (
select peer_identity
where peer_identity.node_id = ?
)
read one (
select peer_identity.leaf_serial_number
where peer_identity.node_id = ?
)
model revocation (
key revoked
field revoked blob
field api_key_id blob
)
create revocation ( noreturn )