<?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>smartcards &#8211; privacyID3A</title>
	<atom:link href="https://www.privacyidea.org/tag/smartcards/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.privacyidea.org</link>
	<description>flexible, Open Source Multi Factor Authentication (2FA)</description>
	<lastBuildDate>Mon, 28 Dec 2020 10:35:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.privacyidea.org/wp-content/uploads/2016/06/cropped-only-logo-white-background-32x32.png</url>
	<title>smartcards &#8211; privacyID3A</title>
	<link>https://www.privacyidea.org</link>
	<width>32</width>
	<height>32</height>
</image> 
	<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 fetchpriority="high" 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>Multi-Factor Authentication privacyIDEA 3.5 released</title>
		<link>https://www.privacyidea.org/multi-factor-authentication-privacyidea-3-5-released/</link>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Tue, 22 Dec 2020 00:08:21 +0000</pubDate>
				<category><![CDATA[release]]></category>
		<category><![CDATA[4eyes]]></category>
		<category><![CDATA[Dashboard]]></category>
		<category><![CDATA[Policies]]></category>
		<category><![CDATA[smartcards]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=2223</guid>

					<description><![CDATA[Gaining higher security with smartcards and Four-Eyes-Tokens Today we put privacyIDEA 3.5 under your Christmas tree. Unwrap it and you will find a lot of enhancements. One of the most important features is that version 3.5 does the first step to also support smartcard management. For high security environments we drastically imrpoved the workflow of [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><strong>Gaining higher security with smartcards and Four-Eyes-Tokens</strong></p>



<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img decoding="async" src="https://www.privacyidea.org/wp-content/uploads/2020/12/A-smartcard-in-a-notebook-1024x699.jpg" alt="" class="wp-image-2225" width="933" height="637" srcset="https://www.privacyidea.org/wp-content/uploads/2020/12/A-smartcard-in-a-notebook-1024x699.jpg 1024w, https://www.privacyidea.org/wp-content/uploads/2020/12/A-smartcard-in-a-notebook-300x205.jpg 300w, https://www.privacyidea.org/wp-content/uploads/2020/12/A-smartcard-in-a-notebook-768x524.jpg 768w, https://www.privacyidea.org/wp-content/uploads/2020/12/A-smartcard-in-a-notebook-1536x1048.jpg 1536w, https://www.privacyidea.org/wp-content/uploads/2020/12/A-smartcard-in-a-notebook-2048x1397.jpg 2048w" sizes="(max-width: 933px) 100vw, 933px" /></figure></div>



<p><em>Today we put privacyIDEA 3.5 under your Christmas tree. Unwrap it and you will find a lot of enhancements. One of the most important features is that version 3.5 does the first step to also support smartcard management. For high security  environments we drastically imrpoved the workflow of Four-Eyes-Tokens.</em></p>



<h2 class="wp-block-heading">Let&#8217;s do this togeather &#8211; Four-Eyes-Tokens</h2>



<p>Using the Four-Eyes-Tokens the administrator can define how many users from several different groups should come togeather when the account &#8211; the holder of the Four-Eyes-Token &#8211; wants to authenticate. This way you can define, that this account worthy of protection can only be used if e.g. two IT administrators and one member of the works council come togeather and use their own 2nd factors to authenticate.</p>



<p>The Four-Eyes-Token has been around for a while in privacyIDEA. But now we are using the <a href="https://www.privacyidea.org/privacyidea-3-4-released/">Multi</a><a href="https://www.privacyidea.org/privacyidea-3-4-released/" target="_blank" rel="noreferrer noopener">&#8211;</a><a href="https://www.privacyidea.org/privacyidea-3-4-released/">Challenge</a>, that was introduced in privacyIDEA 3.4, to heavily improve the workflow and authentication flow. It is totally transparent to our application plugins and the RADIUS protocol, so that it can be used e.g. with Citrix Netscaler.</p>



<figure class="wp-block-gallery columns-2 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><img loading="lazy" decoding="async" width="854" height="451" src="https://www.privacyidea.org/wp-content/uploads/2020/12/4Augen-Citrix-01-1.png" alt="" data-id="2229" data-full-url="https://www.privacyidea.org/wp-content/uploads/2020/12/4Augen-Citrix-01-1.png" data-link="https://www.privacyidea.org/?attachment_id=2229" class="wp-image-2229" srcset="https://www.privacyidea.org/wp-content/uploads/2020/12/4Augen-Citrix-01-1.png 854w, https://www.privacyidea.org/wp-content/uploads/2020/12/4Augen-Citrix-01-1-300x158.png 300w, https://www.privacyidea.org/wp-content/uploads/2020/12/4Augen-Citrix-01-1-768x406.png 768w" sizes="auto, (max-width: 854px) 100vw, 854px" /></figure></li><li class="blocks-gallery-item"><figure><img loading="lazy" decoding="async" width="702" height="378" src="https://www.privacyidea.org/wp-content/uploads/2020/12/4Augen-Citrix-02.png" alt="" data-id="2228" data-link="https://www.privacyidea.org/?attachment_id=2228" class="wp-image-2228" srcset="https://www.privacyidea.org/wp-content/uploads/2020/12/4Augen-Citrix-02.png 702w, https://www.privacyidea.org/wp-content/uploads/2020/12/4Augen-Citrix-02-300x162.png 300w" sizes="auto, (max-width: 702px) 100vw, 702px" /></figure></li></ul><figcaption class="blocks-gallery-caption">Several persons want to login as &#8220;administrator@highsecurity&#8221;. <br>So in the first step the first person uses his credentials and 2nd factor. Then in a 2nd step the second user is asked for his credentials and 2nd factor.</figcaption></figure>



<h2 class="wp-block-heading">Do not copy, rather sign! &#8211; PIV smartcards with privacyIDEA</h2>



<p>Smartcards are interesting devices, that have certain disadvantages in handling but also come with advantages and features, that allow for completely other use cases like offline authentication, decryption or document signing.</p>



<p>privacyIDEA was already capable of enrolling and manageing x509v3 user certificates. As a first step to better support smartcards, privacyIDEA 3.5 now can require that certificate requests are generated on a PIV smartcard. This is done by<br>using policies to force the presence of an attestation certificate during enrollment. The attestation certificate confirms, that actually the key pair was generated on a smartcard and there is no copy of the private key.</p>



<p>This was successfully done with the Yubikey 5 and a corresponding enrollment tool. We will continue working on imrpoving the privacyIDEAs smartcard capabilities.</p>



<h2 class="wp-block-heading">Make the admin&#8217;s life easier &#8211; serveral enhancements</h2>



<h4 class="wp-block-heading">Tokens</h4>



<p>The Push token gets a lot of feedback in the community. So we are continuously improving it. User certain conditions a smartphone device can renew its firebase token, that is used to communicate with Google&#8217;s firebase push service. The smartphone app can now contact the privacyIDEA server to update this firebase token.</p>



<p>The registration token is a long &#8220;registration code&#8221;, that can be used to authenticate once during enrollment processes. The admin can now configure a policy to define the length and contents of the registration code.</p>



<p>A Webauthn token <a rel="noreferrer noopener" href="https://www.w3.org/TR/webauthn/#sign-counter" target="_blank">should also provide a signature counter</a>, that is used to identify and avoid cloned tokens. However, not all cheap devices implement this. privacyIDEA now also allows to use Webauthn tokens without a signature counter on demand.</p>



<p>Hardware tokens come with a seed file. privacyIDEA can import a lot of different formats, also PSKC which is defined in RFC6030. The import of PSKC files now also verifies the MAC of the token secrets.</p>



<p>The questionnaire token can now ask more than one question during the authentication process.</p>



<h4 class="wp-block-heading">Event handlers and policies</h4>



<p>The policies may now contain additional extened conditions from the tokeninfo attributes. This can be any arbitrary  attribute, so that the admin could define policies, that e.g. allow the authentication at certain applications with a hardware token but not with a software token. </p>



<p>The Tokenhandler can choose the SMS Gateway Identifier or the SMTP Identifier when enrolling an SMS or respectively an Email token.</p>



<p>The Tokenhandler can now increase and decrease the fail counter and also set the Maxfail counter.</p>



<h4 class="wp-block-heading">The Web UI</h4>



<p>Several enhancements allow a smoother work experience for administrators and service desk users. The admin can define a policy to hide certain columns in the audit log. This way the service desk users only see this information, which they really need. Also, the audit log contains the start time, the end time and the duration of a request. This way it is easy to filter or search for long running requests to debug authentication problems. In the dashboard the usernames of the users with failed authentications are displayed with a short link to their user details. This helps the service desk to immidiately find failing users and offer quickers support.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="586" height="249" src="https://www.privacyidea.org/wp-content/uploads/2020/12/dashboard-failed-user.png" alt="" class="wp-image-2231" srcset="https://www.privacyidea.org/wp-content/uploads/2020/12/dashboard-failed-user.png 586w, https://www.privacyidea.org/wp-content/uploads/2020/12/dashboard-failed-user-300x127.png 300w" sizes="auto, (max-width: 586px) 100vw, 586px" /><figcaption>The sercice desk user can see the failed user&#8217;s details directly by clicking on the linked username.</figcaption></figure></div>



<p>The WebUI now supports the PIN change via multi-challenge response.</p>



<p>The conditions for event handlers and actions for policies have been redesigned to make them look the same and easily searchable.</p>



<h4 class="wp-block-heading">Managing privacyIDEA</h4>



<p>In certain setups you might have a testing environment, a staging environment and a production environment. Configuration changes are often first tested in the testing environment and then transferred to the staging and production environment.</p>



<p>The pi-manage script has a new sub command to export and import resolver configuration, that will help in such scenarios.</p>



<p>The full list of features, enhancements and fixes can be found in the <a href="https://github.com/privacyidea/privacyidea/blob/master/Changelog">Changelog</a>.</p>



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



<p>privacyIDEA is an enterprise grade, extremely flexible multi-factor authentication system, that can adapt to your needs and  that lets you automate a lot of tasks. Using privacyIDEA will increase your security. Migrating from other mult-factor<br>systems to privacyIDEA will ease your life. People have done this and dropped many well-known, but old and crusty authentication systems. Take a look at privacyIDEA and join the community.</p>



<p>It is freely available via the <a href="https://privacyidea.readthedocs.io/en/latest/installation/pip.html">Python package index</a> and via community repositories for <a href="https://privacyidea.readthedocs.io/en/latest/installation/ubuntu.html">Ubuntu LTS 16.04, 18.04 and 20.04</a>.</p>



<p>The company NetKnights provides an <a href="https://netknights.it/en/produkte/privacyidea/">Enterprise Edition</a> with Service Level Agreements and stable packages for Ubuntu LTS and Red Hat Enterprise Linux/CentOS.</p>



<p>If you want to stay tuned, join the <a rel="noreferrer noopener" href="https://community.privacyidea.org" target="_blank">community forum</a> or subscribe the <a rel="noreferrer noopener" href="https://netknights.it/en/newsletter/" target="_blank">NetKnights&#8217; newsletter</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
