M362 - Unit 10 Flashcards Preview

M362 - Unit SAQs > M362 - Unit 10 > Flashcards

Flashcards in M362 - Unit 10 Deck (26)
Loading flashcards...
1
Q

What type of interference is taking place if Alice alters Bob’s file without permission?

A

Modification

2
Q

What type of interference is taking place if a hacker deploys software to observe packets travelling on a network?

A

Interception

3
Q

What type of interference is taking place if a website receives a flood of requests for a web page, preventing callers from viewing the site?

A

Interruption

4
Q

What type of interference is taking place if a user receives an email appearing to be from his supervisor, who did not send the email?

A

Fabrication

5
Q

How many possible Caesar ciphers are there in English?

A

Assuming a 26-character alphabet (ignoring, for example, punctuation), there are 25
possible substitutions.

6
Q

How would you decode an English message encoded in ROT13, assuming a 26-character alphabet?

A

You would apply the same function again! The cipher is its own inverse. Two shifts of 13 return you to your starting point in the English alphabet.

7
Q

Why is public key cryptography called asymmetric and private key cryptography called symmetric?

A

In public key cryptography there are two different keys, the public key and private key, one used for encryption and the other for decryption. In private key cryptography there is one key, the secret key suitable for both encryption and decryption.

8
Q

What classes of cipher might you be likely to use for storing passwords in a local file?

A

Hash

9
Q

What classes of cipher might you be likely to use for proving you sent an email?

A

Public key and hash (for signing)

10
Q

What classes of cipher might you be likely to use for using a wireless connection on your laptop?

A

Stream

11
Q

What classes of cipher might you be likely to use for encrypting files on a file system?

A

Block

12
Q

What is a secure channel?

A

A secure channel is a communication channel between a pair of processes that can authenticate each other and provides confidentiality and integrity services, including time stamping.

13
Q

Give an example of a handshake in SSL.

A

Cipher negotiation and certificate exchange.

14
Q

Why would a class loader check for overriding of final methods, when this check is already performed by a compiler before producing a class file?

A

The class loader is examining bytecode, which could have been altered since compilation.

15
Q

Why would a security policy require that the security manager could only be set once?

A

This means that another manager cannot be substituted, so the ways in which checks are performed cannot be altered.

16
Q

State the two steps required to implement permissions-based security for an application.

A
  1. A security manager must be installed for the application, either on the command line
    or in the code. 2 A policy must be specified, either dynamically (by executing some code) or statically (using default policy files or a specified policy file).
17
Q

Explain the purpose of the following entry in a policy file. Identify the target and the
action.
grant codeBase “http://www.gggg.com”
{
permission java.io.FilePermission “C:\database.dat”, “read”;
};

A

This is a policy entry granting FilePermission to code from the code base http://www.gggg.com, allowing that code to carry out “read” actions on the file
database.dat.

18
Q

In the following scenario, identify possible subject(s) and principal(s): “Jane Doe wishes to make an online purchase. Jane will first need to authenticate
herself to her computer by logging in. Once online, she logs in to her shopping website account and makes a purchase using her credit card. Later she visits the website of the department of motor vehicle licences and enters her driving licence number to check that her contact information is correct.”

A

The user Jane is the subject. The principals are her user IDs for her computer and for the online shop. (The passwords in each case are credentials used to authenticate her.) Another principal is the driving licence number Jane used to login to the motor vehicle licensing website.

19
Q

Why would you normally want to implement the equals method of an implementation of Principal?

A

You need to implement equals so that the system can compare one principal to another. If you do not do this, your principal will inherit equals from Object, and equality will be determined based on principal references rather than their contents.

20
Q

Why do you think the PrivilegedAction interface is required?

A
An instance of a class implementing the PrivilegedAction interface encapsulates and demarcates the work to be done with a set of privileges. This means that there is less chance of accidentally invoking code with certain privileges, and also it is clear when that set of privileges stops applying and we go back to using the
thread’s context.
21
Q

Distinguish between a subject and a principal.

A

A subject is an entity that can be authenticated, that is, a source of a request to perform some action. A principal is an identity associated with an authenticated subject.

22
Q

What is the purpose of a login module in JAAS?

A

A login module implements a method of authentication, such as biometric scanning or prompting a user for a login and password. A commit method is used to associate credentials with a subject.

23
Q

When would you use the method doAsPrivileged?

A

You would use this method when you want to execute code with the permissions associated with a particular principal. You can grant a principal permissions in a policy file, and this principal can be associated with a subject on authentication.

24
Q

What steps are taken when a protected web resource is accessed?

A

At this point (if lazy authentication is used) the caller must be authenticated. If successful, this results in the server storing credentials for the caller in a session context. The credentials are subsequently used to decide if the caller may access the protected resource, using a principal or role (see below for a discussion of roles).

25
Q

What is a role and how does it relate to users of a system?

A

A role is a name for a kind of caller and can be used to authorise actions. Users can be mapped to groups or roles so that the permissions applied to the roles apply to those users. Thus, a programmer does not have to know the users of a system, just the different roles of users of a system.

26
Q

Explain the difference between declarative and programmatic security.

A

In declarative security, security roles and restrictions on the execution of code are established using entries in XML deployment descriptor files. In programmatic security, roles and restrictions are established using Java code.