Disk encryption key escrow in IPA

From FedoraProject

Jump to: navigation, search

Contents

Change Log

Data in LDAP

Escrow packet storage

Stored in ipaUniqueID=..., cn=volume_keys, dc=.... The following information is stored per each packet:

Attribute Meaning and use Comment
Packet ID ipaUniqueID used in the DN dm-crypt volumes do not carry any identifier for distinguishing even between two volumes on a host
Escrow packet A blob containing the encrypted "secret" Size probably 1000–1500 bytes
Host reference Host this packet applies to
"Secret" type Purpose of the packet: data encryption key / passphrase / other
Volume identification Multi-valued: properties of the volume that can be used to identify the correct packet
Packet filing time Time when this packet was sent to the server Provided by the directory server automatically in creationTimestamp
Obsoletion time If this packet stores an obsolete secret, time when the server was notified about it Used for automatic deletion of old secrets

Details:

attributeType ( TBD
       NAME 'ipaVolumeEscrowPacket' 
       DESC 'An encrypted packet containing a secret used for encrypting the volume'
       SYNTAX 1.3.6.1.4.1.1466.115.121.1.5   # Binary
       SINGLE-VALUE
       X-ORIGIN 'IPA v2' )
attributeType ( TBD
       NAME 'ipaVolumeHost'
       DESC 'Link to the host that contains this volume' SUP memberHost
       SYNTAX 1.3.6.1.4.1.1466.115.121.1.12   # DN
       X-ORIGIN 'IPA v2' )
attributeType ( TBD
       NAME 'ipaVolumeKeySecretType' 
       DESC 'Type of the secret defined in this packet'
       SYNTAX 1.3.6.1.4.1.1466.115.121.1.15   # DirectoryString
       SINGLE-VALUE
       X-ORIGIN 'IPA v2' )

Defined values: "data encryption key" and "passphrase", more can be added in the future. This corresponds to LIBVK_SECRET_* in libvolume_key.h.

attributeType ( TBD
       NAME 'ipaVolumeInfo' 
       DESC 'Information about a volume: NAME:VALUE'
       SYNTAX 1.3.6.1.4.1.1466.115.121.1.40   # OctetString
       X-ORIGIN 'IPA v2' )

A multi-valued attribute, stores information about the volume that allows the user to select which escrow packet to use. Each value is a NAME:VALUE string, with NAME consisting of characters in [a-zA-z0-9_/]. The expected values include the LIBVKP_VP_IDENTIFICATION properties of the volume reported by libvk_volume_dump_properties, e.g.

Name Value
hostname Host name, as known on the computer
volume_format Volume format, corresponds to LIBVK_VOLUME_FORMAT_* in libvolume_key.h
volume_uuid Volume UUID, using a volume format-specific syntax
volume_label Volume label
volume_path Path to a block special file representing the device on the specified host. The path is not necessarily "canonical". There might be more than one attribute value with this NAME.
luks/passphrase_slot An integer identifying the LUKS slot a passphrase is valid for
attributeType ( TBD
       NAME 'ipaVolumeKeyObsoletionTimestamp' 
       DESC 'Time when a key was marked as obsolete'
       SYNTAX 1.3.6.1.4.1.1466.115.121.1.24   # GeneralizedTime
       SINGLE-VALUE
       X-ORIGIN 'IPA v2' )
objectClass ( TBD
      NAME 'ipaVolumeKey' 
      SUP top STRUCTURAL
      MUST ( ipaUniqueID $ ipaVolumeHost $ ipaVolumeEscrowPacket )
      MAY ( ipaVolumeKeySecretType $ ipaVolumeInfo $ ipaVolumeKeyObsoletionTimestamp ) 
      X-ORIGIN 'IPAv2>' )

Suggested indices:

IPA configuration

Additional attributes in ipaConfig:

attributeType ( TBD
       NAME 'ipaObsoleteEscrowPacketLifetime' 
       DESC 'Number of days before an obsolete escrow packet is deleted (if a newer packet for the same volume is available)'
       SYNTAX 1.3.6.1.4.1.1466.115.121.1.27   # Integer
       SINGLE-VALUE
       X-ORIGIN 'IPA v2' )

Escrow packets with ipaVolumeKeyObsoletionTimestamp older than ipaObsoleteEscrowPacketLifetime are automatically deleted.

Note: This applies only to packets that were recognized by the IPA server as obsoleted by a newer packet. Obsoleted packets will be recognized by volume UUID (or perhaps other volume attribute that is sufficiently unique), which may not be available for all volume formats. If a volume format does not support reliable recognition of obsolete packets, the IPA server will never automatically mark a packet obsolete, and ipaObsoleteEscrowPacketLifetime will only affect packets that were manually marked obsolete by an administrator.

Todo: Make sure this limitation of automatic packet obsolescence is described in user documentation.

attributeType ( TBD
       NAME 'ipaEscrowKeyCertificate'
       DESC 'Certificate for encrypting escrow packets'
       SYNTAX 1.3.6.1.4.1.1466.115.121.1.5   # Binary
       SINGLE-VALUE
       X-ORIGIN 'IPA v2' )

The certificate that should currently be used for encrypting escrow packets, in the "PEM" (base64) format. Only one value is permitted.

attributeType ( TBD
       NAME 'ipaEscrowKey'
       DESC 'PKCS#12-formatted encrypted certificate and private key for encrypting escrow packets'
       SYNTAX 1.3.6.1.4.1.1466.115.121.1.5   # Binary
       X-ORIGIN 'IPA v2' )

One or more private master keys corresponding to the ipaEscrowKeyCertificate values used on this LDAP server. The password used to encrypt the PKCS#12 container may or may not be the same for all private keys.

LDAP user account

An additional account to represent accesses performed by the XMLRPC server (on behalf of a machine identity or of a system administrator) should be added, in a form that allows authenticating to the LDAP server (i.e., probably a Kerberos principal and keytab). This account might be shared with other IPA functions, or exclusive for key escrow. In the rest of this text, the account is called ipaXMLRPCServiceAccount.

Use case handling

(In all cases, the web interface should provide equivalent functionality to the command-line ipa interface.)

Get master key certificate

Executed by system administrators to retrieve the master key certificate used for encrypting escrow packets. The master key certificate itself, or the process of retreiving the certificate, is becomes a component of the escrow process.

ipa volume_key-current_cert > master.pem

Send a packet to the server

Executed automatically as a part of IPA enrollment, or manually (by a system administrator, or by a local user). The system administrator's can be e.g.

ipa volume_key-store volume [--create-random-passphrase] [--obsolete-older] [escrow_packet...]

List packets

Executed by a system administrator when recovery is necessary, to choose which packet to recover. In an interactive environment (e.g. WWW) the "list packets" and "recover a specific packet" operations can be combined.

ipa volume_key-list [--include-obsolete] hostname

"Make a packet available" to a system administrator

Executed by a system administrator when a recovery is necessary and a packet was selected, to decrypt it using the master key so that it can be copied to the client machine. In an interactive environment (e.g. WWW) the "list packets" and "recover a specific packet" operations can be combined.

ipa volume_key-get volume_uuid -o packet_file
where volume_uuid was chosen from results of a previous "list packets" operation.
Note: The connection must use SSL or a similar mechanism to authenticate the server and to prevent eavesdropping.

The system administrator copies the packet to the affected machine, and restores access (e.g. storing the packet on a flash drive, booting to rescue mode and using FirstAidKit).

Show secrets contained in a packet

Executed by a system administrator to display a passphrase, to tell it to the user (e.g. over a phone).

ipa volume_key-secrets volume_uuid
where volume_uuid was chosen from results of a previous "list packets operation".

The operation proceeds exactly like in the above case of '"Make a packet available" to a system administrator', until the client plugin receives the decrypted packet.

Mark a packet as obsolete

Executed by a system administrator to mark a packet as obsolete, e.g. when the automatic obsoletion mechanism can not match the volume correctly.

ipa volume_key-obsolete volume_uuid
where volume_uuid was chosen from results of a previous "list packets operation". (An alternative invocation form where only a host name is specified might be useful in the case when a computer is decommissioned.)

Delete a packet

Executed by a system administrator, e.g. when the secrets were stored in error and they need to be immediately deleted to prevent their possible decryption in the future.

ipa volume_key-delete volume_uuid
where volume_uuid was chosen from results of a previous "list packets operation".

Add a master key

Executed by the LDAP server administrator as a part of setting the key escrow system up, or when the previous master key is near its useful lifetime.

ipa master_volume_key-add [--default] pk12file

Change master key passphrase

Executed by the LDAP server administrator.

ipa master_volume_key-passphrase

Automatic key expiration

Run on the server from a cron job (probably daily), using a privileged identity.

Questions