2.3.3

Authentication & Contingencies

Test yourself on Authentication & Contingencies

Test your knowledge with free interactive questions on Seneca — used by over 10 million students.

Authentication and Contingencies

Two very important elements of defensive design are authentication and contingency planning.

Authentication

Authentication

  • Authentication is the process of checking that a person or system is authorised to use a system.
  • The most common form of authentication is to require users to enter a username and password.
  • Once a user has authenticated themselves, they should be able to see data relevant to themselves and no one else.
Contingency planning

Contingency planning

  • It is impossible to predict all possible cases of misuse, but there are ways to help reduce errors. For example:
    • Providing helpful prompt messages.
    • Providing error-recovery routes (e.g. an undo feature).
    • Preventing access from certain parts of the system.
    • Using exception handling.

Exceptions

Rather than leaving the program to crash when an error happens, exceptions give us a chance to handle the error more gracefully.

Exceptions

Exceptions

  • When an error arises in a program, the program is said to 'throw' an exception.
  • An exception is a description of the error that arose.
  • Exceptions can be 'caught' or handled rather than allowing the program to crash.
Handling exceptions

Handling exceptions

  • If an exception can be dealt with internally, then we can catch the exception and continue with the program.
  • This is done using a structure as below:
    • try: ---
    • except: ---
  • The code within the try block will be executed.
    • If an exception is thrown inside the try block, then the except block will be run to 'clean up' after the exception.
Jump to other topics
1

Computer Systems

1.1

Systems Architecture

1.2

Memory & Storage

1.3

Computer Networks, Connections & Protocols

1.4

Network Security

1.5

Systems Software

1.6

Ethical, Legal, Cultural & Environmental Concern

2

Computational Thinking, Algorithms & Programming

2.1

Algorithms

2.2

Programming Fundamentals

2.3

Producing Robust Programs

2.4

Boolean Logic

2.5

Programming Languages & IDEs

Practice questions on Authentication & Contingencies

Can you answer these? Test yourself with free interactive practice on Seneca — used by over 10 million students.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
Answer all questions on Authentication & Contingencies

Unlock your full potential with Seneca Premium

  • Unlimited access to 10,000+ open-ended exam questions

  • Mini-mock exams based on your study history

  • Unlock 800+ premium courses & e-books

Get started with Seneca Premium