Import SafeNet etoken pass XML

261 views
Skip to first unread message

Sergey Kolosovski

unread,
Jan 11, 2016, 7:04:04 AM1/11/16
to privacyidea

Hello Cornelius!

The documentation says that there's an option to import SafeNet XMLs
In fact, there's no such option:


I tried to form a csv file using data from an xml and importing csv works well.

Should I make my own converter xml->csv and then import csv or it is going to be implemented soon? We have a lot of token data in safenet xmls...

Cornelius Kölbel

unread,
Jan 11, 2016, 7:20:04 AM1/11/16
to priva...@googlegroups.com
Hi Sergey,

you are right.
The documentation lies.
The XML import got lost during migration.

But as a matter of fact it is still there:
https://github.com/privacyidea/privacyidea/blob/master/privacyidea/lib/importotp.py#L312

...and also well test covered:
https://coveralls.io/builds/4680044/source?filename=privacyidea%2Flib%
2Fimportotp.py#L312

Cool. You see. We even have tested code, which we do not use. ;-)

What is your time frame? The import will be rewired in version 2.10.

Kind regards
Cornelius

Am Montag, den 11.01.2016, 04:04 -0800 schrieb Sergey Kolosovski:
> Hello Cornelius!
>
>
> The documentation says that there's an option to import SafeNet XMLs
> http://privacyidea.readthedocs.org/en/latest/import/index.html
> In fact, there's no such option:
>
>
>
> I tried to form a csv file using data from an xml and importing csv
> works well.
>
> Should I make my own converter xml->csv and then import csv or it is
> going to be implemented soon? We have a lot of token data in safenet
> xmls...
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "privacyidea" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to privacyidea...@googlegroups.com.
> To post to this group, send email to priva...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/privacyidea/b5135d45-2089-4276-99aa-a23de50101c0%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
Cornelius Kölbel
corneliu...@netknights.it
+49 151 2960 1417

NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel


signature.asc

Sergey Kolosovski

unread,
Jan 11, 2016, 8:14:29 AM1/11/16
to privacyidea
But as a matter of fact it is still there:
https://github.com/privacyidea/privacyidea/blob/master/privacyidea/lib/importotp.py#L312

...and also well test covered:
https://coveralls.io/builds/4680044/source?filename=privacyidea%2Flib%
2Fimportotp.py#L312


Cool. You see. We even have tested code, which we do not use. ;-)

What is your time frame? The import will be rewired in version 2.10.

Don't have a strict time frame. Just plan to move tokens and how to do it..
So you propose to wait for the nearest update to have it working(As I understood there's only need to add one line in imports dropdown list which will fire the function you provided) ?

Cornelius Kölbel

unread,
Jan 11, 2016, 8:26:20 AM1/11/16
to priva...@googlegroups.com
Hi Sergey,

will be a bit more than one line... due to some help texts ;-)

I assume your XML still looks like this:

<Tokens>
<Token serial="000400081DFFA5">
<CaseModel>5</CaseModel>
<Model>101</Model>
<ProductionDate>02/19/2009</ProductionDate>
<ProductName>Safeword Alpine</ProductName>
<Applications>
<Application
ConnectorID="{ab1397d2-ddb6-4705-b66e-9f83f322deb9}">
<Seed>123412354</Seed>
<MovingFactor>1</MovingFactor>
</Application>
</Applications>
</Token>

</Tokens>

Is your eToken Pass an HOTP or an TOTP token?
What is the length of your <seeds>?

40 -> SHA1
64 -> SHA256

Kind regards
Cornelius
> --
> You received this message because you are subscribed to the Google
> Groups "privacyidea" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to privacyidea...@googlegroups.com.
> To post to this group, send email to priva...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/privacyidea/f4127992-02cc-477c-93ef-b9093b1199b2%40googlegroups.com.
signature.asc

Sergey Kolosovski

unread,
Jan 11, 2016, 8:34:21 AM1/11/16
to privacyidea
Hi Cornelius!

will be a bit more than one line... due to some help texts ;-) 
sure )) It is just roughly saying 

the example of XML is:
<?xml version="1.0" encoding="utf-8"?>
<Tokens>
  <Token serial="AM436666">
    <CaseModel>5</CaseModel> 
    <Model>517</Model>
    <ProductionDate>10/07/2013</ProductionDate>
    <ProductName>eTPass 6.20</ProductName>
    <Applications>
      <Application ConnectorID="{a61c4073-2fc8-4170-99d1-9f5b70a2cec6}">
        <Seed>ffffffffffffffffffffffffffffffffffffffff</Seed>
        <MovingFactor>1</MovingFactor>
      </Application>
    </Applications>
  </Token>
</Tokens>


Therefore the should be more than one <Token> sections. For an example I left only one

Is your eToken Pass an HOTP or an TOTP token? 
HOTP

 40 -> SHA1 
correct 

Cornelius Kölbel

unread,
Jan 11, 2016, 8:42:03 AM1/11/16
to priva...@googlegroups.com
Hello Sergey,

thank you and done.
https://github.com/privacyidea/privacyidea/issues/309

Kind regards
Cornelius
> --
> You received this message because you are subscribed to the Google
> Groups "privacyidea" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to privacyidea...@googlegroups.com.
> To post to this group, send email to priva...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/privacyidea/5c82d5b9-2c56-4a51-9e86-ab3f513ee2f5%40googlegroups.com.
signature.asc

Sergey Kolosovski

unread,
Jan 11, 2016, 9:55:36 AM1/11/16
to privacyidea
Thank you very much!
When approximately could we expect new updated version in the repository?

Cornelius Kölbel

unread,
Jan 11, 2016, 10:05:02 AM1/11/16
to priva...@googlegroups.com
Hello Sergey,

version 2.10 is scheduled for February 11th.
https://github.com/privacyidea/privacyidea/milestones
Till now, we were able to meet the milestones.

Kind regards
Cornelius
> --
> You received this message because you are subscribed to the Google
> Groups "privacyidea" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to privacyidea...@googlegroups.com.
> To post to this group, send email to priva...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/privacyidea/67ceb129-90ba-4133-8d6e-00ed3c91fb9e%40googlegroups.com.
signature.asc

Sergey Kolosovski

unread,
Jan 12, 2016, 8:50:49 AM1/12/16
to privacyidea
thank you. Will wait for updates
Reply all
Reply to author
Forward
0 new messages