Identities
Identities keys are the digital IDs that identify actors. You can think of actors identity keys as users authentication credentials. But hey, DefraDB is a discrimination-free database – who says that users are the only entities acting on the database? Whales act too.
In DefraDB, identity keys are hex-encoded, of type either secp256k1 or ed25519. The keys authenticate all CLI/HTTP requests when Document Access Control or Node Access Control is enabled.
Generate identities
Generate a new identity with the CLI command defradb identity new. You will need the PrivateKey to authenticate in CLI commands and HTTP requests.
defradb identity new
{
"PrivateKey": "b17a7b973f629b900cf23654db9c4be935f90281707dd3e2cd7a56bdd2c1bf4f",
"PublicKey": "0363f224bfddb641bd0cd4b5409bc921c405460727f864f6dba33da5dd7b061bcf",
"DID": "did:key:z7r8oqUcSm6xwwxfpBZ5R6CWQiPRnYpXouwgeXkbWgVcWBF19QDndBBWzgHcvvHhaUe7qcTz7ayJVXksND37rvV7GAUAv",
"KeyType": "secp256k1"
}