Chapter 14 - Security vs Authentication

0.0(0)
studied byStudied by 1 person
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/27

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

28 Terms

1
New cards

What are the two main aspects of securing a REST service?

Secure transmission (e.g., via HTTPS) and secure access (authentication/authorization).

2
New cards

What does HTTPS protect against?

Interception, tampering, or eavesdropping during data transmission.

3
New cards

Why is secure access more of a concern for developers than secure transmission?

Most attacks come through legitimate access channels, not network-layer exploits.

4
New cards

What protocol is HTTPS based on today?

TLS (Transport Layer Security), not SSL.

5
New cards

Is HTTPS secure?

Yes, if properly configured and used with secure libraries.

6
New cards

What is authentication vs authorization?

Authentication verifies identity; authorization checks what actions a user can perform.

7
New cards

How does Basic Authentication send credentials?

As a Base64-encoded string of username:password in the Authorization header

8
New cards

Why must Basic Authentication always be used with HTTPS?

Because Base64 is easily decodable and not secure on its own.

9
New cards

What is the structure of a Basic Auth HTTP header?

Authorization: Basic <base64(username:password)>

10
New cards

What response does the server send if credentials are missing or incorrect?

HTTP 401 with a WWW-Authenticate header indicating the realm and charset.

11
New cards

How is Base64 encoding different from encryption?

Base64 is just encoding for safe transport, not encryption or secure.

12
New cards

What Java method is used to check credentials in the example?

A method compares the stored Base64 string with the one sent by the client.

13
New cards

What problem does Digest Authentication solve?

It avoids sending plain or Base64-encoded passwords over the network.

14
New cards

What is a nonce in Digest Authentication?

A one-time-use number sent by the server to make each request unique and prevent replay attacks

15
New cards

What hashing algorithm is used in Digest Authentication?

MD5 (though it's outdated and weak).

16
New cards

How is the digest value calculated?

  • HA1 = MD5(username:realm:password)

  • HA2 = MD5(method:uri)

  • Final = MD5(HA1:nonce:HA2)

17
New cards

Why is Digest Authentication more secure than Basic?

It never sends the actual password, just a hash based on it and other request data.

18
New cards

Why is MD5 considered insecure today?

It can be reverse-engineered or collided; it's been compromised since 1996.

19
New cards

What is SQL Injection?

A technique where attackers manipulate SQL queries by injecting malicious input.

20
New cards

How do you prevent SQL Injection?

Use prepared statements or ORM frameworks, not string concatenation.

21
New cards

What two factors are used to assess threat severity?

Impact and likelihood.

22
New cards

How is severity calculated?

Severity = Impact × Likelihood

23
New cards

What does STRIDE stand for?

  • S: Spoofing

  • T: Tampering

  • R: Repudiation

  • I: Information disclosure

  • D: Denial of Service

  • E: Elevation of privilege

24
New cards

What is an example of Spoofing?

Pretending to be another user (e.g., logging in as admin).

25
New cards

What is Information Disclosure?

Gaining unauthorized read access to confidential data

26
New cards

What does DREAD stand for?

  • D: Damage potential

  • R: Reproducibility

  • E: Exploitability

  • A: Affected users

  • D: Discoverability

27
New cards

How is DREAD used?

Each factor is scored, and the total helps determine response priority.

28
New cards

What are the four common responses to a discovered vulnerability?

  • Ignore it (not recommended)

  • Warn users (can be risky)

  • Remove affected feature

  • Fix it (ideal, but requires time and testing)