Seite wählen

NETWAYS Blog

Weekly Snap: CPU Limit, MOTP, Typed Arrays & Training Courses in 2012

19 – 23 September tried new tools such as CPUlimit.sh, mobile one-time passwords, and typed arrays in java script, while preparing for a municipal IT conference and training courses in 2012.
Birger began the week with his discovery of cpulimit.sh, a tool to cool down his over active MacBook Pro. With a 2.2 GHz Intel Core i7, it would often go into „jet mode“ when indexing for Spotlight or running the video player, making a lot of noise in the process. On one hand he can easily switch off his graphics card with gfxCardStatus, however to reduce his CPU and energy consumption (thereby saving his battery and hearing) he found cpulimit.sh and a variant for those running on Lion.
Following on, Marcus H showed how to implement single-use password authentication with MOTP, the Mobile One Time Password project. He gave an example with an Apache module and an iOS client. First he compiled mod_authn_otp and installed dependencies per the MOTP project wiki. The module is treated like a normal basic auth in the Apache config. Here, a user file is given, where the corresponding user and their ‘secrets’ and the related PINs are specified. This file must be writeable by the Apache user, so that the module can set a timestamp. In this way, the token given to the user is valid only for a fixed time period and they will not be repeatedly asked for a new token. For the client, Marcus downloaded mOTP from the App Store. He recommended the guides on the project’s wiki for other operating systems such as Python.
From the development team, Jannis then had a look at low-level memory access in java script with typed arrays. The new data types, array buffer and typed arrays are used to access binary data effectively. Comparing the performance of internal arrays to the float 32 array, he concluded that float 32 array is worth trying for large amounts of data.
Bernd looked forward to the upcoming Kommunale and its premiere IT sub-conference 2011 in Nuremberg on 19 – 20 October. With a special focus on digital information and communication technologies in the municipality, the program covers cloud computing, DMS systems, Green IT and more. NETWAYS will join, with Bernd presenting on “IT Monitoring & Management Systems in Public Administration”. For help with tickets, contact our team at info@netways.de
Looking ahead, Markus N announced the NETWAYS course timetable for the start of 2012: Nagios Availability Monitoring on 16 – 19 January and Icinga Availability Monitoring on 16 – 20 January. Class sizes are restricted to 10 attendees for intensive learning, whilst allowing for discussion to consolidate course material. All-inclusive packages offer just that: accommodation (also on the course eve), catering, notebook hire, wlan internet, as well as a dinner and drinks event. If you are looking for tailored training however, the NETWAYS training team also offers workshops with customised material, run on-site at your office. More information is available at the NETWAYS training center.

One Time Password Authentifizierung mit MOTP

Eine OTP Authentifizierung ist eine praktische und vor allem sichere Angelegenheit. Aus verschiedenen Daten wird ein Passphrase errechnet, welcher nur für einen kurzen Zeitraum und einmalig gültig ist und somit nicht mehrmals verwendbar.
Es gibt viele Lösungen, welche auf Hardware-Tokens setzen und entsprechende Anschaffungskosten anfallen. Als gute Alternative bietet sich das Mobile One Time Password-Projekt an, kurz MOTP. MOTP ist mehr der eigentliche Algorithmus, auf dessen Basis diverse Clients für alle gängigen Betriebssysteme und mobilen Endgeräte (J2ME, Blackberry, Android, iOS, WebOS …) sowie serverseitig viele Implementierungen entwickelt worden sind. Heut möchte ich kurz ein Apache Modul und einen iOS Client vorstellen, mit denen eine einfache OTP Authentifizierung realisiert werden kann.
MOTP berechnet seine OTPs auf Basis dreier Komponenten:

  • PIN (bleibt gleich, wird beim Client eingegeben)
  • Secret (Im Regelfall ein Hash, welcher aus Zufallsdaten vom Client generiert wird)
  • Uhrzeit (MOTP setzt auf zeitbasierte Generierung, Zeiten müssen auf Client und Server übereinstimmen! – NTP)

Das verwendete Apache Modul, mod_authn_otp, muss zunächst compiliert werden. Eine Anleitung, welche Abhängigkeiten installiert werden müssen und wie es ordnungsgemäß installiert wird, findet sich im Projektwiki.
Angesprochen wird das Modul in der Apache Config als normales Basic Auth. Hier wird auch ein UserFile angegeben, wo die jeweiligen Nutzer mit ihren Secrets und dazugehörigen Pins angegeben werden. Zu beachten ist, dass dieses File vom Apache Benutzer schreibbar sein muss, damit das Modul einen Timestamp setzen kann. Dies bietet die Funktion, dass ein Token für einen festgelegten Zeitraum gültig ist, und somit der Nutzer nicht ständig aufgefordert wird, einen neuen Token eingeben zu müssen.
Als Client habe ich mOTP aus dem AppStore genommen. Diese App ist sehr einfach in der Bedienung und generiert selbst einen Secret, welcher in das UserFile übernommen werden kann. Auf der MOTP Projektseite gibt es eine große Auswahl an weiteren Clients für diverse Systeme. Beispielsweise wurde ein Client in Python geschrieben, welcher auf jedem gängigen OS funktionieren sollte.