<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Benchmark &#8211; privacyID3A</title>
	<atom:link href="https://www.privacyidea.org/tag/benchmark/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.privacyidea.org</link>
	<description>flexible, Open Source Multi Factor Authentication (2FA)</description>
	<lastBuildDate>Wed, 31 May 2017 14:34:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.5</generator>

<image>
	<url>https://www.privacyidea.org/wp-content/uploads/2016/06/cropped-only-logo-white-background-32x32.png</url>
	<title>Benchmark &#8211; privacyID3A</title>
	<link>https://www.privacyidea.org</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Is it really faster? Measuring the performance of authentication requests</title>
		<link>https://www.privacyidea.org/measuring-the-performance-of-authentication-requests/</link>
		
		<dc:creator><![CDATA[Friedrich Weber]]></dc:creator>
		<pubDate>Wed, 31 May 2017 10:11:04 +0000</pubDate>
				<category><![CDATA[release]]></category>
		<category><![CDATA[Whatsup]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Benchmark]]></category>
		<category><![CDATA[Performance]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=1214</guid>

					<description><![CDATA[Some days ago, we released the new version 2.19 of the privacyIDEA authentication system. As explained in the release notes, we worked on improving the performance of authentication requests and managed to reduce the time needed to handle one authentication request by up to 71%! If such claims make you suspicious, we totally understand your [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.privacyidea.org/wp-content/uploads/2017/05/group-of-people-1645356_1280.jpg"><img decoding="async" class="alignleft size-medium wp-image-1215" src="https://www.privacyidea.org/wp-content/uploads/2017/05/group-of-people-1645356_1280-300x200.jpg" alt="" width="300" height="200" srcset="https://www.privacyidea.org/wp-content/uploads/2017/05/group-of-people-1645356_1280-300x200.jpg 300w, https://www.privacyidea.org/wp-content/uploads/2017/05/group-of-people-1645356_1280-768x512.jpg 768w, https://www.privacyidea.org/wp-content/uploads/2017/05/group-of-people-1645356_1280-1024x682.jpg 1024w, https://www.privacyidea.org/wp-content/uploads/2017/05/group-of-people-1645356_1280.jpg 1280w" sizes="(max-width: 300px) 100vw, 300px" /></a>Some days ago, we released the <a href="https://www.privacyidea.org/privacyidea-2-19-u2f-secure-smartphone-apps/">new version 2.19</a> of the privacyIDEA authentication system. As explained in the release notes, we worked on improving the performance of authentication requests and managed to reduce the time needed to handle one authentication request by up to 71%! If such claims make you suspicious, we totally understand your concerns. This is why we will explain our benchmark approach in this blog post, so you can see for yourself where our numbers come from.</p>
<p>The first question we asked ourselves was: What exactly do we want to find out? As we worked a lot on optimizing the LDAP resolver, we first wanted to know if privacyIDEA 2.19 by itself processes authentication requests faster than privacyIDEA 2.18.1. The next question was whether performance can be further improved by enabling the new user cache feature of privacyIDEA 2.19. Here, we wanted to differentiate between a worst-case scenario with an empty cache and a best-case scenario with an already-populated cache. For each scenario, we wanted to get an idea of the time that privacyIDEA needs to handle an incoming authentication request. Having cleared our objective, the next step was creating a suitable lab environment that resembles the real world as closely as possible to run our benchmarks in.</p>
<h2>Our lab environment</h2>
<p>We created a lab environment as follows. First, we set up an <a href="https://www.univention.com/products/ucs/">Univention Corporate Server</a> and added 1000 users to its directory, which we simply called <code>user000</code> to <code>user999</code>, as well as a privacyIDEA service account. In the same network, we prepared two Ubuntu 16.04 virtual machines and installed privacyIDEA 2.18.1 on the first and privacyIDEA 2.19-dev5 on the second machine. On both instances, we added a realm with a LDAP resolver connecting to the Univention Corporate Server via LDAPS.</p>
<p>In order to keep our environment as close to the real world as possible, we would need to enroll HOTP or TOTP tokens for our 1000 users. However, we ultimately decided against it. For one, we suspected that the time spent calculating and checking the next OTP value on the server is relatively small in comparison to the time spent communicating with the LDAP server. Enrolling real OTP tokens would also require us to keep track of secrets and counter values on our benchmark client, which would complicate our setup a lot. To keep things simple, we instead decided to enroll one <a href="http://privacyidea.readthedocs.io/en/latest/configuration/tokens/spass.html">simple password (SPASS)</a> token for each user.</p>
<h2>Our benchmarking approach</h2>
<p>Now, we had set up two privacyIDEA instances with 1000 tokens. The next question was: How exactly do we now measure the performance of one authentication request? We decided to settle on the following approach: One benchmark consists of 2000 successful authentication requests, performed one after another for the users <code>user000</code> to <code>user999</code>. This means that each user is authenticated twice during one benchmark. For each authentication request, we measured the time from sending the request until receiving the response using a simple benchmarking script in Python based on <a href="http://docs.python-requests.org/en/master/">python-requests</a>. We copied the script to the virtual machines and performed all authentication requests against <code>https://localhost</code> in order to exclude the network delay from our measurements. Running the script then produces 2000 measurements of response time, of which we computed the median response time.</p>
<p>We decided to measure the response times for the following scenarios:</p>
<ul>
<li>Scenario #1: Authentication against privacyIDEA 2.18.1</li>
<li>Scenario #2: Authentication against privacyIDEA 2.19, with the user cache feature disabled</li>
<li>Scenario #3: Authentication against privacyIDEA 2.19, with the user cache enabled and initially empty</li>
<li>Scenario #4: Authentication against privacyIDEA 2.19, with an already-populated user cache. This means<br />
that the user cache contains valid 1000 entries, one for each user from <code>user000</code> to<br />
<code>user999</code>.</li>
</ul>
<p>The scenarios 2, 3 and 4 were carried out on the privacyIDEA 2.19 machine. For scenarios 3 and 4, we enabled the user cache with a timeout of one day (corresponding to 86400 seconds).</p>
<h2>Our results</h2>
<p>Now, we had everything in place to start our benchmarks! In total, running the benchmark for all four scenarios took roughly one hour and we obtained the following results.</p>
<table>
<tbody>
<tr>
<th>scenario#</th>
<th>description</th>
<th>median response time</th>
</tr>
<tr>
<td>#1</td>
<td>privacyIDEA 2.18.1</td>
<td>716ms</td>
</tr>
<tr>
<td>#2</td>
<td>privacyIDEA 2.19, disabled user cache</td>
<td>306ms</td>
</tr>
<tr>
<td>#3</td>
<td>privacyIDEA 2.19, enabled but initially empty user cache</td>
<td>268ms</td>
</tr>
<tr>
<td>#4</td>
<td>privacyIDEA 2.19, enabled and populated user cache</td>
<td>203ms</td>
</tr>
</tbody>
</table>
<p>Interesting! According to our measurements, an update to privacyIDEA 2.19 alone seems to reduce the median response time by roughly 57% (Scenario #2), even without enabling the user cache. This speedup can probably be attributed to some performance improvements in the LDAP resolver (see issues <a href="https://github.com/privacyidea/privacyidea/issues/655">655</a> and <a href="https://github.com/privacyidea/privacyidea/issues/664">664</a>).</p>
<p>Furthermore, if the user cache is enabled and fully populated (Scenario #4), the median response time is reduced by another 33%. In comparison to privacyIDEA 2.18.1, this corresponds to a reduction by 71%. Of course, this models a best-case scenario in which the LDAP server does not need to be queried any more at all. This may not be the case in the real world, e.g. if <a href="http://privacyidea.readthedocs.io/en/latest/policies/authentication.html#otppin">an otppin=userstore policy</a> is enabled.</p>
<p>Scenario #3 is quite interesting, as the user cache is initially empty and is subsequently populated during the first 1000 authentication requests. For the second round of 1000 authentications, privacyIDEA can rely on the user cache instead of querying the LDAP server. We can also observe this if we plot our measurements:</p>
<p><a href="https://www.privacyidea.org/wp-content/uploads/2017/05/run1-pi2.19-usercache.png"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-1217" src="https://www.privacyidea.org/wp-content/uploads/2017/05/run1-pi2.19-usercache-300x225.png" alt="" width="300" height="225" srcset="https://www.privacyidea.org/wp-content/uploads/2017/05/run1-pi2.19-usercache-300x225.png 300w, https://www.privacyidea.org/wp-content/uploads/2017/05/run1-pi2.19-usercache.png 640w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>The horizontal axis denotes our measurements and the vertical axis gives the median response time in milliseconds. We can observe that the median response time drops dramatically after the thousandth measurement, from which we can conclude that the user cache does have a measurable positive impact on the performance of authentication requests.</p>
<p>Of course, our benchmark is not perfect and leaves room for improvement due to multiple reasons. Firstly, the measurements also include the round-trip time between LDAP server and privacyIDEA instance, which significantly depends on the network setup. Secondly, we have only enrolled SPASS tokens and no real OTP tokens. Thirdly, we have not performed any concurrent requests and cannot, for example, say anything about the maximum number of authentication requests per second. Finally, two authentication requests by the same user are several minutes apart. If the same user sends two authentication requests during the timespan configured by the <em>cache timeout</em> option of the LDAP resolver (which defaults to 2 minutes), privacyIDEA queries an in-memory cache, which may be even faster than the query to the local database performed by the user cache.</p>
<p>However, we believe that our benchmark shows that privacyIDEA 2.19 improves the performance of authentication requests quite significantly even without the user cache. Additionally, enabling the user cache may bring significant performance improvements in case a large number of users are expected to send authentication requests over a large timespan. Finally, we noticed that the LDAP connection in our test setup is quite fast (a LDAP search takes just unter 30 milliseconds), so the user cache may provide an even better speedup in case of slower LDAP servers or connections. You are welcome to try it out for yourself! If you have any further questions, pleask ask them on our <a href="https://community.privacyidea.org/">community site</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>privacyIDEA with Nitrokey support</title>
		<link>https://www.privacyidea.org/privacyidea-with-nitrokey-support/</link>
					<comments>https://www.privacyidea.org/privacyidea-with-nitrokey-support/#respond</comments>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Thu, 06 Oct 2016 07:03:33 +0000</pubDate>
				<category><![CDATA[release]]></category>
		<category><![CDATA[Whatsup]]></category>
		<category><![CDATA[Benchmark]]></category>
		<category><![CDATA[FreeRADIUS]]></category>
		<category><![CDATA[Nitrokey]]></category>
		<category><![CDATA[Performance]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=1082</guid>

					<description><![CDATA[privacyIDEA adds Nitrokey OTP support in release 2.15 Today we released privacyIDEA 2.15. In this release privacyIDEA command line client supports the initialization and enrollment of the Nitrokey. The Nitrokey is an open USB devices that acts as authentication device and password safe. It can hold your PGP keys but also provides several OTP slots. [&#8230;]]]></description>
										<content:encoded><![CDATA[<h1>privacyIDEA adds Nitrokey OTP support in release 2.15</h1>
<figure id="attachment_931" aria-describedby="caption-attachment-931" style="width: 300px" class="wp-caption alignright"><a href="https://www.privacyidea.org/wp-content/uploads/2016/05/nitrokey.png"><img loading="lazy" decoding="async" class="size-medium wp-image-931" src="https://www.privacyidea.org/wp-content/uploads/2016/05/nitrokey-300x200.png" alt="The open hardware pyhsical authentication device: Nitrokey (source: Nitrokey.com)" width="300" height="200" srcset="https://www.privacyidea.org/wp-content/uploads/2016/05/nitrokey-300x200.png 300w, https://www.privacyidea.org/wp-content/uploads/2016/05/nitrokey-768x513.png 768w, https://www.privacyidea.org/wp-content/uploads/2016/05/nitrokey.png 1024w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-931" class="wp-caption-text">The open hardware pyhsical authentication device: Nitrokey (source: Nitrokey.com)</figcaption></figure>
<p>Today we released privacyIDEA 2.15. In this release privacyIDEA command line client supports the initialization and enrollment of the <a href="http://nitrokey.com" target="_blank">Nitrokey</a>. The Nitrokey is an open USB devices that acts as authentication device and password safe. It can hold your PGP keys but also provides several OTP slots. privacyIDEA now can initialize these OTP slots, so that you can use your own key material and use the Nitrokey as an open and trusted authenticator. This way you get the maximum trust and transparency by running open source software, using open and standardized algorithms and open hardware.</p>
<h2>Arbitrary User Attributes and Client Overview</h2>
<p>With privacyIDEA 2.15 the administrator now can edit arbitrary user attributes. These user attributes can be included in the authentication response and the new privacyIDEA FreeRADIUS plugin can map these user attributes to any RADIUS response attribute.</p>
<p>In the Web UI the administrator now also gets an overview of all authenticating clients. This may help him to keep track of the connected applications.</p>
<h2>Download</h2>
<p>You can download privacyIDEA via <a href="https://github.com/privacyidea/privacyidea" target="_blank">github</a>, the <a href="https://pypi.python.org/pypi/privacyIDEA/" target="_blank">python package index</a> or the <a href="https://launchpad.net/~privacyidea/+archive/ubuntu/privacyidea" target="_blank">Ubuntu Launchpad repository</a>. privacyIDEA is also available as <a href="https://netknights.it/en/produkte/privacyidea/">privacyIDEA Enterprise Edition from NetKnights</a> providing additional downloads for CentOS or the Univention Corporate Server.</p>
<h2>Changelog</h2>
<div class="-x-evo-paragraph">  Features</div>
<ul>
<li class="-x-evo-paragraph">Client Overview. Display the type of the requesting   authenticating clients (#489)</li>
<li class="-x-evo-paragraph">Support for NitroKey OTP mode (admin client)</li>
</ul>
<p>Enhancements</p>
<ul>
<li class="-x-evo-paragraph">You can edit arbitrary user attributes in privacyIDEA.</li>
<li class="-x-evo-paragraph">Such user attributes can be mapped to any RADIUS attribute.</li>
<li class="-x-evo-paragraph">Performance enhancements using Caching singletons for Config, Realm, Resolver and Policies</li>
<li class="-x-evo-paragraph">Allow configuration of the registration email text (#494)</li>
<li class="-x-evo-paragraph">Return SAML attributes only in case of successful authentication (#500)</li>
<li class="-x-evo-paragraph">Policy &#8220;reset_all_user_tokens&#8221; allow to reset all  failcounters on successful authentication (#471)</li>
<li class="-x-evo-paragraph">Client rewrite mapping also checks for X-Forwarded-For (#395, #495)</li>
</ul>
<p>Fixes</p>
<ul>
<li class="-x-evo-paragraph">Fixing RemoteUser fails to display WebUI (#499)</li>
<li class="-x-evo-paragraph">String comparison in HOSTS resolver (#484)</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.privacyidea.org/privacyidea-with-nitrokey-support/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install privacyIDEA OTP server on Ubuntu 14.04</title>
		<link>https://www.privacyidea.org/how-to-install-privacyidea-otp-server-on-ubuntu-14-04/</link>
					<comments>https://www.privacyidea.org/how-to-install-privacyidea-otp-server-on-ubuntu-14-04/#comments</comments>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Wed, 16 Jul 2014 09:55:53 +0000</pubDate>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Benchmark]]></category>
		<category><![CDATA[Performance]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=303</guid>

					<description><![CDATA[Please note: This howto is outdated. It refers to a rather old version of privacyIDEA. Please read the install documentation at readthedocs. Starting with privacyIDEA 1.2 a debian package for Ubuntu 14.04 is availble. Please note, that you will not be able to install it on 12.04, since there would be missing requirements. privacyIDEA depends [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong><span style="color: #ff0000;">Please note: This howto is outdated. It refers to a rather old version of privacyIDEA. Please read the install <a style="color: #ff0000;" href="https://privacyidea.readthedocs.org/en/latest/installation/index.html" target="_blank">documentation at readthedocs</a>.</span></strong></p>
<p>Starting with privacyIDEA 1.2 a debian package for Ubuntu 14.04 is availble.</p>
<p>Please note, that you will not be able to install it on 12.04, since there would be missing requirements. privacyIDEA depends on the following packages:</p>
<pre> python-setuptools python-pylons python-qrcode python-netaddr python-ldap python-pyrad python-yaml python-configobj python-repoze.who python-httplib2 python-crypto python-docutils python-repoze.who-plugins</pre>
<p>There are two PPA repositories available on launchpad: <a href="https://launchpad.net/~privacyidea/+archive/ubuntu/privacyidea-dev" target="_blank">privacyidea/privacyidea-dev</a> and <a href="https://launchpad.net/~privacyidea/+archive/ubuntu/privacyidea" target="_blank">privacyidea/privacyidea</a>. The -dev repository is for development releases and testing. The privacyidea/privacyidea repo should contain stable releases.</p>
<h2>Add the repository to your system and install privacyIDEA</h2>
<p>To add the repository to your system run the following command:</p>
<pre>add-apt-repository ppa:privacyidea/privacyidea</pre>
<p>Fetch information on new content:</p>
<pre>apt-get update</pre>
<p>Install it:</p>
<pre>apt-get install privacyidea</pre>
<p>The package creates an SQLite database at /var/lib/privacyidea/token.sqlite. Of course you can use any other database backend. But using sqlite gets you up and running quickly.</p>
<p>Moreover the package contains a start-script /etc/init.d/privacyidea, that is running privacyidea in python-paster, a simple, lightweight webserver.</p>
<p>To start privacyidea run:</p>
<pre>service privacyidea start</pre>
<p>privacyIDEA is now listening on port 5001.</p>
<h2>Create your admin account</h2>
<p>Finally you need to create a first admin account to log in to the management interface:</p>
<pre>privacyidea-create-pwidresolver-user -u admin -p test -i 1000 &gt;&gt; <a class="file" title="/etc/privacyidea/admin-users">/etc/privacyidea/admin-users</a></pre>
<p>Instead of using the weak password test, you should make up a cooler one.</p>
<p>Now you can login at https://yourserver:5001/ with the username &#8220;admin@admin&#8221; and the password you created.</p>
<h2>Some performance data</h2>
<p><a href="https://www.privacyidea.org/wp-content/uploads/2014/07/users-screenshot.png"><img loading="lazy" decoding="async" class="alignleft wp-image-305 size-medium" src="https://www.privacyidea.org/wp-content/uploads/2014/07/users-screenshot-300x184.png" alt="users-screenshot" width="300" height="184" srcset="https://www.privacyidea.org/wp-content/uploads/2014/07/users-screenshot-300x184.png 300w, https://www.privacyidea.org/wp-content/uploads/2014/07/users-screenshot.png 939w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<p>&nbsp;</p>
<p>The paster is a small webserver. The SQLite is not a state-of-the-art database.</p>
<p>So I always would recommend running privacyIDEA with Apache. This is describe in <a title="Howto run privacyIDEA with Apache2 and MySQL" href="https://www.privacyidea.org/documentation/howtos/howto-run-privacyidea-with-apache2-and-mysql/">this post</a>.</p>
<p>I was wondering what this paster and sqlite could do, So I created a realm containing the local users from /etc/passwd and assigned a simple pass token to one of these users.</p>
<p>&nbsp;</p>
<p>Now I was able to issue an authentication request by calling the API like this:</p>
<p><a href="https://www.privacyidea.org/wp-content/uploads/2014/07/token-screenshot.png"><img loading="lazy" decoding="async" class="alignleft wp-image-306 size-medium" src="https://www.privacyidea.org/wp-content/uploads/2014/07/token-screenshot-300x90.png" alt="token-screenshot" width="300" height="90" srcset="https://www.privacyidea.org/wp-content/uploads/2014/07/token-screenshot-300x90.png 300w, https://www.privacyidea.org/wp-content/uploads/2014/07/token-screenshot.png 741w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<pre> https://myserver:5001/validate/check?user=man&amp;pass=test</pre>
<p>Now I used ApacheBench to call this URL:</p>
<p>&nbsp;</p>
<pre>% ab -n 1000 -c 10 -s 5 https://172.16.200.139:5001/validate/check?user=man\&amp;pass=test
This is ApacheBench, Version 2.3 &lt;$Revision: 1528965 $&gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 172.16.200.139 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        PasteWSGIServer/0.5
Server Hostname:        172.16.200.139
Server Port:            5001
SSL/TLS Protocol:       TLSv1.2,AES256-GCM-SHA384,2048,256

Document Path:          /validate/check?user=man&amp;pass=test
Document Length:        135 bytes

Concurrency Level:      10
Time taken for tests:   41.964 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      373000 bytes
HTML transferred:       135000 bytes
Requests per second:    23.83 [#/sec] (mean)
Time per request:       419.643 [ms] (mean)
Time per request:       41.964 [ms] (mean, across all concurrent requests)
Transfer rate:          8.68 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        2   11  14.4      9     218
Processing:   121  407 270.7    332    3340
Waiting:      120  406 270.8    332    3340
Total:        126  418 272.0    342    3350

Percentage of the requests served within a certain time (ms)
  50%    342
  66%    401
  75%    456
  80%    499
  90%    678
  95%    948
  98%   1318
  99%   1632
 100%   3350 (longest request)

</pre>
<p>This was done on a Virtual Machine running in VirtualBox with 2 processors and 2GB of RAM. The host machine is an Intel i7-4702MQ CPU @ 2.20GHz.</p>
<p>24 Authentications per seconds, no failed requests look rather good to me.</p>
<p>So why not give it a try?</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.privacyidea.org/how-to-install-privacyidea-otp-server-on-ubuntu-14-04/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
