Security Flashcards

(10 cards)

1
Q

What is authentication vs authorization?

A

Authentication verifies who you are (login with username/password). Authorization determines what you’re allowed to do (permissions and access control).

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

What is OAuth 2.0?

A

OAuth 2.0 is an authorization framework that allows third-party applications to access user resources without sharing passwords. Uses access tokens with limited scope and lifetime.

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

What is JWT (JSON Web Token)?

A

JWT is a compact, self-contained token for securely transmitting information between parties. Contains header, payload, and signature. Used for authentication and information exchange.

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

What is rate limiting?

A

Rate limiting restricts the number of requests a user can make in a time window. It prevents abuse, DDoS attacks, and ensures fair resource usage. Common algorithms: token bucket, leaky bucket.

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

What is HTTPS and why is it important?

A

HTTPS encrypts HTTP traffic using TLS/SSL. It ensures data confidentiality, integrity, and authentication. Prevents eavesdropping, tampering, and man-in-the-middle attacks.

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

What is SQL injection?

A

SQL injection is a security vulnerability where attackers insert malicious SQL code through input fields. Prevention: use parameterized queries, input validation, and ORMs.

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

What is XSS (Cross-Site Scripting)?

A

XSS allows attackers to inject malicious scripts into web pages viewed by other users. Prevention: sanitize user input, encode output, use Content Security Policy headers.

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

What is CORS (Cross-Origin Resource Sharing)?

A

CORS is a security mechanism that controls how web pages from one domain can access resources from another domain. Prevents unauthorized cross-origin requests in browsers.

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

What is a DDoS attack?

A

Distributed Denial of Service attack overwhelms a system with traffic from multiple sources, making it unavailable. Mitigation: rate limiting, traffic filtering, CDN, auto-scaling.

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

What is encryption at rest vs in transit?

A

At rest: encrypting data stored on disk (databases, files). In transit: encrypting data being transmitted over networks (HTTPS, TLS). Both are needed for comprehensive security.

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