Authentication Flashcards
(45 cards)
- __________ is the process of verifying that someone is who they say they are.
- Involves granting access to resources based on someone’s identity.
Authentication
Reasons for authentication
- Saving client-client data
- Customizing User Experience
- Authorization / Usage Control
True or False
Authentication and Authorization are the same. They are used in conjunction with each other.
False
Authentication and Authorization are related, but different concepts. They are used in conjunction with each other.
True or False
Authorization can’t happen without authentication. A user can be authenticated, but not authorized to access a particular resource.
True
What do we need for authentication?
1. Credentials
an identity and an authentication factor
e.g. username and password OR email and password authentication can be multi-factor
e.g one-time-pin sent through email or an app (aside from the actual password)
<br></br>
2. Authentication token or session id from the server.
used for subsequent requests that require authentication
True or False
After a user logs in, they shouldn’t have to authenticate again.
False
After a user logs in, they shouldn’t have to authenticate again until they log out or the session expires.
Servers ‘remember’ users with the use of ________ or sessions.
cookies
2 kinds of auth
- Token Based Auth
- Session-Based Auth
The authenticating server gives out tokens to clients.
Token-based authentication
A ________ is a string of data.
token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ey JzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva G4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKx wRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Sample token
________ can be used for things other than authentication (holding identity data, getting more auth tokens, etc.)
They are a generic medium of information
Tokens
A 1. ________ message means that its origin can be verified. An 2. ________ message means that only its intended recipient can read it.
- signed
- encrypted
True or False
Clients do not necessarily send an auth token with every request that needs authentication.
False
Clients send an auth token with every request that needs authentication.
True or False
- The authenticating server issues tokens when clients log in.
- However, it doesn’t keep track of logged in users.
- The server only checks the validity of submitted tokens (not yet expired, untampered).
True
- In ________________, the server keeps track of a list of active sessions. It gives logged in users a session id (usually in a cookie).
- Users use their session ID to maintain their logged in state as they use the web app.
Session-based auth
Heavy lifting is done server-side. The ________ keeps all the session data.
<br></br>
vs. Token-based: all ‘session info’ can be kept in the token.
server
True or False
Credentials are sensitive information and should be sent over the network as little possible.
True
True or False
Tokens and Sessions can be revoked to terminate a logged in ‘session’ as needed.
True
A _________ is a small piece of data that the server sends to the user’s browser via a header in the response message.
cookie
- Browsers store this data and, until it expires, include it with all requests sent to the origin server
- Typically used by the server to tell if 2 requests came from the same browser.
Cookies
Uses for cookies
- Session Management
- Personalization
- Tracking
Types of Cookies
- Session Cookies
- Permanent Cookies
Have an expiry date and time set during its creation. They are automatically deleted by the browser.
Permanent Cookies