Skip to the content.

Access Control (ACL)

img

1. When is Basic Authorization used vs. Bearer Authorization?

The Basic and Digest authentication schemes are dedicated to the authentication using a username and a secret (see RFC7616 and RFC7617). The Bearer authentication scheme is dedicated to the authentication using a token and is described by the RFC6750

2. What does the JSON Web Token package do?

A JSON Web Token is used to send information that can be verified and trusted by means of a digital signature. It comprises a compact and URL-safe JSON object, which is cryptographically signed to verify its authenticity, and which can also be encrypted if the payload contains sensitive information

3. What considerations should we make when creating and storing a SECRET?


Vocabulary Terms

Word Definition
Encryption it is a process that convert our passwords to hashed ones, with characters representation. to make our passwords secured. we use the bcrypt library to do this.
Token used in bearer authentication, a token is a cryptic string that is generated by the server in response to a login request
bearer it is an authorization process, that use the header, and create and compare the token for the users, to allow them to reach a certain endpoints or not.
Secret it is a signature for the developer that make his token secure and no one can access his data when his secret is exists.
JSON Web Token it is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object.

Preparation Materials

5 steps to RBAC

RBAC implementation

  1. Inventory your systems
  2. Analyze your workforce and create roles
  3. Assign people to roles
  4. Never make one-off changes
  5. Audit

img

Three primary rules are defined for RBAC

  1. Role assignment: A subject can exercise a permission only if the subject has selected or been assigned a role.
  2. Role authorization: A subject’s active role must be authorized for the subject. With rule 1 above, this rule ensures that users can take on only roles for which they are authorized.
  3. Permission authorization: A subject can exercise a permission only if the permission is authorized for the subject’s active role. With rules 1 and 2, this rule ensures that users can exercise only permissions for which they are authorized.

Resources