Q6: Decentralised Web Authorization / Blockchain (L7-9) Flashcards

(27 cards)

1
Q

What is the purpose of OAuth 2.0?

A

It allows a Resource Owner (RO) to delegate limited access to their resources to a Client
(C) without sharing their credentials — using tokens issued by an Authorisation Server
(AS) and consumed by a Resource Server (RS).

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

Who are the four participants in the OAuth 2.0 workflow?

A
  1. Resource Owner (RO): The user who owns the data.
  2. Client (C): The application requesting access on behalf of the RO.
  3. Authorisation Server (AS): Authenticates the RO and issues tokens.
  4. Resource Server (RS): Hosts the resource and validates the access token.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the key steps in the Authorization Code Workflow?

A
  1. Client → RO: Client presents a login/authorization URL.
  2. RO → AS: User authenticates with the Authorisation Server and approves access.
  3. AS → C: AS redirects to the client’s redirect URI, including an authorization code.
  4. C → AS: Client exchanges the authorization code (and its client secret) for an access token.
  5. C → RS: Client sends the access token to the Resource Server to access the resource.
  6. RS → C: Resource Server validates the token and provides access.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why is this called the “authorization code” flow?

A

Because the authorization code serves as an intermediate credential, keeping the access token secure — it’s exchanged server-to-server, not exposed in the user’s browser.

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

What is a redirection URL and why is it important?

A

It tells the Authorisation Server where to send the user (and authorization code) after they approve the app.
It must be registered and match exactly to prevent interception or redirect attacks.

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

Which participant registers and validates the redirect URL?

A

The Client registers it.

The Authorisation Server validates it during authorization.

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

Why must redirection URIs use HTTPS?

A

Because they carry sensitive data (authorization codes or tokens) that could otherwise be stolen.

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

What differs in the implicit grant flow?

A

The authorization code step is skipped.
The access token is delivered directly to the client via the browser’s URL fragment.

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

When is the implicit grant used?

A

When the client cannot store secrets securely — e.g., JavaScript single-page apps or mobile apps.

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

What are the security consequences of using the implicit flow?

A

Tokens are exposed to the browser and possibly logs.

No client authentication (no secret presented).

Higher risk of token theft — hence, PKCE (Proof Key for Code Exchange) is now preferred.

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

Can transactions in a public blockchain (like Bitcoin) ever be considered truly permanent?

A

Not immediately.
Transactions are considered confirmed after they appear in a block that is followed by several additional blocks (typically 5–6).
Persistence is probabilistic — the longer the chain after a block, the harder it is to replace it.

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

What mechanism enforces persistence?

A

The longest chain rule — nodes always consider the longest valid chain as the canonical ledger.

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

What happens when miners detect a blockchain fork longer than their current one?

A

They switch to mining on the longest fork, discarding their shorter one.

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

Why is it in a miner’s interest to follow the longest fork?

A

Because only the longest chain is accepted network-wide — mining on a shorter chain wastes computational effort and forfeits block rewards.

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

What causes forks?

A

Simultaneous block discoveries, network delays, or intentional attacks (e.g., selfish mining).

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

Why does Bitcoin tolerate a lower fraction of malicious nodes (< 33%)?

A

Because in Proof-of-Work, influence depends on computational power, not just node count.
Consensus is achieved as long as honest miners control >50% of total hash power.

17
Q

Why do even centralised organisations use consensus algorithms like Paxos or Raft?

A
  1. Reliability and fault tolerance: Ensures consistency even if some servers fail.
  2. Atomic broadcast: Guarantees all nodes process updates in the same order.
  3. Coordination for distributed systems: Tools like ZooKeeper, etcd, and Kubernetes use consensus for leader election and configuration replication.
18
Q

How do these differ from blockchain consensus?

A

They operate in trusted, closed environments (no malicious nodes), so they can use faster, simpler algorithms (CFT instead of BFT).

19
Q

What is Proof-of-Work (PoW)?

A

A consensus mechanism where miners must solve a computationally expensive hash puzzle — proving they expended real effort — to add a block.

20
Q

Why is PoW secure?

A

Because rewriting history would require redoing the proof-of-work for all subsequent blocks — computationally infeasible without majority control.

21
Q

What is Proof-of-Stake (PoS)?

A

Validators are chosen based on the cryptocurrency they “stake.” Misbehavior risks losing that stake, aligning incentives toward honesty.

22
Q

What is the key environmental difference between PoW and PoS?

A

PoW consumes large amounts of energy; PoS requires only staking and verification, making it more sustainable.

23
Q

What is Proof-of-Space?

A

A system where users prove they have allocated a certain amount of storage space (instead of computation) — e.g., “graph pebbling” methods.

24
Q

What is the goal of Web3?

A

To build decentralised applications (dApps) that don’t depend on central authorities — leveraging blockchains, peer-to-peer networks, and smart contracts.

25
What technologies underpin Web3?
Blockchain for distributed trust. IPFS (InterPlanetary File System) for decentralised storage. Smart contracts (e.g., Ethereum Virtual Machine) for programmable transactions.
26
What is IPFS?
A content-addressed peer-to-peer file system — retrieves files by their cryptographic hash rather than location.
27
What are two limitations of Web3 systems?
1. Still depend on infrastructure (hardware, ISPs, power). 2. Hard to govern — vulnerabilities often require central intervention (as with Ethereum DAO hack).