Security Flashcards

1
Q

What is Public Key Cryptography?

A

Form of Message Secrecy in which a user creates a public key and private key, the private key is kept secret and the public key is distributed. The public key can encrypt data and the private key decrypts.

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

How do you set up SQL Server to use certificates?

A

Under SQL Server Configuration Manager
SQL Server Network Configuration
Protocols for MSSQLSERVER - Force Encryption - YES

Certificate tab:
Choose certificate

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

What is a loginless user used for?

A

It allows for setting up security and using it through EXECUTE AS

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

What is the syntax for creating a loginless user?

A

CREATE USER [USERNAME] WITHOUT LOGIN WITH DEFAULT_SCHEMA=[SCHEMA]

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

What are contained users?

A

Users that can authenticate specifically to the database. They do not have logins.

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

How do you set up a database to allow contained users?

A

sp_configure ‘contained database authentication’, 1
go
reconfigure
go

Then set the containment type to partial.

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

What is the syntax to create a contained user?

A

CREATE USER [USERNAME] WITH PASSWORD=N’STRONG_PASSWORD’

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

What is cross db ownership chaining?

A

When all object owners are mapped to the same login account then you can grant access to objects in multiple databases.

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

How do you enable cross db ownership chaining?

A

ALTER DATABASE Database1 SET DB_CHAINING ON;

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

Does cross db ownership chaining work with dynamic SQL?

A

Only if the user exists in both databases.

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

What is Symmetric Encryption?

A

Where the sender and receiver have the same key to encrypt and decrypt

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

What is the drawback to using Symmetric Encryption?

A

It’s very difficult to get the keys to both parties without losing integrity of the keys

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

What is Asymmetric Encryption?

A

The sender uses a public key that is generated from a private key that they can encrypt the data with and then send to the receiver who unencrypts it with the private key.

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

What is the downside to Asymmetric Encryption?

A

It’s more resource-intensive

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

What is a Certificate?

A
  • Asymmetric key pair
  • Public key contains identity information
  • Can be signed by certificate authority to prove authentication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the first step needed before being able to use encryption?

A

You have to create a MASTER KEY in the database (actual database, not master)

CREATE MASTER KEY
ENCRYPTION BY PASSWORD = ‘@ v3ry str@ng p@ssw0rd!’

17
Q

What is transparent database encryption?

A

Full encryption of the database files and log

18
Q

How is Transparent Database Encryption set up?

A
  • Create DMK in Master
  • Create a certificate in Master
  • Create a database encryption key in your database
  • Set encryption on your database
19
Q

What is a DMK?

A

Database Master Key

20
Q

What is DEK?

A

Database Encryption Key