mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-27 09:21:59 -06:00
5baa941317
This patch adds support for importing tokens using RFC 6030 key container files. This includes decryption support. For sysadmin sanity, any tokens which fail to add will be written to the output file for examination. The main use case here is where a small subset of a large set of tokens fails to validate or add. Using the output file, the sysadmin can attempt to recover these specific tokens. This code is implemented as a server-side script. However, it doesn't actually need to run on the server. This was done because importing is an odd fit for the IPA command framework: 1. We need to write an output file. 2. The operation may be long-running (thousands of tokens). 3. Only admins need to perform this task and it only happens infrequently. https://fedorahosted.org/freeipa/ticket/4261 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
58 lines
1.6 KiB
XML
58 lines
1.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<KeyContainer
|
|
Version="1.0" Id="exampleID1"
|
|
xmlns="urn:ietf:params:xml:ns:keyprov:pskc">
|
|
<KeyPackage>
|
|
<DeviceInfo>
|
|
<Manufacturer>Manufacturer</Manufacturer>
|
|
<SerialNo>987654321</SerialNo>
|
|
</DeviceInfo>
|
|
<CryptoModuleInfo>
|
|
<Id>CM_ID_001</Id>
|
|
</CryptoModuleInfo>
|
|
<Key Id="12345678"
|
|
Algorithm="urn:ietf:params:xml:ns:keyprov:pskc:hotp">
|
|
<Issuer>Issuer</Issuer>
|
|
<AlgorithmParameters>
|
|
<ResponseFormat Length="8" Encoding="DECIMAL"/>
|
|
</AlgorithmParameters>
|
|
<Data>
|
|
<Secret>
|
|
<PlainValue>MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=
|
|
</PlainValue>
|
|
</Secret>
|
|
<Counter>
|
|
<PlainValue>0</PlainValue>
|
|
</Counter>
|
|
</Data>
|
|
<Policy>
|
|
<PINPolicy MinLength="4" MaxLength="4"
|
|
PINKeyId="123456781" PINEncoding="DECIMAL"
|
|
PINUsageMode="Local"/>
|
|
<KeyUsage>OTP</KeyUsage>
|
|
</Policy>
|
|
</Key>
|
|
</KeyPackage>
|
|
<KeyPackage>
|
|
<DeviceInfo>
|
|
<Manufacturer>Manufacturer</Manufacturer>
|
|
<SerialNo>987654321</SerialNo>
|
|
</DeviceInfo>
|
|
<CryptoModuleInfo>
|
|
<Id>CM_ID_001</Id>
|
|
</CryptoModuleInfo>
|
|
<Key Id="123456781"
|
|
Algorithm="urn:ietf:params:xml:ns:keyprov:pskc:pin">
|
|
<Issuer>Issuer</Issuer>
|
|
<AlgorithmParameters>
|
|
<ResponseFormat Length="4" Encoding="DECIMAL"/>
|
|
</AlgorithmParameters>
|
|
<Data>
|
|
<Secret>
|
|
<PlainValue>MTIzNA==</PlainValue>
|
|
</Secret>
|
|
</Data>
|
|
</Key>
|
|
</KeyPackage>
|
|
</KeyContainer>
|