You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Marshall T. Rose edited this page Sep 28, 2019
·
1 revision
The Authorization server is a Web application written in node.js running at
AWS.
Recall from earlier discussion that the public key for the
Ed22519 keypair associated with a "Sync Chain" is encoed as a userId.
The client makes the POST /{userId}/credentials request,
with a body consisting of an integer-valued timestamp.
The request is then signed with the private key for the Ed22519 keypair.
The server verifies the signature (using nacl.sign.open) and,
if valid,
ensures that the timestamp is not too far in the past.
On success,
the server returns:
{
aws: {
accessKeyId: string,
secretAccessKey: string,
sessionToken: string,
expiration: string
}
s3Post: {
// This is POST form data to be included with writes to S3.
// For details see AWS docs:
// https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-post-example.html
postData: {
AWSAccessKeyId: string,
policy: string,
signature: string,
acl: string
},
bucket: string
}
}
which contains credentials,
valid for 36 hours,
allowing: