<?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>Tips and Tricks &#8211; privacyID3A</title>
	<atom:link href="https://www.privacyidea.org/category/tips-and-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.privacyidea.org</link>
	<description>flexible, Open Source Multi Factor Authentication (2FA)</description>
	<lastBuildDate>Tue, 12 Aug 2025 11:02:12 +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>Tips and Tricks &#8211; privacyID3A</title>
	<link>https://www.privacyidea.org</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Online Webinars in August: Central MFA with privacyIDEA</title>
		<link>https://www.privacyidea.org/online-webinars-in-august-central-mfa-with-privacyidea/</link>
		
		<dc:creator><![CDATA[Isabelle Mühlhausen]]></dc:creator>
		<pubDate>Tue, 12 Aug 2025 11:02:11 +0000</pubDate>
				<category><![CDATA[events]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Whatsup]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=2381</guid>

					<description><![CDATA[We would like to give you the opportunity to learn more about multi-factor authentication with privacyIDEA and its many possible applications. Therefore, we invite you to attend our free online events “Central MFA with privacyIDEA” on August 19 or 28 and “privacyIDEA – Your replacement for DUO and OKTA” on September 16. In these free [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>We would like to give you the opportunity to learn more about multi-factor authentication with privacyIDEA and its many possible applications.<br></p>



<p>Therefore, we invite you to attend our free online events </p>



<p><strong>“Central MFA with privacyIDEA” on August 19 or 28 and “privacyIDEA – Your replacement for DUO and OKTA” on September 16.</strong></p>



<p>In these free online events, we will show you how you can use privacyIDEA to design your authentication processes flexibly, securely, and independently.<br><br>In addition, <strong>Cornelius Kölbel</strong>, CEO of NetKnights with <strong>more than 15 years of experience</strong> in the field of multi-factor authentication, will personally answer your questions.</p>



<p>Take advantage of this opportunity to gain new insights for your authentication project and get answers to your questions!</p>



<p><strong>Dates &amp; Time</strong><br></p>



<p>19 August, Central MFA with privacyIDEA, 3 pm-3:45 pm Central European Time</p>



<p>28 August, Central MFA with privacyIDEA, 7pm-7:45 pm Central European Time</p>



<p>16 September, privacyIDEA – Your replacement for DUO and OKTA, 7 pm-7:45 pm Central European Time</p>



<p><strong>Secure your free spot and learn more about MFA with privacyIDEA</strong>!<br></p>



<p><strong>Registration via:</strong> <a href="https://netknights.it/privacyidea-webinar-registration">https://netknights.it/privacyidea-webinar-registration</a></p>



<p>We look forward to your participation. If you have any further questions about the webinars, do not hesitate to contact us via <a href="&#x6d;&#x61;&#x69;&#108;&#116;o:&#x6d;&#x61;&#x72;&#107;&#101;ti&#x6e;&#x67;&#x40;&#110;&#101;tk&#x6e;&#x69;&#x67;&#104;&#116;s&#46;&#x69;&#x74;">market&#105;&#110;&#103;&#64;&#110;&#101;&#116;&#x6b;&#x6e;&#x69;&#x67;&#x68;&#x74;&#x73;&#x2e;&#x69;&#x74;</a></p>



<figure class="wp-block-image size-large"><a href="https://www.privacyidea.org/wp-content/uploads/2025/08/Webinar-Ankundigung-3060-x-1992-px2.png"><img fetchpriority="high" decoding="async" width="1024" height="667" src="https://www.privacyidea.org/wp-content/uploads/2025/08/Webinar-Ankundigung-3060-x-1992-px2-1024x667.png" alt="" class="wp-image-2382" srcset="https://www.privacyidea.org/wp-content/uploads/2025/08/Webinar-Ankundigung-3060-x-1992-px2-1024x667.png 1024w, https://www.privacyidea.org/wp-content/uploads/2025/08/Webinar-Ankundigung-3060-x-1992-px2-300x195.png 300w, https://www.privacyidea.org/wp-content/uploads/2025/08/Webinar-Ankundigung-3060-x-1992-px2-768x500.png 768w, https://www.privacyidea.org/wp-content/uploads/2025/08/Webinar-Ankundigung-3060-x-1992-px2-1536x1000.png 1536w, https://www.privacyidea.org/wp-content/uploads/2025/08/Webinar-Ankundigung-3060-x-1992-px2-2048x1333.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Enroll a Yubikey as PIV smartcard</title>
		<link>https://www.privacyidea.org/enroll-a-yubikey-as-piv-smartcard/</link>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Mon, 28 Dec 2020 10:35:08 +0000</pubDate>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[smartcards]]></category>
		<category><![CDATA[Yubikey]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=2235</guid>

					<description><![CDATA[privacyIDEA supports enrollment of PIV smartcards. A from the scratch howto to enroll x509 certificates on Yubikeys.]]></description>
										<content:encoded><![CDATA[
<p>In this blog post we will show, how you can enroll a Yubikey as a PIV smartcard. privacyIDEA will issue the certificate request sent by the Yubikey but at the same time require an attestation certificate. This way privacyIDEA will assure, that the key pair indeed has been generated on the smartcard.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1000" height="469" src="https://www.privacyidea.org/wp-content/uploads/2020/12/enroll-yubikey.jpg" alt="" class="wp-image-2238" srcset="https://www.privacyidea.org/wp-content/uploads/2020/12/enroll-yubikey.jpg 1000w, https://www.privacyidea.org/wp-content/uploads/2020/12/enroll-yubikey-300x141.jpg 300w, https://www.privacyidea.org/wp-content/uploads/2020/12/enroll-yubikey-768x360.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></figure>



<p>You could then use the Yubikey with the x509 certificate to login to you desktop, sign or decrypt emails. These application examples are not topic of this blog post and might be covered in later posts.</p>



<p>You will need a Yubikey 5 and a <a href="https://www.privacyidea.org/multi-factor-authentication-privacyidea-3-5-released/" data-type="post" data-id="2223">privacyIDEA installation with version 3.5</a>. We also assume in this example, that you are running Linux on your desktop.</p>



<h2 class="wp-block-heading">Setup CA in privacyIDEA</h2>



<p>First we have to setup a certificate authority (CA), that will sign the certificate signing request (CSR) generated by the Yubikey. privacyIDEA currently only supports local openssl based CAs. This could however be a sub CA to your existing enterprise CA. In this example, we create a new root CA.</p>



<p><strong>Note: You need read access to pi.cfg and write access to /etc/privacyidea/ca</strong></p>



<pre class="wp-block-code"><code># pi-manage ca create -t local myLocalCA</code></pre>



<p>This pi-manage command will create the CA files and also the CA configuration within privacyIDEA. You are asked a couple of questions and answer them accordingly:</p>



<pre class="wp-block-code"><code># pi-manage  ca create -t local  myLocalCA

             _                    _______  _______
   ___  ____(_)  _____ _______ __/  _/ _ \/ __/ _ |
  / _ \/ __/ / |/ / _ `/ __/ // // // // / _// __ |
 / .__/_/ /_/|___/\_,_/\__/\_, /___/____/___/_/ |_|
/_/                       /___/

Creating CA connector of type local.
In which directory do you want to create the CA &#91;./ca]: /etc/privacyidea/ca
What should be the keysize of the CA (2048/4096/8192)&#91;4096]: 
How many days should the CA be valid &#91;1800]: 
What is the DN of the CA &#91;/CN=myLocalCA]: 
How many days should the CRL be valid &#91;30]: 
What should be the overlap period of the CRL in days &#91;5]: 
============================================================

        Directory  : /etc/privacyidea/ca
        CA DN      : /CN=myLocalCA
        CA Keysize : 4096
        CA Validity: 1800

        Validity of issued certificates: 365

        CRL validity: 30
        CRL overlap : 5

Is this configuration correct? &#91;y/n] y</code></pre>



<p>You also need to fix the access to the directory</p>



<pre class="wp-block-code"><code>chown privacyidea -R /etc/privacyidea/ca</code></pre>



<p>and create a file <code>/etc/privacyidea/ca/templates.yaml</code> with the contents:</p>



<pre class="wp-block-code"><code>user:
    extenstions: "user"
    days: 365</code></pre>



<p>which will ensure, that the certificate will created as a user certificate with a validity period of 365 days.</p>



<p>You need to do some minor fixtues:</p>



<pre class="wp-block-code"><code>cd /etc/privacyidea/ca
openssl rand -writerand .rnd 
touch index.txt.attr 
chown privacyidea .rnd index.txt.attr</code></pre>



<p>For simplicity comment out two lines (crlDistributionPoints and authorityInformationAccess) in the section &#8220;user&#8221; in the file /etc/privacyidea/ca/openssl.cnf</p>



<pre class="wp-block-code"><code>&#91; user ]
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
basicConstraints = CA:FALSE
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer:always
#crlDistributionPoints = @crl_dp_policy
#authorityInfoAccess = caIssuers;URI:http://www.example.com/yourCA.crt</code></pre>



<p>As a last step, go to the Web UI in Config->CA and add the &#8220;Certificate template file&#8221; <code>/etc/privacyidea/ca/templates.yaml</code>.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="673" height="692" src="https://www.privacyidea.org/wp-content/uploads/2020/12/ca-templates.png" alt="" class="wp-image-2240" srcset="https://www.privacyidea.org/wp-content/uploads/2020/12/ca-templates.png 673w, https://www.privacyidea.org/wp-content/uploads/2020/12/ca-templates-292x300.png 292w" sizes="(max-width: 673px) 100vw, 673px" /></figure>



<p>Now your CA is ready to go.</p>



<h2 class="wp-block-heading">Setup PIV trusted certificates</h2>



<p>The attestation certificate verifies that the private key was generated on the Yubikey. You can tell privacyIDEA, which attestation certificates should be trusted. Here we will use the Yubikey, so we need to fetch the <a href="https://developers.yubico.com/yubico-piv-tool/Attestation.html" target="_blank" rel="noreferrer noopener">Yubico PIV CA from their web site</a>.</p>



<pre class="wp-block-code"><code>mkdir /etc/privacyidea/attestation    
wget https://developers.yubico.com/PIV/Introduction/piv-attestation-ca.pem \
     -O /etc/privacyidea/attestation/yubico.pem</code></pre>



<p>The PIV Root CA has signed the attestation CA, that is contained on each Yubikey. We need to retrieve this from the Yubikey. Do do so insert a Yubikey and run the following command:</p>



<pre class="wp-block-code"><code>yubico-piv-tool --action=read-certificate \ 
      --slot=f9 >> /etc/privacyidea/attestation/yubico.pem</code></pre>



<p>The certificate we read from the Yubikey from slot f9 is the attestation CA, that was signed by the Yubico CA. The attestation CA will sign the attestation certificate, that testifies, that the CSR was created on the yubikey. The file yubico.pem now contains the certificate chain of the PIV Root CA and the Attestation CA.</p>



<p><strong>Note: With new production charges Yubico might put a new attestation CA on the yubikeys. So if you buy 100 yubikeys, they will most probably have the same attestation CA, but if you buy another 100 yubikeys several month later, they might have another attestation CA, so you need to repeat this step and put the new certificate chain in a second file.</strong></p>



<h2 class="wp-block-heading">Configure privacyIDEA policies</h2>



<p>privacyIDEA can already enroll x509 certificates. But to ensure, that it will only enroll certificates from CSRs, that are created on the Yubikey, we need to define a new policy, which is available starting with privacyIDEA 3.5.</p>



<p>We create a policy to require an attestation certificate</p>



<pre class="wp-block-code"><code>scope: enrollment
action: certificate_require_attestation=require_and_verify</code></pre>



<p>In this example we will have the administrator enroll yubikeys, so we set an admin policy, that specifies, where the trusted CA chains can be found:</p>



<pre class="wp-block-code"><code>scope: admin
action: certificate_trusted_Attestation_CA_path=/etc/privacyidea/attestation/</code></pre>



<h2 class="wp-block-heading">Enroll certificate</h2>



<p>Now the admin needs to pass the CSR and in addition an attestation certificate, if he wants to have the CSR signed and receive a certificate. The admin could do this manually with the yubico own tools and using the privacyIDEA REST API. </p>



<p>However, in this example we use the <em>privacyidea admin client</em>, which can be <a href="https://github.com/privacyidea/privacyideaadm" target="_blank" rel="noreferrer noopener">found at github</a>.</p>



<p><strong>Note: You can run the command line client on any other computer, it does not need to be your privacyIDEA server.</strong></p>



<p>In this case we are running it on an Ubuntu Linux desktop.</p>



<p>Prepare dependencies:</p>



<pre class="wp-block-code"><code>sudo apt-add-repository ppa:yubico/stable
sudo apt update
sudo apt install yubikey-manager
sudo apt install ykcs11</code></pre>



<p>Create a virtualenv:</p>



<pre class="wp-block-code"><code>virtualenv -p /usr/bin/python3 piv-test</code></pre>



<p>Enter the environment:</p>



<pre class="wp-block-code"><code>source piv-test/bin/activate</code></pre>



<p>Install the privacyidea admin client:</p>



<pre class="wp-block-code"><code>git clone https://github.com/privacyidea/privacyideaadm
cd privacyideaadm
pip install .</code></pre>



<p>Now you can use the current development branch of the admin client in your virtualenv.</p>



<p><strong>Note: You need to have enough hardware access rights, otherwise you might get errors like &#8221; Failed to transmit with protocol T1. Reader is unavailable&#8221;</strong></p>



<p>If necessary, you can reset the PIV data on your yubikey:</p>



<pre class="wp-block-code"><code>ykman piv reset</code></pre>



<p>Now you can enroll the yubikey certificate:</p>



<pre class="wp-block-code"><code>privacyidea-enroll-yubikey-piv init-cert -s cornelius -u cornelius \
     -U https://localhost -a super -p test -c myLocalCA -n -P 123456</code></pre>



<p>This will create a CSR on the Yubikey, with the subject &#8220;CN=cornelius&#8221; and access the Yubikey with the PIN &#8220;123456&#8221;. The CSR and the attestation certificate will be sent to privacyIDEA at &#8220;https://localhost&#8221;, the admin will authenticate as user &#8220;super&#8221; with the password &#8220;test&#8221; and enroll the certificate to the user &#8220;cornelius&#8221;. privacyIDEA will verify the attestation certificate, sign the CSR and the certificate will be imported to the Yubikey.</p>



<p><strong>Note: If you have problems enrolling and try to reenroll, you might need to delete temporary files _*.</strong></p>



<p>You can now use the Yubikey with the certificate on it to sign emails or login to your Desktop. As mentioned, this can be a topic for future blog posts.</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p>We showed here how an administrator can enroll a Yubikey with an x509 certificate to a user. At the same time privacyIDEA ensures, that the private key is really generated on the Yubikey. This is an important aspect, when using smartcards for authentication. This ensures, that the private key is unique and can not be copied, neither during the enrollment process nor lateron, making the smartcard a unique authentication factor.</p>



<p>The same way, a user could issue a CSR that was generated on a smartcard to privacyIDEA, making the enrollment process more robust.</p>



<p>This is an important fist step for privacyIDEA to deal with smartcards. We will continue working on  smartcard functionalities, smoothening the workflow and enhancing policies.</p>



<p>In an enterprise environment managing x509 certificates and smartcards on a central location is crucial. The Yubikey could contain several certificates. It can contain Webauthn profiles or HOTP slots. If a Yubikey is lost, the service desk should be able to revoke the one hardware key and the central management should know, which certificates and which HOTP slots are affected. With privacyIDEA we are working on this, to ease the life of administrators and service desk users.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Reset failcounter using event handlers</title>
		<link>https://www.privacyidea.org/reset-failcounter-using-event-handlers/</link>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Tue, 16 Apr 2019 17:02:55 +0000</pubDate>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Event Handler]]></category>
		<category><![CDATA[failcounter]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=1564</guid>

					<description><![CDATA[How to reset the failcounter using event handlers.]]></description>
										<content:encoded><![CDATA[
<p>An attacker could try to brute force the token of a user. This is why privacyIDEA uses a failcounter that increases on each failed authentication request. If the failcounter reaches a maximum value, authentication requests are blocked.</p>



<p>Event handlers are really very flexible and provide you with a lot of possibilities, we did not think of, when we developed them. In this blog post we show you, how you can use event handlers to reset this failcounter.</p>



<p>To do so, we use two event handlers. The first one we call &#8220;Write Authentication&#8221; the second one &#8220;Reset Failcounter&#8221;.</p>



<h3 class="wp-block-heading">First event handler to store the authentication date</h3>



<p>The first event handler stores the date when the failcounter is allowed to be reset again. It does this on every authentication request. I.e. each authentication request pushes a blocked token forward in time. An attacker would increase this date of the token even while the token is blocked. (You could change this behavior by adding more logic to the event handler).</p>



<p>The event handler “Write Authentication” is a token handler and does not need any additional conditions. It is important that you provide a higher order to this event handler. In this case we set the &#8220;Order&#8221; to &#8220;2&#8221;.</p>



<p>The Actions of the event handler look like this:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1024" height="718" src="https://www.privacyidea.org/wp-content/uploads/2019/04/image-1024x718.png" alt="" class="wp-image-1565" srcset="https://www.privacyidea.org/wp-content/uploads/2019/04/image-1024x718.png 1024w, https://www.privacyidea.org/wp-content/uploads/2019/04/image-300x210.png 300w, https://www.privacyidea.org/wp-content/uploads/2019/04/image-768x538.png 768w, https://www.privacyidea.org/wp-content/uploads/2019/04/image.png 1198w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>This event handler sets a &#8220;tokeninfo&#8221; entry on each authentication request. The key of the tokeninfo is &#8220;allow_counter_reset&#8221;. The value is the current time (&#8220;{now}&#8221;) plus certain minutes. So this is a timestamp in the future, when the failcounter should be allowed to reset.</p>



<h3 class="wp-block-heading">Second event handler to reset the failcounter</h3>



<p>The second event hanlder is actually ment to reset
the failcounter.</p>



<p>Note, that the order (priority) must have a lower value than the first event handler. This way this reset event hanlder gets executed before the event handler, that sets the timestamp!</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="879" height="337" src="https://www.privacyidea.org/wp-content/uploads/2019/04/image-1.png" alt="" class="wp-image-1567" srcset="https://www.privacyidea.org/wp-content/uploads/2019/04/image-1.png 879w, https://www.privacyidea.org/wp-content/uploads/2019/04/image-1-300x115.png 300w, https://www.privacyidea.org/wp-content/uploads/2019/04/image-1-768x294.png 768w" sizes="auto, (max-width: 879px) 100vw, 879px" /></figure>



<p>The conditions of this event handler now check for the timestamp we set in the first event handler:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="879" height="302" src="https://www.privacyidea.org/wp-content/uploads/2019/04/image-2.png" alt="" class="wp-image-1569" srcset="https://www.privacyidea.org/wp-content/uploads/2019/04/image-2.png 879w, https://www.privacyidea.org/wp-content/uploads/2019/04/image-2-300x103.png 300w, https://www.privacyidea.org/wp-content/uploads/2019/04/image-2-768x264.png 768w" sizes="auto, (max-width: 879px) 100vw, 879px" /><figcaption><br><br></figcaption></figure>



<p>This event handler will trigger, if the token is locked (the failcounter has reached the maximum value) and the tokeninfo &#8220;allow_counter_reset&#8221; lies in the past. I.e. the specified minutes in the first event handler are actually over.</p>



<p> The action of this event handler simply resets the fail counter:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="874" height="284" src="https://www.privacyidea.org/wp-content/uploads/2019/04/image-3.png" alt="" class="wp-image-1570" srcset="https://www.privacyidea.org/wp-content/uploads/2019/04/image-3.png 874w, https://www.privacyidea.org/wp-content/uploads/2019/04/image-3-300x97.png 300w, https://www.privacyidea.org/wp-content/uploads/2019/04/image-3-768x250.png 768w" sizes="auto, (max-width: 874px) 100vw, 874px" /></figure>



<h2 class="wp-block-heading">Effective behaviour</h2>



<p>An authentication request, that occurs after the specified time will actually reset the failcounter. But since this event handler can only be executed <strong>after</strong> the authentication request, an authentication request with a valid OTP value will reset the failcounter, but it will not succeed, since the request has already been handled.  </p>



<p>Thus a user has to authenticate twice to first unlock the token and then to actually successfully authenticate.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Run privacyIDEA with nginx reverse proxy</title>
		<link>https://www.privacyidea.org/run-privacyidea-nginx-reverse-proxy/</link>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Wed, 27 Sep 2017 10:08:32 +0000</pubDate>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[ownCloud]]></category>
		<category><![CDATA[reverse proxy]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=1267</guid>

					<description><![CDATA[You can use nginx to act as a reverse proxy in front of any web application. Kenneth Cummings gave a talk at the ownCloud Conference 2017 how to combine different components to setup such a 2FA reverse proxy. &#160; Watch this video on YouTube.]]></description>
										<content:encoded><![CDATA[<p>You can use nginx to act as a reverse proxy in front of any web application.</p>
<p>Kenneth Cummings gave a talk at the ownCloud Conference 2017 how to combine different components to setup such a 2FA reverse proxy.</p>
<p>&nbsp;</p>
<p><a href="https://www.privacyidea.org/run-privacyidea-nginx-reverse-proxy/"><img decoding="async" src="https://www.privacyidea.org/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2F39SES-DheBM%2Fhqdefault.jpg" alt="YouTube Video"></a><br /> <a href="https://youtu.be/39SES-DheBM" target="_blank">Watch this video on YouTube</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Most flexible two factor authentication &#8211; handling your events!</title>
		<link>https://www.privacyidea.org/most-flexible-two-factor-authentication-handling-your-events/</link>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Wed, 19 Jul 2017 12:19:06 +0000</pubDate>
				<category><![CDATA[documentation]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Event Handler]]></category>
		<category><![CDATA[notification]]></category>
		<category><![CDATA[Policy]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=1241</guid>

					<description><![CDATA[privacyIDEA comes with a great feature: The event handling framework. So learn more about the unlimited power of the event handling framework and how to use its flexibility to get a privacyIDEA setup, which fits your needs. Event Handling Framework When speaking of software or products the term &#8220;framework&#8221; might raise a connotation of &#8220;you have [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>privacyIDEA comes with a great feature: The <strong>event handling framework</strong>.</p>
<p>So learn more about the unlimited power of the event handling framework and how to use its flexibility to get a privacyIDEA setup, which fits your needs.</p>
<h2>Event Handling Framework</h2>
<p>When speaking of software or products the term &#8220;framework&#8221; might raise a connotation of &#8220;you have to do it yourself&#8221;, &#8220;things are not ready&#8221;, &#8220;the software is not usable&#8221;.</p>
<p>A javascript framework can help you to develop cool web front ends. A python framework can be the basis for developing microservices and the framework Qt still requires the developer to develop the real program with the business logic.</p>
<p>When speaking of the Event Handling Framework things might similar: We the developer do not know how you want to use privacyIDEA and thus we give you the biggest flexibility. We have not thought of all possibilities in which you &#8211; the administrator &#8211; could use this framework! So you can come up with usage scenarios or configuration combinations <strong>noone has ever seen before</strong>!</p>
<p>But when speaking of the Event Handling Framework things are a bit different: You do not have to be a developer to solve your ideas or have privacyIDEA run the way you want it to.</p>
<p>Using the Event Handling Framework you can get the highest flexibility out of a state of the art authentication server, just by easily configuring rules in an easy web interface.</p>
<h2>The basic concept of Event Handlers</h2>
<p><figure id="attachment_1249" aria-describedby="caption-attachment-1249" style="width: 612px" class="wp-caption aligncenter"><a href="https://www.privacyidea.org/wp-content/uploads/2017/07/event-handler-overview.png"><img loading="lazy" decoding="async" class="wp-image-1249" src="https://www.privacyidea.org/wp-content/uploads/2017/07/event-handler-overview-300x152.png" alt="" width="612" height="310" srcset="https://www.privacyidea.org/wp-content/uploads/2017/07/event-handler-overview-300x152.png 300w, https://www.privacyidea.org/wp-content/uploads/2017/07/event-handler-overview-768x389.png 768w, https://www.privacyidea.org/wp-content/uploads/2017/07/event-handler-overview-1024x519.png 1024w, https://www.privacyidea.org/wp-content/uploads/2017/07/event-handler-overview.png 1281w" sizes="auto, (max-width: 612px) 100vw, 612px" /></a><figcaption id="caption-attachment-1249" class="wp-caption-text">The list of event handling definitions</figcaption></figure></p>
<h3>A top level view</h3>
<p>Each API request is an event:</p>
<ul>
<li>An authentication request,</li>
<li>the request to issue a token,</li>
<li>to block a token</li>
<li>or unassign a token.</li>
<li>If a user logs in to the Web UI, this is an API request&#8230;</li>
</ul>
<p>You can see the <a href="http://privacyidea.readthedocs.io/en/latest/modules/api.html" target="_blank" rel="noopener noreferrer">full list of all API calls here</a>.</p>
<p>The Event Handling Framework allows the administrator to &#8220;attach&#8221; new actions to each and every API call/event. It roughly works like this:</p>
<p style="padding-left: 30px;">event -&gt; condition -&gt; action</p>
<h3>Conditions</h3>
<p>But these actions are only triggered in case a list of <strong>conditions</strong> evaluate to <em>true</em>.  Conditions can be:</p>
<ul>
<li>if an authentication request was successful,</li>
<li>if the role of the user in the request was &#8220;administrator&#8221; or &#8220;user&#8221;,</li>
<li>if the token used was of a certain type</li>
<li>but also more complex conditions like if a date contained in a tokeninfo field of the used token is before or after a certain timestamp or of a certain age.</li>
</ul>
<p>There are currently 14 different, sometimes rather complex conditions and the number is growing.  For a <a href="http://privacyidea.readthedocs.io/en/latest/eventhandler/index.html#conditions" target="_blank" rel="noopener noreferrer">full list of conditions see the online documentation</a>.</p>
<h3>Actions &#8211; The Event Handlers</h3>
<p>Actions are performed by the event handlers. Currently there are three &#8220;groups&#8221;: Notifications, Token actions and scripts.</p>
<p>Roughly speaking the <em>Notification</em> actions will automatically notify administrators or users in case of certain events and if certain conditions apply. Notification can be done via email or SMS.</p>
<p>The administrator can also define that <em>Token actions</em> will happen. These are roughly all actions on tokens you can think of: enable, disable, set description and validity period, set abitrary tokeninfo fields, delete tokens and even enroll new tokens! This is probably the most important handler for automating tasks which e.g. can help large organizations with enrollment processes.</p>
<p>Finally there is the <em>Script Handler</em>, which can trigger shell scripts. The privacyIDEA administrator can write and define any number of shell scripts and thus gets unlimited possibilities. The usual use case we think about might be running backups or cleaning up orphaned tokens. But you will have probably a lot of other ideas.</p>
<p><figure id="attachment_1251" aria-describedby="caption-attachment-1251" style="width: 557px" class="wp-caption aligncenter"><a href="https://www.privacyidea.org/wp-content/uploads/2017/07/event-details.png"><img loading="lazy" decoding="async" class=" wp-image-1251" src="https://www.privacyidea.org/wp-content/uploads/2017/07/event-details-300x169.png" alt="" width="557" height="314" srcset="https://www.privacyidea.org/wp-content/uploads/2017/07/event-details-300x169.png 300w, https://www.privacyidea.org/wp-content/uploads/2017/07/event-details-768x433.png 768w, https://www.privacyidea.org/wp-content/uploads/2017/07/event-details.png 918w" sizes="auto, (max-width: 557px) 100vw, 557px" /></a><figcaption id="caption-attachment-1251" class="wp-caption-text">The action &#8220;set description&#8221; defined in a token event. During enrollment the description of the token gets set to &#8220;This token needs to be shipped 2017-07-10T10:00+0200&#8221;.</figcaption></figure></p>
<h2>Examples</h2>
<p>Some of these examples might occur to you a bit far fetched. But after all these are examples of what is possible. So you may come up with your own scenarios which very probably will also work out nicely.</p>
<h3>Notify the user in case his password is breached</h3>
<p>The notification event handler can send an email or an SMS to the user, if &#8220;he&#8221; fails to authenticate. This way the user knows, if someone else tried to authenticate.</p>
<p>This can be combined with the condition of the <em>tokentype</em>. The tokentype is only known (and thus only the event handler will trigger) if the OTP PIN a.k.a. static password of the user is correct. Thus the user gets notified if someone guessed or sniffed his static password but fails at the second factor.</p>
<p><figure id="attachment_1258" aria-describedby="caption-attachment-1258" style="width: 537px" class="wp-caption aligncenter"><a href="https://www.privacyidea.org/wp-content/uploads/2017/07/tokentype-definition.png"><img loading="lazy" decoding="async" class=" wp-image-1258" src="https://www.privacyidea.org/wp-content/uploads/2017/07/tokentype-definition-300x119.png" alt="" width="537" height="213" srcset="https://www.privacyidea.org/wp-content/uploads/2017/07/tokentype-definition-300x119.png 300w, https://www.privacyidea.org/wp-content/uploads/2017/07/tokentype-definition-768x304.png 768w, https://www.privacyidea.org/wp-content/uploads/2017/07/tokentype-definition.png 973w" sizes="auto, (max-width: 537px) 100vw, 537px" /></a><figcaption id="caption-attachment-1258" class="wp-caption-text">The condition contains the tokentype. The event will only trigger if the used token is an HOTP or TOTP token.</figcaption></figure></p>
<h3>Limit token usage</h3>
<p>If for any reason you need a token, that the user is only allowed to use for a limited time. E.g. the user would only be allowed to login 100 times.</p>
<p>You can create an event handler definition in the token handler to disable the token, if it either was successfully used more than 100 times or it was unsuccessfully used more than 50 times. (To whoever this may concern).</p>
<p><figure id="attachment_1259" aria-describedby="caption-attachment-1259" style="width: 542px" class="wp-caption aligncenter"><a href="https://www.privacyidea.org/wp-content/uploads/2017/07/disable-token.png"><img loading="lazy" decoding="async" class=" wp-image-1259" src="https://www.privacyidea.org/wp-content/uploads/2017/07/disable-token-300x154.png" alt="" width="542" height="278" srcset="https://www.privacyidea.org/wp-content/uploads/2017/07/disable-token-300x154.png 300w, https://www.privacyidea.org/wp-content/uploads/2017/07/disable-token-768x393.png 768w, https://www.privacyidea.org/wp-content/uploads/2017/07/disable-token.png 992w" sizes="auto, (max-width: 542px) 100vw, 542px" /></a><figcaption id="caption-attachment-1259" class="wp-caption-text">Disable a token, that was used too often.</figcaption></figure></p>
<h3>Automatically Unlock locked tokens</h3>
<p>Starting with privacyIDEA 2.20 (currently under development) you can also use timestamp tags in the tokeninfo condition and settings. I.e. if one event occurs, the token event handler can use the &#8220;set tokeninfo&#8221; to set additional information like <strong>tokeninfo key=locked</strong> and <strong>tokeninfo value={now}</strong>. The tag &#8220;now&#8221; will be converted to the current timestamp. This action could be called on a failed authentication request. You could also mark the token for any other reason.</p>
<p><figure id="attachment_1260" aria-describedby="caption-attachment-1260" style="width: 600px" class="wp-caption aligncenter"><a href="https://www.privacyidea.org/wp-content/uploads/2017/07/mark-the-token.png"><img loading="lazy" decoding="async" class="wp-image-1260" src="https://www.privacyidea.org/wp-content/uploads/2017/07/mark-the-token-300x162.png" alt="" width="600" height="324" srcset="https://www.privacyidea.org/wp-content/uploads/2017/07/mark-the-token-300x162.png 300w, https://www.privacyidea.org/wp-content/uploads/2017/07/mark-the-token-768x415.png 768w, https://www.privacyidea.org/wp-content/uploads/2017/07/mark-the-token.png 968w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1260" class="wp-caption-text">Mark the token with the current timestamp.</figcaption></figure></p>
<p>A second event handler can check for this timestamp. I.e. the condition can verify if the timestamp is past &#8211; lets say &#8211; one week/7 days. In this case a second action like unlocking the token can be performed.</p>
<p><figure id="attachment_1261" aria-describedby="caption-attachment-1261" style="width: 600px" class="wp-caption aligncenter"><a href="https://www.privacyidea.org/wp-content/uploads/2017/07/tokeninfo-conditions.png"><img loading="lazy" decoding="async" class="wp-image-1261" src="https://www.privacyidea.org/wp-content/uploads/2017/07/tokeninfo-conditions-300x54.png" alt="" width="600" height="108" srcset="https://www.privacyidea.org/wp-content/uploads/2017/07/tokeninfo-conditions-300x54.png 300w, https://www.privacyidea.org/wp-content/uploads/2017/07/tokeninfo-conditions-768x139.png 768w, https://www.privacyidea.org/wp-content/uploads/2017/07/tokeninfo-conditions.png 970w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1261" class="wp-caption-text">Check if the locked timestamp is newer than 7 days old.</figcaption></figure></p>
<p>This can be achieved by using the <em>tokeninfo</em> condition. This check can also check strings, integers and dates for being less, equal or greater. This helps to easily automate many tedious tasks.</p>
<h2>Under the hood</h2>
<p>The online documentation should <a href="http://privacyidea.readthedocs.io/en/latest/eventhandler/index.html" target="_blank" rel="noopener noreferrer">contain the full developer view of the event handlers</a>.</p>
<h3>Decorators</h3>
<p>privacyIDEA is based on the python framework Flask and uses a lot of decorators to structure code, reduce lines of code and improve testability. The event handler adds one decorator &#8220;@event&#8221;. E.g. this <a href="https://github.com/privacyidea/privacyidea/blob/master/privacyidea/api/validate.py#L176" target="_blank" rel="noopener noreferrer">decorator decorates the endpoint &#8220;/validate/check&#8221;</a>.</p>
<p>The decorator takes care of registering this endpoint in the event handler framework but also calling possible actions.</p>
<h3>Event Handler Class</h3>
<p>Each event handler (<a href="http://privacyidea.readthedocs.io/en/latest/eventhandler/usernotification.html" target="_blank" rel="noopener noreferrer">Notification</a>, <a href="http://privacyidea.readthedocs.io/en/latest/eventhandler/tokenhandler.html" target="_blank" rel="noopener noreferrer">Token Handler</a>, <a href="http://privacyidea.readthedocs.io/en/latest/eventhandler/scripthandler.html" target="_blank" rel="noopener noreferrer">Scripts</a>) is a python Class, that inherits from the Base Handler. Each handler could define its own conditions and its own actions and thus can work self-contained and add any functionality to privacyIDEA.</p>
<h3>Do actions</h3>
<p>As the event handler like the Token Event Handler use already existing code for diabling or enrolling tokens, these eventhandlers are relatively small and stable. E.g. the token event handler is roughly 100 lines of code defining the allowed actions and another 100 lines of code for calling existing lower level functions.</p>
<p>This is done in the main function &#8220;<a href="https://github.com/privacyidea/privacyidea/blob/master/privacyidea/lib/eventhandler/tokenhandler.py#L211" target="_blank" rel="noopener noreferrer">do</a>&#8221; of the event handler.</p>
<h3>Conditions</h3>
<p>Each event handler could also define its own conditions, if this is necessary or makes sense. But for now all conditions are the same for all event handlers and thus only the base event handler class implements the method &#8220;<a href="https://github.com/privacyidea/privacyidea/blob/master/privacyidea/lib/eventhandler/base.py#L245" target="_blank" rel="noopener noreferrer">check_conditions</a>&#8220;.</p>
<h2>Finally</h2>
<p><figure id="attachment_1255" aria-describedby="caption-attachment-1255" style="width: 518px" class="wp-caption aligncenter"><a href="https://www.privacyidea.org/wp-content/uploads/2017/07/stairs-1036882_1280.jpg"><img loading="lazy" decoding="async" class="wp-image-1255" src="https://www.privacyidea.org/wp-content/uploads/2017/07/stairs-1036882_1280-300x200.jpg" alt="" width="518" height="345" srcset="https://www.privacyidea.org/wp-content/uploads/2017/07/stairs-1036882_1280-300x200.jpg 300w, https://www.privacyidea.org/wp-content/uploads/2017/07/stairs-1036882_1280-768x512.jpg 768w, https://www.privacyidea.org/wp-content/uploads/2017/07/stairs-1036882_1280-1024x682.jpg 1024w, https://www.privacyidea.org/wp-content/uploads/2017/07/stairs-1036882_1280.jpg 1280w" sizes="auto, (max-width: 518px) 100vw, 518px" /></a><figcaption id="caption-attachment-1255" class="wp-caption-text">Your imagination!</figcaption></figure></p>
<p>Adding event handler definitions is a matter of a few clicks for the administrator. But it is a great step for the automation of your privacyIDEA installation.</p>
<p>Adding a new event handler class is also only a matter of inheriting the base handler class and starting with woughly 50 lines of code. The hardest thing is to come up with a new idea! But the only limit is your imagination!</p>
<h2></h2>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Create your own user portal</title>
		<link>https://www.privacyidea.org/create-user-portal/</link>
					<comments>https://www.privacyidea.org/create-user-portal/#respond</comments>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Tue, 01 Nov 2016 07:43:33 +0000</pubDate>
				<category><![CDATA[documentation]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Google Authenticator]]></category>
		<category><![CDATA[REST API]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=1089</guid>

					<description><![CDATA[Sometimes it is important to add user self service functionalities to your own portal or create a stripped down version of the privacyIDEA user selfservice. You can strip down the rights for users in a very detailed manner using policies. You can also define an enrollment wizard policy, so that enrolling tokens gets even more [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Sometimes it is important to add user self service functionalities to your own portal or create a stripped down version of the privacyIDEA user selfservice. You can strip down the rights for users in a very detailed manner <a href="http://privacyidea.readthedocs.io/en/latest/policies/user.html" target="_blank">using policies</a>. You can also <a href="https://www.youtube.com/watch?v=diAGbsiG8_A" target="_blank">define an enrollment wizard policy</a>, so that enrolling tokens gets even more simpler. But sometimes even this is not enough.<a href="https://www.privacyidea.org/wp-content/uploads/2016/11/rest-api.png"><img loading="lazy" decoding="async" class=" wp-image-1090 alignright" src="https://www.privacyidea.org/wp-content/uploads/2016/11/rest-api-300x256.png" alt="rest-api" width="177" height="151" srcset="https://www.privacyidea.org/wp-content/uploads/2016/11/rest-api-300x256.png 300w, https://www.privacyidea.org/wp-content/uploads/2016/11/rest-api.png 649w" sizes="auto, (max-width: 177px) 100vw, 177px" /></a></p>
<h2>privacyIDEA REST API</h2>
<p>privacyIDEA provides a great and <a href="http://privacyidea.readthedocs.io/en/latest/modules/api.html" target="_blank">simple REST API</a> which lets you automate and integrate all tasks into other workflows. In fact the privacyIDEA Web UI as a single page application uses this REST API. Thus you could easily open the developer tools of your browser and monitor the HTTP requests that are sent.</p>
<h3>Authenticating a user</h3>
<p>A user needs to authenticate at the Web UI and also at the REST API. This is done by issuing the request</p>
<p><figure id="attachment_1092" aria-describedby="caption-attachment-1092" style="width: 152px" class="wp-caption alignright"><a href="https://www.privacyidea.org/wp-content/uploads/2016/11/auth-request.png"><img loading="lazy" decoding="async" class=" wp-image-1092" src="https://www.privacyidea.org/wp-content/uploads/2016/11/auth-request-300x215.png" alt="Auth-Request in the Chrome developer tools." width="152" height="109" srcset="https://www.privacyidea.org/wp-content/uploads/2016/11/auth-request-300x215.png 300w, https://www.privacyidea.org/wp-content/uploads/2016/11/auth-request.png 593w" sizes="auto, (max-width: 152px) 100vw, 152px" /></a><figcaption id="caption-attachment-1092" class="wp-caption-text">Auth-Request in the Chrome developer tools.</figcaption></figure></p>
<pre>POST /auth</pre>
<p><a href="http://privacyidea.readthedocs.io/en/latest/modules/api/auth.html#post--auth" target="_blank">The auth request</a> takes the username and the users password. Which password the user needs to provide, depends on the <em>login_mode</em> policy in the <em>WebUI</em> scope. The auth request returns an <em>authorization token</em> which needs to be added to each subsequent request.</p>
<p>You can also issue a test request using <em>httpie</em> from the command line like this:</p>
<pre>% http --verify no --pretty all --json POST https://localhost/auth username=secureuser password=test
/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:794: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
 InsecureRequestWarning)
HTTP/1.1 200 OK
Cache-Control: no-cache
Connection: keep-alive
Content-Length: 843
Content-Type: application/json
Date: Tue, 01 Nov 2016 07:28:55 GMT
Server: nginx/1.10.0 (Ubuntu)

{
 "id": 1, 
 "jsonrpc": "2.0", 
 "result": {
 "status": true, 
 "value": {
 "default_tokentype": "totp", 
 "log_level": 30, 
 "logout_time": 120, 
 "menus": [], 
 "policy_template_url": "https://raw.githubusercontent.com/privacyidea/policy-templates/master/templates/", 
 "realm": "secure", 
 "rights": [], 
 "role": "user", 
 "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InNlY3VyZXVzZXIiLCJub25jZSI6IjQyYjhhMWIzNDEzYTA5ZmQzMDljMDI3NzY3Mjc4N2I5MmFiNWI2ZWUiLCJhdXRodHlwZSI6InBhc3N3b3JkIiwicmVhbG0iOiJzZWN1cmUiLCJyaWdodHMiOltdLCJyb2xlIjoidXNlciIsImV4cCI6MTQ3Nzk4ODkzNX0.vCXNNV4Bmt2UuC0FMuc2qMbr8i_8zweROadvfLYcJzU", 
 "token_page_size": 15, 
 "token_wizard": false, 
 "token_wizard_2nd": false, 
 "user_details": false, 
 "user_page_size": 15, 
 "username": "secureuser"
 }
 }, 
 "time": 1477985335.376939, 
 "version": "privacyIDEA 2.16.dev3", 
 "versionnumber": "2.16.dev3"
}</pre>
<p>Using the authorization token</p>
<p>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InNlY3VyZXVzZXIiLCJub25jZSI6IjQyYjhhMWIzNDEzYTA5ZmQzMDljMDI3NzY3Mjc4N2I5MmFiNWI2ZWUiLCJhdXRodHlwZSI6InBhc3N3b3JkIiwicmVhbG0iOiJzZWN1cmUiLCJyaWdodHMiOltdLCJyb2xlIjoidXNlciIsImV4cCI6MTQ3Nzk4ODkzNX0.vCXNNV4Bmt2UuC0FMuc2qMbr8i_8zweROadvfLYcJzU</p>
<p>for subsequent call.</p>
<h3>Enrolling a token</h3>
<p>Now the user can enroll a token using the <a href="http://privacyidea.readthedocs.io/en/latest/modules/api/token.html" target="_blank">token endpoints</a>. You need to issue a /token/init request.</p>
<p>To enroll an TOTP token the user would have to issue such a request:</p>
<pre>http --verify no --pretty all --json POST https://localhost/token/init \
     PI-Authorization:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InNlY3VyZXVzZXIiLCJub25jZSI6IjQyYjhhMWIzNDEzYTA5ZmQzMDljMDI3NzY3Mjc4N2I5MmFiNWI2ZWUiLCJhdXRodHlwZSI6InBhc3N3b3JkIiwicmVhbG0iOiJzZWN1cmUiLCJyaWdodHMiOltdLCJyb2xlIjoidXNlciIsImV4cCI6MTQ3Nzk4ODkzNX0.vCXNNV4Bmt2UuC0FMuc2qMbr8i_8zweROadvfLYcJzU \
     type=totp genkey=1 otplen=6</pre>
<p>The secret and also the image of the QR code to be scanned with a smartphone app is contained in the response:</p>
<pre> "googleurl": {
 "description": "URL for google Authenticator", 
 "img": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeoAAAHqAQAAAADjFjCXAAAD90lEQVR4nO2dTY6jSBBGXwxItQSpD+Cj4JuN6khzAziKbwBLS6CYRWaQ6epZGUaW218sEJR5SqUUiv+kzDkg019HaBAuXLhw4cKFCxd+Lm5ZWuzKZkw9MKVHsOtS7uLV63mrC/80HHd3Z3B397lx9xmgc2fwNd/Rxd0wN14R41vvXfir8SWbL7t2Kz4CTH3jDDczoHGGeTMAzKw9eXXhn4W3P559MrDh1q4M49Y6rC3DCA6Nw3Lq6sKFAzDMjee4rm/crkuLf/cAi9n/vrrwj8I7dx8JD+t+txzh7c41KSHg7uvJqwv/SHwyM7MeYGmx6/KVzBxAfvx7BmBLKeypqwv/MDwpVmmL+XTJhsxZNvPpsuKwpkfoHjtob7134a/Co3ISRZNUFxkBH2myig0zJIc7+Ir73KhyIvwMfDOzy4pdSSbNk66N3Yp/X1ZySWX5cqZ+k4cVfkCictKtLcM/X85kjdtwM5zubs7y5ZZeW3qM7m4++BbYW+9d+Kvw7GEh27XsTZObbTzZurHbXwEgpbnysMKflRLIAdERG2bIHTEeumSlVaa4TvjzEtkElGZsJBeNl/ShqKMXkdYJfx7374t71X2YerArAMuXA1tqxuYGrfqwwo9JMVwM1SVGAKqSyhxhXlVheeu9C38V/pA5QK7I5fQh+9pcQ2FXPVSvE35IstZ1/ptUypWS26yYOcyT1gl/WrL+zECaZeo8HGlys8XDQsk1ZOuEH5Bi61Idboy54VC9ukFWzJy0TvgBiSrx7j4jrsuXsH/p5fyoep3wQ1JZsxLN7XoVZeH9h4j1pHXCD0j4y1wRybLnsLA7170jIQ8r/Bj+0Gno9kkTGi9tsTrh6B7t31vvXfir8Lpysg/UVWU5Qv8i4Nt7s9I64U9LZBNF/1bKVEnKZpNznR9eka0T/rwU9xljTLuvjZmT/N4M+Tw26ogJPyRVbpD1L8py46P+7YlsXch7670LfxX+4EjnaLf+R4RXXdyldcIPSVYf4pzr8Gjr9kDuR29CWif8gFS2rrT7PSadqiGn6qJZYuEn4O63Frt2ax7ZzHObUTnJh8I2g+5umuoUfl4fNs8yVVavLtDlBhmgcxPCD+LV2X+HNX/Oaf9byGbO8mtlGMGmfo4f33rvwl+Ll291Ml3u9WfqhqpLAbC0MNzkYYWfgA+lVBzHc1JZeOqhfDAxVYmn/uTVhX8Y/nAyMc7j1DMnUTQpbYmCKa4Tfh4eZ1/zecQ8bjdDjKU0iuuEH5Eftq7MDVcTxOkzieWT2MphhR+Tug9bHfFv6t7sGKNN0TnTpJPwQxL1OmAvC5ejiOzzdWHhVnRGTPhB3PTf64QLFy5cuHDhwv8I/F/uK4F3xSCgRwAAAABJRU5ErkJggg==", 
 "value": "otpauth://totp/TOTP0008C54E?secret=ND2QFT6LIMFXCEARWIMTBT456NY6K7H5&amp;counter=1&amp;digits=6&amp;issuer=privacyIDEA"
 },</pre>
<p>In the same way you could let the user manage his tokens, delete them, reset PINs etc&#8230;</p>
<p>For more information see the <a href="http://privacyidea.readthedocs.io/en/latest/modules/api.html" target="_blank">complete REST API documentation</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.privacyidea.org/create-user-portal/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>privacyIDEA development &#8211; using PyCharm</title>
		<link>https://www.privacyidea.org/privacyidea-development-howto/</link>
					<comments>https://www.privacyidea.org/privacyidea-development-howto/#respond</comments>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Fri, 09 Sep 2016 14:12:15 +0000</pubDate>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Development]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=1035</guid>

					<description><![CDATA[Today I am talking about how I am developing privacyIDEA and how it might be easy for you to participate. A while ago I started using pycharm. There are many different IDEs out there.  I also used Aptana and Eclipse for a while. But pycharm just feels a bit quicker and navigation in the code [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Today I am talking about how I am developing privacyIDEA and how it might be easy for you to participate.</p>
<p>A while ago I started using <a href="https://www.jetbrains.com/pycharm/?fromMenu" target="_blank">pycharm</a>. There are many different IDEs out there. <a href="https://www.privacyidea.org/wp-content/uploads/2016/09/icon_PyCharm.png"><img loading="lazy" decoding="async" class="size-full wp-image-1039 alignright" src="https://www.privacyidea.org/wp-content/uploads/2016/09/icon_PyCharm.png" alt="icon_PyCharm" width="128" height="128" /></a> I also used Aptana and Eclipse for a while. But pycharm just feels a bit quicker and navigation in the code seem to me more intuitive. vim is no IDE to me. But everyone is allowed to do what suites him best. privacyIDEA is a project with several layers &#8211; database, libraries, dependencies and APIs. It helps me to be able to browse the code and &#8220;find usages&#8221; and &#8220;refactor&#8221; functions and variables.</p>
<p>So, in this blog post I will show you, how you can set up the privacyIDEA project for development, running and debugging.</p>
<h2>Get privacyIDEA</h2>
<p>First get the privacyIDEA sources. You may as well first fork privacyIDEA into your own repository, so that you can commit changes and issue pull requests. We clone the repository locally and also setup a virtualenv, so that you have everything you need for development.</p>
<pre>cd ~
git clone https://github.com/privacyidea/privacyidea.git
cd privacyidea
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt</pre>
<p>For pip install to run successfully, you might need to install additional development packages.</p>
<h2>Get PyCharm</h2>
<p>Go and <a href="https://www.jetbrains.com/pycharm/download/#section=linux" target="_blank">get pycharm for your operating system</a>. Follow the easy installation instructions on their website.</p>
<h2>Setup privacyIDEA project</h2>
<p>Now start pycharm and now we can set up the new privacyIDEA project.</p>
<p><figure id="attachment_1049" aria-describedby="caption-attachment-1049" style="width: 300px" class="wp-caption alignnone"><a href="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-01.png"><img loading="lazy" decoding="async" class="wp-image-1049 size-medium" src="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-01-300x291.png" alt="pycharm-01" width="300" height="291" srcset="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-01-300x291.png 300w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-01.png 474w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-1049" class="wp-caption-text">Create a new project.</figcaption></figure></p>
<p>Choose &#8220;Create New Project&#8221;. Select a &#8220;Pure Python&#8221; project with the Location of the folder, where you cloned the git repository.</p>
<p><figure id="attachment_1048" aria-describedby="caption-attachment-1048" style="width: 300px" class="wp-caption alignnone"><a href="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-02-create-new-project.png"><img loading="lazy" decoding="async" class="wp-image-1048 size-medium" src="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-02-create-new-project-300x178.png" alt="pycharm-02-create-new-project" width="300" height="178" srcset="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-02-create-new-project-300x178.png 300w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-02-create-new-project-768x456.png 768w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-02-create-new-project.png 782w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-1048" class="wp-caption-text">Select the directory of the cloned git repository.</figcaption></figure></p>
<p>We need to change the Interpreter. We want to use the Python Interpreter from our virtualenv. So click on the gear icon next to &#8220;Interpreter&#8221;, choose &#8220;Add local Python Interpreter&#8221; and select the python binary from your virtualenv.</p>
<p>&nbsp;</p>
<p><figure id="attachment_1046" aria-describedby="caption-attachment-1046" style="width: 300px" class="wp-caption alignnone"><a href="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-04.png"><img loading="lazy" decoding="async" class="wp-image-1046 size-medium" src="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-04-300x146.png" alt="pycharm-04" width="300" height="146" srcset="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-04-300x146.png 300w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-04-768x374.png 768w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-04.png 972w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-1046" class="wp-caption-text">Use the existing files to create the project.</figcaption></figure></p>
<p>pycharm is now indexing the python code in your project. This may take quite a while.</p>
<p>Meanwhile we can&#8230;</p>
<h2>Set up your local privacyIDEA</h2>
<p>We are running and debugging privacyIDEA from within pycharm. We will do this on the current code we are developing. Thus we need to setup privacyIDEA. In the root directory of the project you will find the script <em>pi-manage</em>.</p>
<p>We need to create encryption and signing keys and also the local database &#8220;data.sqlite&#8221;. This configuration is read from the internal config in <em>privacyidea/config.py</em>.</p>
<pre>./pi-manage create_enckey
./pi-manage create_audit_keys
./pi-manage createdb
./pi-manage admin add &lt;yourAdminAccount&gt;</pre>
<p>In the last step we create the first token administrator. You may think of a name and provide the administrators password.</p>
<h2>Create Run and Debug Configurations</h2>
<p>When indexing is done, we can create <em>Run and Debug Configurations</em>. These configurations help you to run tests, run the privacyIDEA server and also debug these runs.</p>
<p>On the upper right corner is a drop down box, which is initially empty. Choose &#8220;Edit Configurations&#8230;&#8221;.</p>
<p><figure id="attachment_1051" aria-describedby="caption-attachment-1051" style="width: 600px" class="wp-caption alignnone"><a href="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-create-run-configuration.png"><img loading="lazy" decoding="async" class="wp-image-1051" src="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-create-run-configuration-300x229.png" alt="pycharm-create-run-configuration" width="600" height="458" srcset="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-create-run-configuration-300x229.png 300w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-create-run-configuration-768x587.png 768w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-create-run-configuration-1024x782.png 1024w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-create-run-configuration.png 1063w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1051" class="wp-caption-text">Create run configuration</figcaption></figure></p>
<p>First we will create a pure Python configuration we might call &#8220;run server&#8221;. The server can be run locally also using the script <em>pi-manage</em>. Thus we enter &#8220;pi-manage&#8221; as the Script and &#8220;runserver&#8221; as the parameter.</p>
<p>Please assure, to select the correct Python interpreter. This one in our virtualenv!</p>
<p>Also choose the project root directory as working directory. This way we do not have to install the privacyIDEA python module, but can just run on the current code.</p>
<p>We also create a second configuration which we use to run all integrated tests.</p>
<p><figure id="attachment_1053" aria-describedby="caption-attachment-1053" style="width: 600px" class="wp-caption alignnone"><a href="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-run-tests.png"><img loading="lazy" decoding="async" class="wp-image-1053" src="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-run-tests-300x241.png" alt="pycharm-run-tests" width="600" height="483" srcset="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-run-tests-300x241.png 300w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-run-tests-768x618.png 768w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-run-tests.png 952w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1053" class="wp-caption-text">Create Test configuration</figcaption></figure></p>
<p>The test configuration lets us run all 700+ tests in the tests directory.</p>
<h2>Run it!</h2>
<p>Want to see, what I mean? Select the configuration &#8220;run server&#8221; and hit the green start triangle. pycharm will run privacyIDEA and it will listen on localhost:5000.</p>
<p>You can now navigate your browser to <a href="http://localhost:5000" target="_blank">http://localhost:5000</a> and log in as the administrator, which you created earlier.</p>
<h2>The Code</h2>
<p>On the left side you can have different views like the project view (files) or the code structure of the current file.</p>
<p><figure id="attachment_1040" aria-describedby="caption-attachment-1040" style="width: 599px" class="wp-caption alignnone"><a href="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-structure.png"><img loading="lazy" decoding="async" class="wp-image-1040" src="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-structure-300x194.png" alt="pycharm-structure" width="599" height="387" srcset="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-structure-300x194.png 300w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-structure-768x496.png 768w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-structure-1024x661.png 1024w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-structure.png 1106w" sizes="auto, (max-width: 599px) 100vw, 599px" /></a><figcaption id="caption-attachment-1040" class="wp-caption-text">Code structure</figcaption></figure></p>
<p>There are many different ways to navigate the code and over time everyone will finds his preferred way. You can navigate via the tree views on the left, by navigating within the code by jumping the method and class definitions or by the breadcrumps above the main window.</p>
<p>Within the project you can also use Ctrl-H so search anything in the current sub folder.</p>
<h3>privacyIDEA Code Structure</h3>
<p><figure id="attachment_1058" aria-describedby="caption-attachment-1058" style="width: 469px" class="wp-caption alignnone"><a href="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-privacyidea-structure.png"><img loading="lazy" decoding="async" class="wp-image-1058 size-full" src="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-privacyidea-structure.png" alt="pycharm-privacyidea-structure" width="469" height="578" srcset="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-privacyidea-structure.png 469w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-privacyidea-structure-243x300.png 243w" sizes="auto, (max-width: 469px) 100vw, 469px" /></a><figcaption id="caption-attachment-1058" class="wp-caption-text">privacyIDEA Code structure</figcaption></figure></p>
<p>The basic structure in privacyIDEA looks like this:</p>
<p>You will find the database definition in <em>privacyidea/models.py</em>.</p>
<p>All library functions, which operate on the database are located in <em>privacyidea/lib/</em>. The REST API of the privacyIDEA server is defined in <em>privacyidea/api/</em>.</p>
<p><em>privacyidea/webui/</em> contains the jump in point for the UI. The privacyIDEA WebUI is implemented as a AngularJS Single Page Application. All this can be found in <em>privacyidea/static/</em>.</p>
<h2>Debug it!</h2>
<p><figure id="attachment_1041" aria-describedby="caption-attachment-1041" style="width: 600px" class="wp-caption alignnone"><a href="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-debug-view.png"><img loading="lazy" decoding="async" class="wp-image-1041" src="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-debug-view-300x216.png" alt="pycharm-debug-view" width="600" height="432" srcset="https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-debug-view-300x216.png 300w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-debug-view-768x553.png 768w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-debug-view-1024x738.png 1024w, https://www.privacyidea.org/wp-content/uploads/2016/09/pycharm-debug-view.png 1614w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a><figcaption id="caption-attachment-1041" class="wp-caption-text">Debug the code, the auth API</figcaption></figure></p>
<p>You may also select the configuration &#8220;run server&#8221; and hit the debug button. privacyIDEA will be started and listen on port 5000. But this time you can set breakpoints and step through the code. In the above example we set a breakpoint in the REST API /auth/ which is called when a user is trying to login to the WebUI. This way we can stept through the login process and monitor all variables.</p>
<h2>Fork it!</h2>
<p>I very much hope you liked this short introduction and it helps you to better understand the internals of privacyIDEA or to get started with privacyIDEA development. So go and fork privacyIDEA at github, get your pycharm, add new features and issue your pull requests!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.privacyidea.org/privacyidea-development-howto/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Choose required Security Level with privacyIDEA</title>
		<link>https://www.privacyidea.org/choose-required-security-level-with-privacyidea/</link>
					<comments>https://www.privacyidea.org/choose-required-security-level-with-privacyidea/#respond</comments>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Wed, 20 Jan 2016 11:22:09 +0000</pubDate>
				<category><![CDATA[opinions]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Google Authenticator]]></category>
		<category><![CDATA[security level]]></category>
		<category><![CDATA[SMS OTP]]></category>
		<category><![CDATA[Token Types]]></category>
		<category><![CDATA[Yubikey]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=852</guid>

					<description><![CDATA[With SMS OTP a one time password is sent to a mobile phone. The user is supposed to enter this one time password in addition to his static password. This way, the authenticating party thinks to verify, that the user is in the possession of the mobile phone. This is a cheap way to establish [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>With SMS OTP a one time password is sent to a mobile phone. The user is supposed to enter this one time password in addition to his static password. This way, the authenticating party thinks to verify, that the user is in the possession of the mobile phone.</p>
<p>This is a cheap way to establish two-factor authentication with something you know and something you have.</p>
<h2>Several attack vectors for Two-Factor Authentication with SMS OTP</h2>
<p><figure id="attachment_856" aria-describedby="caption-attachment-856" style="width: 300px" class="wp-caption alignright"><a href="https://www.privacyidea.org/wp-content/uploads/2016/01/mobile-phone-991494_640.jpg" rel="attachment wp-att-856"><img loading="lazy" decoding="async" class="size-medium wp-image-856" src="https://www.privacyidea.org/wp-content/uploads/2016/01/mobile-phone-991494_640-300x167.jpg" alt="Your OTP on the mobile is vulnarable." width="300" height="167" srcset="https://www.privacyidea.org/wp-content/uploads/2016/01/mobile-phone-991494_640-300x167.jpg 300w, https://www.privacyidea.org/wp-content/uploads/2016/01/mobile-phone-991494_640.jpg 640w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-856" class="wp-caption-text">Your OTP on the mobile is vulnarable.</figcaption></figure></p>
<p>But lateley there are again some news about the vularability of OTP values sent via SMS. There are different attack vectors. In one scenario <a href="http://mobilemarketingmagazine.com/97087-2/" target="_blank">the attacker can reroute or &#8220;steal&#8221; the SIM card by doing social engineering at the telephone provider</a>. In another scenario <a href="http://www.businessinsider.de/malware-discovered-that-defeats-two-factor-authentication-symantec-2016-1" target="_blank">a malicious software is installed on the smartphone, that can sniff the OTP value</a>.</p>
<p>Yes, privacyIDEA also supports sending OTP values via SMS and privacyIDEA is also vulnarable to these attacks &#8211; since it is the basic concept that lacks the necessary security.</p>
<h2>Security is shades of grey &#8212; or white</h2>
<p><figure id="attachment_855" aria-describedby="caption-attachment-855" style="width: 300px" class="wp-caption alignleft"><a href="https://www.privacyidea.org/wp-content/uploads/2016/01/mixing-desk-351478_640.jpg" rel="attachment wp-att-855"><img loading="lazy" decoding="async" class="size-medium wp-image-855" src="https://www.privacyidea.org/wp-content/uploads/2016/01/mixing-desk-351478_640-300x199.jpg" alt="Security is shades of grey. Some volume between 0 and 99%." width="300" height="199" srcset="https://www.privacyidea.org/wp-content/uploads/2016/01/mixing-desk-351478_640-300x199.jpg 300w, https://www.privacyidea.org/wp-content/uploads/2016/01/mixing-desk-351478_640.jpg 640w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-855" class="wp-caption-text">Security is shades of grey. Some volume between 0 and 99%.</figcaption></figure></p>
<p>But you might have heard that &#8220;there is no 100% security&#8221;. And that &#8220;security is a process&#8221;. And now I add to these idioms &#8220;Security is Shades of Grey&#8221;.</p>
<p>You gain security by using a password on your account to lock the desktop. But are you secure? You gain further security by adding a second factor during authentication. But is your data secure, now? You gain further security by encrypting the harddisk (a.k.a. your data) of your desktop. But is it secure?</p>
<p>Yes, it is good to use a password. You should not use none.</p>
<p>And yes, it is goot to use SMS OTP. It is better than to not use it. In certain cases it might be OK to use SMS OTP being aware of the possible risks.</p>
<p>But there are further steps or other possiblities to increase security.</p>
<h2>Choice of Security Level</h2>
<p>With privacyIDEA you have the choice, which security level you are going to use. And this may even depend on the application and the client.</p>
<p>You may use <a href="https://www.privacyidea.org/about/features/">SMS OTP, Email OTP, Smartphone Apps like the Google Authenticator, hardware key fobs and seedable tokens</a> like the <a href="https://www.privacyidea.org/privacyidea-admin-client-for-yubikey-mass-enrollment/">Yubikey</a>. Using privacyIDEA&#8217;s policy definitions, <a href="https://www.privacyidea.org/enforcing-security-policies-security-levels-with-different-otp-token-types/">you can define which token type is allowed to be used for authentication at which application</a>. This way you can accept the risk of using e.g. SMS OTP for low security applications and hardware devices like the yubikey for applications requiring higher confidentiality.</p>
<p>See the <a href="http://privacyidea.readthedocs.org/en/latest/policies/index.html" target="_blank">online documentation on policies</a> for more information or come to the <a href="https://groups.google.com/forum/#!forum/privacyidea" target="_blank">Google Group mailing list</a>.</p>
<p>If you require any <a href="https://netknights.it/en" target="_blank">professional assistance you may contact the maintainer of privacyIDEA</a>.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.privacyidea.org/choose-required-security-level-with-privacyidea/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>TSA tries to get grasp on second factor &#8211; taking simple measures</title>
		<link>https://www.privacyidea.org/tsa-tries-to-get-grasp-on-second-factor-taking-simple-measures/</link>
					<comments>https://www.privacyidea.org/tsa-tries-to-get-grasp-on-second-factor-taking-simple-measures/#respond</comments>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Sat, 31 Oct 2015 08:20:51 +0000</pubDate>
				<category><![CDATA[opinions]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[TISA]]></category>
		<category><![CDATA[Yubikey]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=778</guid>

					<description><![CDATA[Two factor authentication or multi factor authentication is ment to raise the bar for attackers. They ought to sniff, brute-force or social-engineer your password and in addition steal or &#8220;borrow&#8221; your hardware token for a &#8220;test&#8221;. Still, I wish to think that the Yubikey &#8211; being the product of originally a sole Swedish company &#8211; has no back doors. So [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><figure id="attachment_779" aria-describedby="caption-attachment-779" style="width: 300px" class="wp-caption alignleft"><a href="https://www.privacyidea.org/wp-content/uploads/2015/10/Bildschirmfoto-vom-2015-10-31-085326.png"><img loading="lazy" decoding="async" class="wp-image-779 size-medium" src="https://www.privacyidea.org/wp-content/uploads/2015/10/Bildschirmfoto-vom-2015-10-31-085326-300x117.png" alt="Tweet by flexlibris" width="300" height="117" srcset="https://www.privacyidea.org/wp-content/uploads/2015/10/Bildschirmfoto-vom-2015-10-31-085326-300x117.png 300w, https://www.privacyidea.org/wp-content/uploads/2015/10/Bildschirmfoto-vom-2015-10-31-085326.png 551w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-779" class="wp-caption-text">live experience with TISA on twitter by @flexlibris</figcaption></figure></p>
<p>Two factor authentication or multi factor authentication is ment to raise the bar for attackers. They ought to sniff, brute-force or social-engineer your password and in addition steal or &#8220;borrow&#8221; your hardware token for a &#8220;test&#8221;.</p>
<p>Still, I wish to think that the Yubikey &#8211; being the product of originally a sole Swedish company &#8211; has no back doors. So as long as the TISA does not know of side channel attacks or you used a static password with the Yubikey, you might be fine as long as you get the same Yubikey back &#8211; undestroyed.</p>
<p>Nevertheless there are additional measures you can take to improve your security with privacyIDEA.</p>
<p><strong>Disclaimer</strong>: This will only help, if you are using your hardware token to authenticate to remote systems. If you use your hardware token to unlock let&#8217;s say encrypted harddisk of your notebook, you are carrying, this will not help.</p>
<h2>Set up privacyIDEA</h2>
<p>When you manage your hardware token for remote access with privacyIDEA and you are crossing borders or you are in situations where you</p>
<ol>
<li>think your hardware token could be stolen or otherwise compromised and</li>
<li>you do not need the token explicitly (since you are on the plane without internet access)</li>
</ol>
<p>you might want to call your trusted privacyIDEA administrator (some call it help desk) and have your hardware token locked.</p>
<p>This way the hardware token can not be used to access restricted resources. If TISA is still insisting to get your Yubikey, you can say:</p>
<blockquote><p>&#8220;If you take it, you can keep it&#8221;</p></blockquote>
<p>(No of course you can take it back, but you may see it as compromised and you might need to reenroll it.)</p>
<p>If TISA takes the Yubikey there is not use for them, since the token is locked.</p>
<p><figure id="attachment_782" aria-describedby="caption-attachment-782" style="width: 300px" class="wp-caption aligncenter"><a href="https://www.privacyidea.org/wp-content/uploads/2015/10/Bildschirmfoto-vom-2015-10-31-091415.png"><img loading="lazy" decoding="async" class="wp-image-782 size-medium" src="https://www.privacyidea.org/wp-content/uploads/2015/10/Bildschirmfoto-vom-2015-10-31-091415-300x119.png" alt="Token detail view of a disabled token" width="300" height="119" srcset="https://www.privacyidea.org/wp-content/uploads/2015/10/Bildschirmfoto-vom-2015-10-31-091415-300x119.png 300w, https://www.privacyidea.org/wp-content/uploads/2015/10/Bildschirmfoto-vom-2015-10-31-091415-1024x406.png 1024w, https://www.privacyidea.org/wp-content/uploads/2015/10/Bildschirmfoto-vom-2015-10-31-091415.png 1212w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-782" class="wp-caption-text">The token is disabled and can not be used for authentication.</figcaption></figure></p>
<p>If TISA did not get your Yubikey and you crossed the border, customs or control successfully, you may call your trusted privacyIDEA admin again to reactivate the hardware token.</p>
<h2>Conclusion</h2>
<p>This might sound a bit complicated but also to simple. But special events like travelling to certain rogue regimes may require special measures.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.privacyidea.org/tsa-tries-to-get-grasp-on-second-factor-taking-simple-measures/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
