express auth study Flashcards

1
Q

What is the purpose of the JWT signature?

A

JWTs don’t make the data unavailable. A JWT signature is generated from the header, payload and a secret key to ensure that no malicious actor has tampered with the data. It is impossible to generate a valid signature without a secret key.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What’s the purpose of auth tokens?

A

An application uses the access token to gain access to the user’s data from the service API. Auth tokens do not have encryption or decryption properties.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What’s OAuth?

A

A protocol that allows internet users to grant applications access to their information via a trusted third party.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is hashing?

A

Hashing is the process of converting a message of any length into a short, fixed-length string. Hashed values cannot be translated back to their original input values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a rainbow attack?

A

A rainbow attack involves hashing common passwords and searching for the results in a database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What’s a cryptographic salt?

A

A salt is a small, random string or set of bits that gets appended to a user’s password before hashing it, making rainbow attacks very impractical.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What’s Symmetric encryption?

A

Symmetric encryption uses one value to determine how to encrypt and decrypt data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is REST?

A

Representational State Transfer. It is not a standard, it’s just a convention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does JWT stand for?

A

JSON Web Token

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

HTTP request methods?

A
GET - Requests a resource
POST - Creates a resource
PUT - Updates a resource
PATCH - A partial modification to a resource
DELETE - Deletes the specified resource
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

For an Album model, write RESTful endpoints to handle: 1) getting all the resources, 2) creating a single resource, 3) updating a single resource and 4) deleting all resources.

A

get all resources -> GET /albums
creating a single resource -> POST /albums
updating a single resource -> PATCH /albums/:id
deleting all resources -> DELETE /albums

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

express.json( )

A

Built-in middleware that allows you to parse the body of an HTTP request containing data formatted in json.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What’s an express-bearer-token?

A

Express middleware package that extracts a bearer token from a request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Express middleware package to implement Cross-site Resource Sharing

A

cors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Difference between Authentication and Authorization

A

Authentication is the process of identifying an actor given known credentials

Authorization is the process of checking privileges for an identified actor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Bcrypt

A

Bcrypt is a strong password hashing algorithm

17
Q

Asymmetric encryption

A

Asymmetric encryption uses two keys, a public key to encrypt and a private key to decrypt