<?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>Event Handler &#8211; privacyID3A</title>
	<atom:link href="https://www.privacyidea.org/tag/event-handler/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.privacyidea.org</link>
	<description>flexible, Open Source Multi Factor Authentication (2FA)</description>
	<lastBuildDate>Thu, 14 Nov 2024 11:40:31 +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>Event Handler &#8211; privacyID3A</title>
	<link>https://www.privacyidea.org</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Event-based logging with privacyIDEA and Logstash</title>
		<link>https://www.privacyidea.org/event-based-logging-with-privacyidea-and-logstash/</link>
					<comments>https://www.privacyidea.org/event-based-logging-with-privacyidea-and-logstash/#comments</comments>
		
		<dc:creator><![CDATA[Henning Hollermann]]></dc:creator>
		<pubDate>Sun, 05 Apr 2020 23:17:25 +0000</pubDate>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Event Handler]]></category>
		<category><![CDATA[Logging]]></category>
		<category><![CDATA[logstash]]></category>
		<category><![CDATA[privacyIDEA]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=1900</guid>

					<description><![CDATA[Keeping track of the system logs in a complex environment with many hosts and even more services can be challenging. 
A sophisticated logging system with aggregation and filtering capabilities helps the administrator to stay ahead of things. 
This article shows how to integrate privacyIDEA in the centralized logging system provided by the elastic stack]]></description>
										<content:encoded><![CDATA[
<p>Keeping track of the system logs in a complex environment with many hosts and even more services can be challenging. A sophisticated logging system with aggregation and filtering capabilities helps the administrator to stay ahead of things. Popular examples are <a href="https://www.splunk.com/">Splunk</a> and <a href="https://www.elastic.co/logstash">Logstash</a>. Both are intrinsically supported by privacyIDEA, since the software builds on the standard python logging library. This article shows how to integrate privacyIDEA in the centralized logging system provided by the elastic stack which consists of the software components Logstash, Elasticsearch and Kibana.</p>



<p>We will use the privacyIDEA logging facility to let the server not only store its system logs and audit locally but also feed them to a remote Logstash server. We will also show how to use the new Logging module of the Event Handler, introduced in privacyIDEA 3.3, to customize the logged information. The usual path of information is displayed in the following picture.</p>



<figure class="wp-block-image alignwide size-large"><img fetchpriority="high" decoding="async" width="1024" height="163" src="https://www.privacyidea.org/wp-content/uploads/2020/03/privacyIDEA-ELK_2000-1024x163.png" alt="" class="wp-image-1904" srcset="https://www.privacyidea.org/wp-content/uploads/2020/03/privacyIDEA-ELK_2000-1024x163.png 1024w, https://www.privacyidea.org/wp-content/uploads/2020/03/privacyIDEA-ELK_2000-300x48.png 300w, https://www.privacyidea.org/wp-content/uploads/2020/03/privacyIDEA-ELK_2000-768x122.png 768w, https://www.privacyidea.org/wp-content/uploads/2020/03/privacyIDEA-ELK_2000-1536x245.png 1536w, https://www.privacyidea.org/wp-content/uploads/2020/03/privacyIDEA-ELK_2000.png 1997w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">Setup the Base System</h3>



<p>As the installation Logstash, Elasticsearch and Kibana is documented at the <a href="https://www.elastic.co/guide/en/elastic-stack/current/installing-elastic-stack.html">vendors website</a>, we will not go into detail here. In any case, you need a java runtime environment. For Ubuntu you can use the package <code>default-jre</code>. Once you have the elastic stack up and running, turn towards privacyIDEA.</p>



<p>The installation of privacyIDEA is documented at <a href="https://privacyidea.readthedocs.io/en/latest/">privacyidea.readthedocs.io</a>. For a quick start, there is a community package repository for Ubuntu 18.04 LTS available. Install the privacyIDEA server and become a little familiar to the WebUI, which is the primary management interface.</p>



<p>The base configuration of privacyIDEA is set in the <a href="https://privacyidea.readthedocs.io/en/latest/installation/system/inifile.html">configuration file <code>pi.cfg</code></a> and the dedicated <a href="https://privacyidea.readthedocs.io/en/latest/installation/system/logging.html#advanced-logging">logging configuration file <code>logging.cfg</code> or <code>logging.yml</code></a>. In the default Ubuntu 18.04 package installation, those are located in /etc/privacyidea/. To be able to view the audit logs in the WebUI and send them at the same time to the python logger, the <a href="https://privacyidea.readthedocs.io/en/latest/audit/#container-audit">ContainerAudit</a> module is used.</p>



<pre class="wp-block-preformatted has-small-font-size"># /etc/privacyidea/pi.cfg
PI_AUDIT_MODULE = 'privacyidea.lib.auditmodules.containeraudit'
PI_AUDIT_CONTAINER_WRITE = ['privacyidea.lib.auditmodules.sqlaudit','privacyidea.lib.auditmodules.loggeraudit']
PI_AUDIT_CONTAINER_READ = 'privacyidea.lib.auditmodules.sqlaudit'
PI_AUDIT_LOGGER_QUALNAME = 'pi-audit'
PI_LOGCONFIG = '/etc/privacyidea/logging.cfg'</pre>



<p>Note that we use a custom audit logger name &#8220;pi-audit&#8221; in the above configuration. See the documentation of the <a href="https://privacyidea.readthedocs.io/en/latest/audit/index.html#logger-audit">Logger Audit</a>.</p>



<h3 class="wp-block-heading">Send privacyIDEA logs to Logstash</h3>



<p>The logging module <code>privacyidea.lib.auditmodules.loggeraudit</code> sends the audit messages to the python logging system and makes it available to the configuration by <code>logging.yml</code>. To send both the privacyIDEA server logs and the audit log to Logstash, the <a href="https://github.com/eht16/python-logstash-async">module <code>python-logstash-async</code></a> comes in handy. It can be installed through pip by</p>



<pre class="wp-block-preformatted has-small-font-size">~$ pip install python-logstash-async</pre>



<p>The module can be used in a <code>logging.cfg</code> or <code>logging.yml</code> in YAML and INI format respectively. <a href="https://gist.github.com/laclaro/a9ba8b6f1f1ed8f9de23d1383f71666c">Minimal examples for the configuration of the logstash-async module</a> are found on Github Gist. A <a href="https://gist.github.com/laclaro/6cbd3f51bba0041d5307569644a575fc">more detailed YAML configuration file</a> is also available, which provides a good basis for this test case.</p>



<p>Restart privacyidea for the changes to have effect. If you used the extended configuration from gist, you should now see the audit log in /var/log/privacyidea/audit.log.</p>



<h3 class="wp-block-heading">Receive privacyIDEA logs with Logstash</h3>



<p>On the other end, Logstash is configured to listen on port 5959 and to forward the logs to Elasticsearch using different indices for the qualnames pi-audit, pi-eventlog and all the rest (privacyidea.*).</p>



<pre class="wp-block-preformatted has-small-font-size"># /etc/logstash/conf.d/privacyidea_elasticsearch.conf
# privacyIDEA input is logged by the python-logstash-async module
input {
   tcp {
      port =&gt; 5959
      codec =&gt; json
      tags =&gt; ["privacyidea"]
   }
}
# filter adds metadata field according to logger to
# separate the privacyIDEA audit log from the rest
filter {
   if [extra][logger_name] == "pi-audit" or [extra][logger_name] == "privacyidea.lib.auditmodules.loggeraudit" {
      mutate { add_field =&gt; { "[@metadata][indexPrefix]" =&gt; "pi-audit" } }
   } else if [extra][logger_name] == "pi-eventlog" {
      mutate { add_field =&gt; { "[@metadata][indexPrefix]" =&gt; "pi-eventlog" } }
   } else {
      mutate { add_field =&gt; { "[@metadata][indexPrefix]" =&gt; "privacyidea" } }
   }
}
# Logs are sent to elasticsearch using the indexPrefix
output {
   elasticsearch {
      index =&gt; "%{[@metadata][indexPrefix]}-%{+YYYY.MM.dd}"
   }
   # additional output to syslog
   stdout {
      codec =&gt; rubydebug
   }
}</pre>



<p>Restart logstash afterwards. The output section contains an additional part for logging to stdout. On a systemd-driven system (check <code>~$ ps -p 1</code>), it can be viewed by</p>



<pre class="wp-block-preformatted has-small-font-size">~# journalctl -f -u logstash</pre>



<p>Once you interact with the privacyIDEA server, you should see the incoming audit log messages in json format in the journalctl ountput on the logstash machine. The example below is the audit message for viewing the audit log in the privacyIDEA WebUI:</p>



<pre class="wp-block-preformatted has-small-font-size">{
          "extra" =&gt; {
                    "logger_name" =&gt; "pi-audit",
                   "process_name" =&gt; "MainProcess",
                    "thread_name" =&gt; "MainThread",
                           "line" =&gt; 85,
         "logstash_async_version" =&gt; "1.6.4",
                           "path" =&gt; "/opt/privacyidea/privacyidea/lib/auditmodules/loggeraudit.py",
                      "func_name" =&gt; "finalize_log",
                    "interpreter" =&gt; "/opt/privacyidea/venv/bin/python",
            "interpreter_version" =&gt; "3.6.9"
     },
          "level" =&gt; "INFO",
        "program" =&gt; "/opt/privacyidea/pi-manage",
           "port" =&gt; 47962,
            "pid" =&gt; 10047,
      "logsource" =&gt; "myhost",
     "@timestamp" =&gt; 2020-03-25T15:32:42.748Z,
       "@version" =&gt; "1",
           "type" =&gt; "python-logstash",
        "message" =&gt; "{'success': True, 'serial': '<strong>', 'user': '</strong>', 'realm': '**', 'resolver': '', 'token_type': '', 'client': '127.0.0.1', 'client_user_agent': 'firefox', 'privacyidea_server': 'localhost:5000', 'action': 'GET /audit/', 'action_detail': '', 'info': '', 'administrator': 'admin', 'policies': '', 'timestamp': datetime.datetime(2020, 3, 25, 15, 32, 42, 748526)}",
           "host" =&gt; "henning-t470"
 }</pre>



<h3 class="wp-block-heading">Display privacyIDEA logs with Kibana</h3>



<p>The logs received by Logstash are sent to Elasticsearch which talks to the Kibana instance. The Elasticsearch indices should appear in Kibana&#8217;s index management, available from the home screen.</p>



<figure class="wp-block-image size-large is-resized"><img decoding="async" width="273" height="154" src="https://www.privacyidea.org/wp-content/uploads/2020/03/kibana-index-patterns-button-1.png" alt="" class="wp-image-1917" style="width:205px;height:116px"/></figure>



<p>The privacyIDEA indices will look like shown below.</p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter size-large is-resized"><a href="https://www.privacyidea.org/wp-content/uploads/2020/03/kibana-indices.png"><img decoding="async" width="1024" height="437" src="https://www.privacyidea.org/wp-content/uploads/2020/03/kibana-indices-1024x437.png" alt="" class="wp-image-1911" style="width:768px;height:328px" srcset="https://www.privacyidea.org/wp-content/uploads/2020/03/kibana-indices-1024x437.png 1024w, https://www.privacyidea.org/wp-content/uploads/2020/03/kibana-indices-300x128.png 300w, https://www.privacyidea.org/wp-content/uploads/2020/03/kibana-indices-768x328.png 768w, https://www.privacyidea.org/wp-content/uploads/2020/03/kibana-indices.png 1082w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>
</div>


<p>Note: the yellow health status is due to a default index setting <code>"index.number_of_replicas": "1"</code>. Changing it to zero will result in a green status. Under &#8220;Data Views&#8221; create a new data view with the index-pattern &#8220;privacyidea*,pi-audit-*,pi-event*&#8221;.</p>



<figure class="wp-block-gallery alignwide has-nested-images columns-default wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-full"><a href="https://www.privacyidea.org/wp-content/uploads/2024/11/Create-Data-View.png"><img loading="lazy" decoding="async" width="816" height="568" data-id="2362" src="https://www.privacyidea.org/wp-content/uploads/2024/11/Create-Data-View.png" alt="" class="wp-image-2362" srcset="https://www.privacyidea.org/wp-content/uploads/2024/11/Create-Data-View.png 816w, https://www.privacyidea.org/wp-content/uploads/2024/11/Create-Data-View-300x209.png 300w, https://www.privacyidea.org/wp-content/uploads/2024/11/Create-Data-View-768x535.png 768w" sizes="auto, (max-width: 816px) 100vw, 816px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://www.privacyidea.org/wp-content/uploads/2024/11/Logs_View.png"><img loading="lazy" decoding="async" width="1024" height="498" data-id="2363" src="https://www.privacyidea.org/wp-content/uploads/2024/11/Logs_View-1024x498.png" alt="" class="wp-image-2363" srcset="https://www.privacyidea.org/wp-content/uploads/2024/11/Logs_View-1024x498.png 1024w, https://www.privacyidea.org/wp-content/uploads/2024/11/Logs_View-300x146.png 300w, https://www.privacyidea.org/wp-content/uploads/2024/11/Logs_View-768x374.png 768w, https://www.privacyidea.org/wp-content/uploads/2024/11/Logs_View.png 1042w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>
</figure>



<p>In the Logs view, select the privacyIDEA data view you can select the log columns (&#8220;selected fields&#8221;) to be shown. The privacyIDEA log messages are now nicely display<em>ed.</em></p>



<figure class="wp-block-image alignwide size-large"><a href="https://www.privacyidea.org/wp-content/uploads/2024/11/Bild3.png"><img loading="lazy" decoding="async" width="1024" height="498" src="https://www.privacyidea.org/wp-content/uploads/2024/11/Bild3-1024x498.png" alt="" class="wp-image-2364" srcset="https://www.privacyidea.org/wp-content/uploads/2024/11/Bild3-1024x498.png 1024w, https://www.privacyidea.org/wp-content/uploads/2024/11/Bild3-300x146.png 300w, https://www.privacyidea.org/wp-content/uploads/2024/11/Bild3-768x374.png 768w, https://www.privacyidea.org/wp-content/uploads/2024/11/Bild3.png 1042w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Don&#8217;t forget to save!</p>



<h3 class="wp-block-heading">Event-based logging from privacyIDEA to Logstash</h3>



<p>New in <a href="https://www.privacyidea.org/privacyidea-3-3-with-webauthn/">privacyIDEA 3.3</a> is the Event Handler module &#8220;Logging&#8221;. With this module, custom logging messages can be bound to any event. This opens the door to a whole new world of monitoring possibilities in privacyIDEA. To demonstrate the feature, we simply log whenever a token is disabled &#8212; a silly example, of course. The Event Handler is created as shown below.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><a href="https://www.privacyidea.org/wp-content/uploads/2020/03/LoggingNotification4.png"><img loading="lazy" decoding="async" width="930" height="942" src="https://www.privacyidea.org/wp-content/uploads/2020/03/LoggingNotification4.png" alt="" class="wp-image-1928" style="width:698px;height:707px" srcset="https://www.privacyidea.org/wp-content/uploads/2020/03/LoggingNotification4.png 930w, https://www.privacyidea.org/wp-content/uploads/2020/03/LoggingNotification4-296x300.png 296w, https://www.privacyidea.org/wp-content/uploads/2020/03/LoggingNotification4-768x778.png 768w" sizes="auto, (max-width: 930px) 100vw, 930px" /></a></figure>
</div>


<p>For the Logging module, only one action is available. The log level, the name of the logger and a custom message are required. The message field supports variables known from the user notification module (see <a href="https://privacyidea.readthedocs.io/en/latest/eventhandler/logginghandler.html">documentation</a>). Note, that it depends on the context of the RESTful API event if a certain variable is available or not. </p>



<p>The chosen logger name has to be added as a logger in <code>logging.yml</code> to send it to Logstash.</p>



<pre class="wp-block-preformatted has-small-font-size">loggers:
  pi-eventlog:
    handlers:
      - logfile
      - logstash_async
    level: DEBUG</pre>



<p>Restart privacyIDEA to apply the changes in the config file <code>logging.yml</code>. After triggering the event by disabling a token in privacyIDEA, Kibana shows the notification.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="25" src="https://www.privacyidea.org/wp-content/uploads/2020/03/LoggingNotification3-1024x25.png" alt="" class="wp-image-1927" srcset="https://www.privacyidea.org/wp-content/uploads/2020/03/LoggingNotification3-1024x25.png 1024w, https://www.privacyidea.org/wp-content/uploads/2020/03/LoggingNotification3-300x7.png 300w, https://www.privacyidea.org/wp-content/uploads/2020/03/LoggingNotification3-768x18.png 768w, https://www.privacyidea.org/wp-content/uploads/2020/03/LoggingNotification3.png 1081w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Of course, you can use the logging event handler for more reasonable purposes like not to send the full audit log to logstash but to single-out the important validate-check events. You can even apply some more conditions, if you like making use of the powerful condition properties of the privacyIDEA Event Handlers. This not only spares bandwidth and storage space but prevents important information to be buried by other data. The message field in privacyIDEA can be used for a custom log message with contextual information. The configurable logger name (e.g. <em>pi-validate-check</em>) provides an additional identifier. In the case of suspicious behavior or a security incident, all the information is there to quickly track down the threat.</p>



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



<p>With this demonstration of the logging facility, privacyIDEA proves again to be extraordinarily scalable. It integrates well with logging systems like Logstash and Splunk since the privacyIDEA server builds on the standard python logging library. For Logstash, this article showed the detailed steps how to integrate privacyIDEA via the loggeraudit and a small third-party python module called <em>python-logstash-async</em>.</p>



<p>In privacyIDEA 3.3 the logging capabilities have been further extended by an Event Handler module which enables to conditionally log arbitrary events to the python logging system. We showed that also these messages can easily be passed to Logstash and open a vast playground custom logging.</p>



<p>The solution shown here is only one possible approach. Since privacyIDEA is available as open source an licensed under the AGPL, another possibility would be of course to write your very own logger module to do whatever <em>you</em> want. privacyIDEA is and will be always open source and therefore it will <em>always stay</em> in <em>your</em> hands.</p>



<p>If you would like to have a custom logger module, but have no time to  implement it yourself, you can always request a quote from <a href="https://netknights.it/en/">Netknights</a>, the company which drives the privacyIDEA innovation via <a href="https://github.com/privacyidea/">Github</a>. They also provide professional support for privacyIDEA, including enterprise repositories for Ubuntu and CentOS/RHEL containing the server and a number of additional components and tools.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.privacyidea.org/event-based-logging-with-privacyidea-and-logstash/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>privacyIDEA 3.2 released</title>
		<link>https://www.privacyidea.org/privacyidea-3-2-individual-workflows/</link>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Mon, 02 Dec 2019 06:05:00 +0000</pubDate>
				<category><![CDATA[release]]></category>
		<category><![CDATA[Audit]]></category>
		<category><![CDATA[Event Handler]]></category>
		<category><![CDATA[Policies]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=1675</guid>

					<description><![CDATA[Flexible and individual Workflows Today we release privacyIDEA 3.2. Two new event handler modules allow for even more flexible workflows. Integrating with external logging tools like Logstash or Splunk are much easier now using the container audit module and the file audit module. Using Trusted JWTs makes it much more robust to integrate any existing [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><strong>Flexible and individual Workflows</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://www.privacyidea.org/wp-content/uploads/2019/11/fractal-1765218_1920-1024x576.jpg" alt="" class="wp-image-1684" srcset="https://www.privacyidea.org/wp-content/uploads/2019/11/fractal-1765218_1920-1024x576.jpg 1024w, https://www.privacyidea.org/wp-content/uploads/2019/11/fractal-1765218_1920-300x169.jpg 300w, https://www.privacyidea.org/wp-content/uploads/2019/11/fractal-1765218_1920-768x432.jpg 768w, https://www.privacyidea.org/wp-content/uploads/2019/11/fractal-1765218_1920-1536x864.jpg 1536w, https://www.privacyidea.org/wp-content/uploads/2019/11/fractal-1765218_1920-1110x624.jpg 1110w, https://www.privacyidea.org/wp-content/uploads/2019/11/fractal-1765218_1920-528x297.jpg 528w, https://www.privacyidea.org/wp-content/uploads/2019/11/fractal-1765218_1920.jpg 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p><em>Today we release privacyIDEA 3.2. Two new event handler modules allow for even more flexible workflows. Integrating with external logging tools like Logstash or Splunk are much easier now using the container audit module and the file audit module. Using Trusted JWTs makes it much more robust to integrate any existing portal with privacyIDEA.</em></p>



<h3 class="wp-block-heading">Request and Response Event Handler</h3>



<p>The event handlers have been around sind version 2.12. Every version somehow improved the event handler. They allow for a very flexible way to define actions and responses in privacyIDEA. Read a recent post about the <a href="https://www.privacyidea.org/privacyidea-flexibility-in-the-very-genes/">script event handler</a> or take a look at the <a rel="noreferrer noopener" aria-label="complete list of event handlers (opens in a new tab)" href="https://privacyidea.readthedocs.io/en/latest/eventhandler/index.html" target="_blank">complete list of event handlers</a>.</p>



<p>With version 3.2 the administrator gets two new event handlers &#8211; the Request Mangler Handler and the Response Mangler Handler. You notice the word <em>mangle</em> &#8211; these handler allow to modify, delete or add any arbitrary REST request parameter or JSON response parameter, given the administrator unseen flexibility to flex the privacyIDEA system to the very specific need!</p>



<p>The Response Handler could be used to delete certain response information, after it is used e.g. by a notification handler. For example the notification handler could read this information to notify the user but then the Response handler would delete this information, so that a help desk user is maybe not able to read a randomly set password in a response. The resulting possibilities are unimaginable.</p>



<p>We are very excited to see how administrators will use these features!</p>



<h3 class="wp-block-heading">Audit data everywhere</h3>



<p>privacyIDEA runs in big environments. Because it integrates so well. privacyIDEA also creates an Audit log (and a log file &#8211; for debugging purposes). However, the log file is great, since every HTTP request has its dedicated audit entry. </p>



<p>It should be easier to add the audit data to these locations, where bigger organizations aggregate and keep their Log data. These are systems and services like Logstash or Splunk. As a first step privacyIDEA 3.2 comes with two new audit modules, the File Audit Module, that can write audit information to a plain text/log file and a Container Audit Module, that can combine any number of Audit Modules, so that privacyIDEA can write audit data to all of these modules.</p>



<p>We hope that this is a big leap forward to get your information to the right place!</p>



<h3 class="wp-block-heading">The trusted JWTs</h3>



<p>Did you ever want to have users manage their privacyIDEA tokens in an existing local portal? Or your helpdesk users get privacyIDEA information into the ticket system they are using? With privacyIDEA 3.2 it gets much easier now. The administrator can define <a href="https://privacyidea.readthedocs.io/en/master/installation/system/inifile.html#trusted-jwts" target="_blank" rel="noreferrer noopener" aria-label="trusted JWTs (opens in a new tab)">trusted JWTs</a>. I.e. he can define trusted public keys and which user this public key can impersonate.</p>



<p>The mentioned portal will simply use its private key to create JWTs, that are then trusted by privacyIDEA. No need to create service accounts, share passwords or other credentials.</p>



<h3 class="wp-block-heading">The complete changelog</h3>



<p>There are a lot of new enhancements, which administrators and helpdesk users will probably like for a daily use. A lot of enhancements, which we needed to provide better and easier service for certain installations.</p>



<p>Besides the event handlers also policies have been improved. The administrator can now use any arbitrary HTTP header in the policy condition. This way policies could be strictly bound to certain http_agents. </p>



<p>To improve the roll out process, the event handlers can match for the roll out state of a token. The notification handler, that was already able to send email or SMS, can now also write files to a spool directory. This way information can be easily passed to 3rd party systems or this data can be processed further like printing PIN letters.</p>



<p>We also did some improvement of the authentication process for the PUSH token so that it is not necessary to require a service account to verify the answered challenges.</p>



<p>The complete changelog can be found at <a href="https://github.com/privacyidea/privacyidea/blob/master/Changelog" target="_blank" rel="noreferrer noopener" aria-label="github (opens in a new tab)">github</a>.</p>



<h3 class="wp-block-heading">Go and get it</h3>



<p>privacyIDEA 3.2 can be installed from source from <a rel="noreferrer noopener" aria-label="github (opens in a new tab)" href="https://github.com/privacyidea/privacyidea/" target="_blank">github</a>, via the <a rel="noreferrer noopener" aria-label="Python Package Index (opens in a new tab)" href="https://pypi.org/project/privacyIDEA/" target="_blank">Python Package Index</a> or using ready made packages for <a rel="noreferrer noopener" aria-label=" (opens in a new tab)" href="https://privacyidea.readthedocs.io/en/latest/installation/ubuntu.html" target="_blank">Ubuntu 16.04 LTS and 18.04 LTS</a>. The builds for Ubuntu are now based on Python 3.</p>



<p class="has-small-font-size">Image by <a href="https://pixabay.com/users/barbaraalane-756613/" target="_blank" rel="noreferrer noopener" aria-label="BarbaraALane (opens in a new tab)">BarbaraALane</a> on Pixabay.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>privacyIDEA &#8211; flexibility in the very genes</title>
		<link>https://www.privacyidea.org/privacyidea-flexibility-in-the-very-genes/</link>
					<comments>https://www.privacyidea.org/privacyidea-flexibility-in-the-very-genes/#comments</comments>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Sat, 30 Nov 2019 08:43:18 +0000</pubDate>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Whatsup]]></category>
		<category><![CDATA[Event Handler]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=1664</guid>

					<description><![CDATA[Successful two factor authentication is a matter of smooth workflows. We learnt this in a lot of set ups and are claiming it since 2018 at the LinuxFest North West. One-solution-fits-all does not work out! Nowadays a company or organization wants to deploy 2FA to not only secure a certain login to a certain application, [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><em>Successful two factor authentication is a matter of smooth workflows. </em></p>



<p>We learnt this in a lot of set ups and are claiming it since 2018 at the <a rel="noreferrer noopener" aria-label="LinuxFest North West (opens in a new tab)" href="https://linuxfestnorthwest.org/conferences/lfnw18/program/proposals/145" target="_blank">LinuxFest North West</a>. One-solution-fits-all does not work out! Nowadays a company or organization wants to deploy 2FA to not only secure a certain login to a certain application, but also wants to have secure workflows around the authentication process. Thus the perfect 2FA or MFA software needs to adapt to the needs of such company or organisation.</p>



<h2 class="wp-block-heading">The beauty of the event handlers</h2>



<p>privacyIDEA introduced the Event Handlers already in version 2.12, May 2016. The <a rel="noreferrer noopener" aria-label="script event handlers (opens in a new tab)" href="https://privacyidea.readthedocs.io/en/latest/eventhandler/scripthandler.html" target="_blank">script event handlers</a>, which I want to talk about today, followed in version 2.17, December 2016.</p>



<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" src="https://www.privacyidea.org/wp-content/uploads/2019/04/image-1024x718.png" alt="" class="wp-image-1565" width="550" height="385" 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: 550px) 100vw, 550px" /></figure></div>



<p>Event Handlers were used quite actively since then. Only the script handles seemed special and awkward. It has been quiet around this one for a while. But recently a comment and question of a German <a rel="noreferrer noopener" aria-label="partner (opens in a new tab)" href="https://netknights.it/en/unternehmen/partner/" target="_blank">partner</a> (<a rel="noreferrer noopener" aria-label="IT-Schmid (opens in a new tab)" href="https://it-schmid.com/hard-software/#av-tab-section-1-9" target="_blank">IT-Schmid</a>), who was implementing a roll out concept for a customer, caught my attention and reactivated the thinking about the beauty of the script handlers.</p>



<p>privacyIDEA is implemented in a very modular way &#8211; on a horizontal but also on a vertical level. <a rel="noreferrer noopener" aria-label="Database level, library level, the REST API and the Web UI are different (opens in a new tab)" href="https://privacyidea.readthedocs.io/en/latest/modules/index.html" target="_blank">Database level, library level, the REST API and the Web UI are different</a>, separated parts. And this helps us a lot with the script handlers. It is easily possible to write python scripts, that are using the library level, without the need to issue REST Requests that are processed through the web server. This improves performance of such scripts and it gives you access to ready made library functions, that allow you to address tasks with a few lines of code.</p>



<h2 class="wp-block-heading">Script collection at Github repository</h2>



<p>We realized, that it makes sense to provide a collection of example scripts, to give you a better understanding, what scripts can do and how this could be done. A new repository has been added at <a rel="noreferrer noopener" aria-label="Github to host such example scripts (opens in a new tab)" href="https://github.com/privacyidea/scripts" target="_blank">Github to host such example scripts</a>. The first script is a script is a few lines, that can reassign a token from a username in one realm to a username in another realm. This can be a useful step during more complex rollout scenario. But automating such tasks of course reduces complexity and efforts to be taken.</p>



<p>We are happy to receive ideas and pull requests with new interesting scripts, which could enhance the scenarios with privacyIDEA to unexpected widths.</p>



<p>Visit our <a href="https://community.privacyidea.org">community forum</a> for further discussions!</p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.privacyidea.org/privacyidea-flexibility-in-the-very-genes/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</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>privacyIDEA 2.23 &#8211; Pre-Event-Handling, Monitoring and Statistics</title>
		<link>https://www.privacyidea.org/privacyidea-2-23-pre-events-handling-monitoring-and-statistics/</link>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Wed, 29 Aug 2018 07:23:25 +0000</pubDate>
				<category><![CDATA[release]]></category>
		<category><![CDATA[Whatsup]]></category>
		<category><![CDATA[Event Handler]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Statistics]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=1425</guid>

					<description><![CDATA[The Multi-Factor Authentication system privacyIDEA 2.23 comes with PRE event handling, recurring tasks, monitoring and statistics. The administrator thus has a lot of tools, to automate unforeseen scenarios and avoid manuel, tedious tasks and avoid errors.]]></description>
										<content:encoded><![CDATA[<p>After roughly five months of development we released the new version of privacyIDEA 2.23. Ideas for features in this release started in the beginning of this year. We wanted to add a flexible and modular way to allow the creation of monitoring and statistics data. We discussed a lot, met in person several times and scribbled down some concepts on the whiteboard.</p>
<p><a href="https://www.privacyidea.org/wp-content/uploads/2018/08/planungs-meeting.jpg"><img loading="lazy" decoding="async" class="aligncenter wp-image-1429" src="https://www.privacyidea.org/wp-content/uploads/2018/08/planungs-meeting.jpg" alt="" width="600" height="450" srcset="https://www.privacyidea.org/wp-content/uploads/2018/08/planungs-meeting.jpg 1200w, https://www.privacyidea.org/wp-content/uploads/2018/08/planungs-meeting-300x225.jpg 300w, https://www.privacyidea.org/wp-content/uploads/2018/08/planungs-meeting-768x576.jpg 768w, https://www.privacyidea.org/wp-content/uploads/2018/08/planungs-meeting-1024x768.jpg 1024w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a></p>
<p>It was a long way, but finally pieces started to fit together.</p>
<p>We are proud to present to you privacyIDEA version 2.23!</p>
<h2>Monitoring and Statistics</h2>
<p>To be able to provide a flexible and modular monitoring and to create any arbitrary statistics we created a framework of <strong>periodic tasks</strong>.</p>
<p>Using specific modules the administrator can define, what should happen in certain time intervals or at certain dates. These modules can collect system information for statistics, but such modules could also do anything else. Currently we provide two modules &#8211; the <strong>Event Counter</strong> and <strong>Simple Stats</strong><em>. </em></p>
<p>The Event Counter can be used in conjunction with the Event Handler to record the occurrence of any arbitrary event. The periodic task scheduler will write the number of these events to a time series. The Simple Stats module reads predefined values from the privacyIDEA system (like number of tokens, number of assigned tokens, number of <em>not assigned hardware tokens</em>) and also writes those to a time series.</p>
<p>The administrator can easily use tools like Grafana to view the time span of interest in an expressive graph.</p>
<p><a href="https://www.privacyidea.org/wp-content/uploads/2018/08/privacyidea-graphs-grafana.png"><img loading="lazy" decoding="async" class="aligncenter wp-image-1431" src="https://www.privacyidea.org/wp-content/uploads/2018/08/privacyidea-graphs-grafana.png" alt="" width="600" height="284" srcset="https://www.privacyidea.org/wp-content/uploads/2018/08/privacyidea-graphs-grafana.png 913w, https://www.privacyidea.org/wp-content/uploads/2018/08/privacyidea-graphs-grafana-300x142.png 300w, https://www.privacyidea.org/wp-content/uploads/2018/08/privacyidea-graphs-grafana-768x363.png 768w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a></p>
<h2>Pre-Event-Handling</h2>
<p><strong>Event Handlers</strong> were already added to privacyIDEA in Version 2.12. Using event handlers the administrator can connect any event to new actions like user notification, token management or any arbitrary script. If such an event occurs, the defined action is triggered.</p>
<p>With version 2.23 these actions can now be triggered, before the original event is processed. We distinguish Post-Event-Handling and <strong>Pre-Event-Handling</strong>. E.g. the administrator can define, that a user, who has no token assigned and tries to authenticate, gets a new token enrolled. And this newly enrolled token will be directly used during this authentication request. The logon experience for the user is totally transparent. There is <strong>no additional effort for the administrator</strong>.</p>
<p>This way a lot of tasks, which would otherwise be done manually or called by a script, will be executed automatically just at the right moment within privacyIDEA. This way the administrator can cope with unforeseen scenarios and can automate actions accordingly.</p>
<p><a href="https://www.privacyidea.org/wp-content/uploads/2018/08/event-handler-en.png"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-1433" src="https://www.privacyidea.org/wp-content/uploads/2018/08/event-handler-en-300x229.png" alt="" width="300" height="229" srcset="https://www.privacyidea.org/wp-content/uploads/2018/08/event-handler-en-300x229.png 300w, https://www.privacyidea.org/wp-content/uploads/2018/08/event-handler-en-768x586.png 768w, https://www.privacyidea.org/wp-content/uploads/2018/08/event-handler-en-1024x781.png 1024w, https://www.privacyidea.org/wp-content/uploads/2018/08/event-handler-en.png 1178w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></p>
<h2>Ordered Policies</h2>
<p>Policies have been around in privacyIDEA since day One. Policies define the way how privacyIDEA should respond to an API request. Policy definitions can become very complex. Policies also depend on time and the source IP address of the request. So in certain cases policies could overlap and the logic would not be clear, how privacyIDEA should respond.</p>
<p>To solve this problem we introduced a <strong>policy order</strong> in privacyIDEA 2.23. The administrator can give each policy an order number. This way the administrator can define which policy should come first and should take precedence if something should be unclear.</p>
<p>This can help in bigger, complex setups to make configuring privacyIDEA a lot easier.</p>
<h2>Your next steps</h2>
<p>We also added a lot more minor features and improved the SQL and HSM performance. For a complete Changelog please take a look at <a href="https://github.com/privacyidea/privacyidea/blob/master/Changelog" target="_blank" rel="noopener">Github</a>. You can install or update privacyIDEA via <a href="https://privacyidea.readthedocs.io/en/latest/installation/index.html" target="_blank" rel="noopener">the Ubuntu Launchpad repositories or via the Python Package Index</a>.</p>
<p>When you update, please see <a href="https://github.com/privacyidea/privacyidea/blob/master/READ_BEFORE_UPDATE.md" target="_blank" rel="noopener">read_before_update</a>.</p>
<p>If you have any questions, please have a look at the <a href="https://community.privacyidea.org/" target="_blank" rel="noopener">community forum</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>privacyIDEA at FrOSCon</title>
		<link>https://www.privacyidea.org/privacyidea-at-froscon/</link>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Tue, 07 Aug 2018 05:49:34 +0000</pubDate>
				<category><![CDATA[events]]></category>
		<category><![CDATA[Whatsup]]></category>
		<category><![CDATA[Event Handler]]></category>
		<category><![CDATA[FrOSCon]]></category>
		<category><![CDATA[ownCloud]]></category>
		<category><![CDATA[Statistics]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=1416</guid>

					<description><![CDATA[The privacyIDEA project - the most flexible two factor authentication system - will have a booth at FrOSCon, the Free and Open Source Conference in Sankt Augustin, Germany on August 25th and 26th.]]></description>
										<content:encoded><![CDATA[<p>The privacyIDEA project &#8211; the most flexible two factor authentication system &#8211; <a href="https://www.froscon.de/programm/aussteller/#a2083" target="_blank" rel="noopener">will have a booth at FrOSCon</a>, the Free and Open Source Conference in Sankt Augustin, Germany on August 25th and 26th.</p>
<p><a href="https://www.privacyidea.org/wp-content/uploads/2018/08/gull-1090835_1920.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1419" src="https://www.privacyidea.org/wp-content/uploads/2018/08/gull-1090835_1920.jpg" alt="" width="1920" height="603" srcset="https://www.privacyidea.org/wp-content/uploads/2018/08/gull-1090835_1920.jpg 1920w, https://www.privacyidea.org/wp-content/uploads/2018/08/gull-1090835_1920-300x94.jpg 300w, https://www.privacyidea.org/wp-content/uploads/2018/08/gull-1090835_1920-768x241.jpg 768w, https://www.privacyidea.org/wp-content/uploads/2018/08/gull-1090835_1920-1024x322.jpg 1024w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></a></p>
<p>Visitors will be able to talk to the core developer team of privacyIDEA and see the new features of the upcoming release 2.23, including <strong>Monitoring and Statistics</strong> and <strong>Pre-Event Handler</strong>. Once again these implementations will prove, that privacyIDEA is the most flexible two factor authentication system. The administrator can define freely which kind of values or event he wants to monitor. The pre-event handling opens unforeseen possibilties to design workflows like automagically enrolling Email tokens to the user just upon authentication.</p>
<p>Come and gape! The privacyIDEA booth is in the Mensa next to the ownCloud booth. And as privacyIDEA also integrates well with ownCloud, there will also be a workshop on integrating enterprise ready 2FA with the open file sharing solution on Sunday.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>privacyIDEA 2.22 with a more flexible RADIUS integration</title>
		<link>https://www.privacyidea.org/privacyidea-2-22-with-a-more-flexible-radius-integration/</link>
					<comments>https://www.privacyidea.org/privacyidea-2-22-with-a-more-flexible-radius-integration/#comments</comments>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Tue, 27 Mar 2018 07:03:25 +0000</pubDate>
				<category><![CDATA[release]]></category>
		<category><![CDATA[Whatsup]]></category>
		<category><![CDATA[Event Handler]]></category>
		<category><![CDATA[FreeRADIUS]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[talk]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=1344</guid>

					<description><![CDATA[With privacyIDEA 2.22 we added the possibility to pass more useful userinformation to a RADIUS client like a VPN. The administrator can add a policy to include the resolver and the realm of a user who authenticated successfully. This response data can then be used in the FreeRADIUS plugin and modified by regular expressions to add any arbitrary RADIUS attribute in the RADIUS response, which then would be sent to the VPN. This additional information can be used by Cisco ASA, Citrix Netscaler or any other enterprise grade VPN to put the user into certain subnets or to assign resource to the user.]]></description>
										<content:encoded><![CDATA[<p>Today we are happy to release privacyIDEA 2.22. It is available in the Ubuntu repositories for Ubuntu 14.04 LTS and 16.04 LTS. You can also install privacyIDEA on any Linux distribution on a virtualenv via the Python Package Index. <a href="http://privacyidea.readthedocs.io/en/master/installation/index.html" target="_blank" rel="noopener">Read the detailed documentation on how to install or upgrade privacyIDEA</a>.</p>
<p>You should always take a look at the <a href="https://github.com/privacyidea/privacyidea/blob/master/Changelog" target="_blank" rel="noopener">Changelog</a>, but starting with privacyIDEA we added a document <a href="https://github.com/privacyidea/privacyidea/blob/master/READ_BEFORE_UPDATE.md" target="_blank" rel="noopener">READ_BEFORE_UPDATE</a>, which contains important information to consider before upgrade.</p>
<p><figure id="attachment_1352" aria-describedby="caption-attachment-1352" style="width: 1280px" class="wp-caption aligncenter"><a href="https://www.privacyidea.org/wp-content/uploads/2018/03/background-3228704_1280.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-1352" src="https://www.privacyidea.org/wp-content/uploads/2018/03/background-3228704_1280.jpg" alt="" width="1280" height="544" srcset="https://www.privacyidea.org/wp-content/uploads/2018/03/background-3228704_1280.jpg 1280w, https://www.privacyidea.org/wp-content/uploads/2018/03/background-3228704_1280-300x128.jpg 300w, https://www.privacyidea.org/wp-content/uploads/2018/03/background-3228704_1280-768x326.jpg 768w, https://www.privacyidea.org/wp-content/uploads/2018/03/background-3228704_1280-1024x435.jpg 1024w" sizes="auto, (max-width: 1280px) 100vw, 1280px" /></a><figcaption id="caption-attachment-1352" class="wp-caption-text">privacyIDEA 2.22 is improving the RADIUS functionality to be more flexible in combination with VPNs and firewalls.</figcaption></figure></p>
<h3>New Features: RADIUS integration, VASCO support, Offline Refill and more</h3>
<p>With privacyIDEA 2.22 we added the possibility to pass more useful userinformation to a RADIUS client like a VPN. The administrator can add a policy to include the resolver and the realm of a user who authenticated successfully. This response data can then be used in the FreeRADIUS plugin and modified by regular expressions to add any arbitrary RADIUS attribute in the RADIUS response, which then would be sent to the VPN. This additional information can be used by Cisco ASA, Citrix Netscaler or any other enterprise grade VPN to put the user into certain subnets or to assign resource to the user.</p>
<h4>VASCO token support</h4>
<p>privacyIDEA is Open Source. We love Open Source and open standards. But sometimes you have to communicate with proprietary partners, so that they have the chance to become open. This is why privacyIDEA 2.22 comes with support for the proprietary VASCO Digipass tokens. This way it is easier to run VASCO tokens and open standards tokens like HOTP, TOTP or Yuibkeys in parallel and maybe even one day migrate all VASCO tokens &#8211; after the batteries have died &#8211; to other devices.</p>
<p>If you want to learn more about migrating your VASCO tokens, please contact <a href="https://netknights.it/en/unternehmen/kontakt/" target="_blank" rel="noopener">NetKnights for professional sevices</a>.</p>
<h4>Offline Refill</h4>
<p>We are improving the offline capability of privacyIDEA in conjunction with the PAM module and the <a href="https://netknights.it/en/produkte/privacyidea-credential-provider/" target="_blank" rel="noopener">privacyIDEA Credential Provider</a>. The new offline refill will allow to automatically refill the hashed OTP values on the notebooks, which are available for authentication, if the notebook is offline. This way users or administrators will not have to worry anymore when taking the hardware on a business trip.</p>
<h4>Send SMS via SMPP</h4>
<p>SMPP (Short Message Peer-to-Peer) is a protocol used by carriers for sending SMS. privacyIDEA 2.22 comes with a new SMS Provider to send SMS via SMPP. This can be used for sending SMS in the SMS token during authentication but also for sending SMS in the notification event handler, to notify users or administrators on certain events.</p>
<h4>Use Counter handler for monitoring and statistics</h4>
<p>&nbsp;</p>
<p><figure id="attachment_1355" aria-describedby="caption-attachment-1355" style="width: 283px" class="wp-caption alignright"><a href="https://www.privacyidea.org/wp-content/uploads/2018/03/speedometer-662191_1280.jpg"><img loading="lazy" decoding="async" class=" wp-image-1355" src="https://www.privacyidea.org/wp-content/uploads/2018/03/speedometer-662191_1280.jpg" alt="" width="283" height="212" srcset="https://www.privacyidea.org/wp-content/uploads/2018/03/speedometer-662191_1280.jpg 1280w, https://www.privacyidea.org/wp-content/uploads/2018/03/speedometer-662191_1280-300x225.jpg 300w, https://www.privacyidea.org/wp-content/uploads/2018/03/speedometer-662191_1280-768x576.jpg 768w, https://www.privacyidea.org/wp-content/uploads/2018/03/speedometer-662191_1280-1024x768.jpg 1024w" sizes="auto, (max-width: 283px) 100vw, 283px" /></a><figcaption id="caption-attachment-1355" class="wp-caption-text">With the counter handler the administrator can count arbitrary events and use this data for statistics.</figcaption></figure></p>
<p>We often see, that the event handler is a mighty tool to cope with many different requirements. In addition to the notification handler, token handler, script handler and federation handler privacyIDEA 2.22 now comes with a simply but very flexible counter handler. Just like every handler it can be attached to any event (API call) and will trigger under defined conditions. The counter handler simply increses a counter in the database for this very event.</p>
<p>These counters can now be used for statistics or monitoring, e.g. when increasing a certain counter on the event failed authentication with HOTP token. This way the administrator could monitor the number of failed authentications per time interval.</p>
<h4>Each token has a tokenkind</h4>
<p>Many installations use hardware tokens and software tokens at the same time. To be more flexible in distinguishing these tokens when it comes to deleting tokens or deciding giving access, we added an additional class attribute to tokens. The &#8220;tokenkind&#8221;. In contrast to the tokentype, which is simply the mathematics of the token, the tokenkind defines if this very token object is  hardware token, a software token or a virtual token.</p>
<h4>Use arbitrary tokeninfo in authorization policies</h4>
<p>Authorization policies are used to decide if an authenticated user should get access or not. As the arbitrary tokeninfo fields are getting used more in more in event handler definitions, the tokeninfo can now also be used in the authorization policies to grant or deny access.</p>
<p>This way event handlers could modify token information and this modified token information can be used for granting access. Event handling and authorization thus get connected more tightly.</p>
<h3>Lots of enhancements</h3>
<p>There are further enhancements of existing features in privacyIDEA. We improved the token export the PSKC files &#8211; we will also export PW token types and the counter values of HOTP and TOTP tokens. The export can now also be used to reencrypt a token database.</p>
<p>The SMS and Email token types can now either use the fixed mobile number or email address in the token data or read the mobile/email dynamically from the user store on each authentication event.</p>
<p>The administrator can define a policy so that the validity of the U2F attestation certificate will be ignored. Some U2F devices come with a attestation certificate with an invalid validity period.</p>
<p>We improved the speed of the LinOTP migration script, so that a database with tens of thousands of tokens can be easily migrated.</p>
<p>The pi-manage script can now generate API tokens with a freely chosen validity time.</p>
<p>The user can now set the description of HOTP and TOTP tokens during enrollment.</p>
<p>The administrator can add a timeout to the SMTP server configuration.</p>
<p>The email tokens can now use a complex html template for sending emails.</p>
<p>The LDAP resolver allows to define each attribute as a multivalue attribute.</p>
<p>The event handler condition can trigger on failed authentication.</p>
<p>For the complete changelog with also contains all the fixes, please take a look a the <a href="https://github.com/privacyidea/privacyidea/blob/master/Changelog" target="_blank" rel="noopener">Github repository</a>.</p>
<h3>Enterprise Edition</h3>
<p>If you are running large mission critical setups, privacyIDEA is also available as <a href="https://netknights.it/en/produkte/privacyidea/" target="_blank" rel="noopener">Enterprise Edition with support and warranty/liability</a>.</p>
<h3>privacyIDEA at Grazer Linuxtage and Linuxfest Northwest</h3>
<p>At the end of April you can hear a <a href="https://glt18-programm.linuxtage.at/events/322.html" target="_blank" rel="noopener">talk about privacyIDEA</a> in Austria at the <a href="https://www.linuxtage.at/" target="_blank" rel="noopener">Grazer Linuxtage</a>. You will learn, how you can easily migrate an old, existing, proprietary 2FA system to privacyIDEA. Project member Friedrich Weber will also host a <a href="https://glt18-programm.linuxtage.at/events/323.html" target="_blank" rel="noopener">workshop at the Grazer Linuxtage</a>, where you can participate in installing privacyIDEA and configuring to your needs.</p>
<p>At the same time Cornelius Kölbel will give a talk in Bellingham Technical Colleage, U.S.A. At the <a href="https://www.linuxfestnorthwest.org/conferences/lfnw18" target="_blank" rel="noopener">LinuxFest NorthWest 2018</a> you can learn about what makes privacyIDEA so unique in regards to workflow integrations using the privacyIDEA Event Handler system automating a lot of individual tasks.</p>
<h3>Join the discussion</h3>
<p>Join the discussion a <a href="https://community.privacyidea.org" target="_blank" rel="noopener">community.privacyidea.org</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.privacyidea.org/privacyidea-2-22-with-a-more-flexible-radius-integration/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>privacyIDEA Talk at FOSDEM &#8211; MFA enrollment for thousands of users</title>
		<link>https://www.privacyidea.org/privacyidea-talk-at-fosdem-mfa-enrollment-for-thousands-of-users/</link>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Tue, 09 Jan 2018 10:58:33 +0000</pubDate>
				<category><![CDATA[events]]></category>
		<category><![CDATA[Whatsup]]></category>
		<category><![CDATA[Enrollment]]></category>
		<category><![CDATA[Event Handler]]></category>
		<category><![CDATA[FOSDEM]]></category>
		<category><![CDATA[mass enrollment]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=1320</guid>

					<description><![CDATA[You want to use two factor authentication for all your users? But you are always wondering how you should enroll an authentication device to every single of your users? Existing solutions do not provide convenient ways to equip thousands of users easily with a second factor? Using automated processes with a REST API and an [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><figure id="attachment_1323" aria-describedby="caption-attachment-1323" style="width: 405px" class="wp-caption aligncenter"><a href="https://www.privacyidea.org/wp-content/uploads/2018/01/otp-cards.png"><img loading="lazy" decoding="async" class="wp-image-1323" src="https://www.privacyidea.org/wp-content/uploads/2018/01/otp-cards.png" alt="" width="405" height="304" srcset="https://www.privacyidea.org/wp-content/uploads/2018/01/otp-cards.png 800w, https://www.privacyidea.org/wp-content/uploads/2018/01/otp-cards-300x225.png 300w, https://www.privacyidea.org/wp-content/uploads/2018/01/otp-cards-768x576.png 768w" sizes="auto, (max-width: 405px) 100vw, 405px" /></a><figcaption id="caption-attachment-1323" class="wp-caption-text">You need to enroll lots of tokens to your users? No problem with privacyIDEA!</figcaption></figure></p>
<p>You want to use two factor authentication for all your users? But you are always wondering how you should enroll an authentication device to every single of your users? Existing solutions do not provide convenient ways to equip thousands of users easily with a second factor?</p>
<p>Using automated processes with a <a href="http://privacyidea.readthedocs.io/en/latest/modules/api.html" target="_blank" rel="noopener">REST API</a> and an automating <a href="https://www.privacyidea.org/privacyidea-2-12-released-event-handler-certificates-pkcs12-pkcs11-much/">event handler</a> privacyIDEA provides the necessary means to easily do this task.</p>
<p>At <a href="https://fosdem.org/2018/schedule/event/privacyidea/" target="_blank" rel="noopener">FOSDEM Cornelius will give a talk about how easy it can be using privayIDEA to enroll second factors</a> to all your lots of users. Join <a href="https://fosdem.org" target="_blank" rel="noopener">FOSDEM</a> in Brussels and February 4th and learn about those great features of privacyIDEA.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>privacyIDEA 2.21  with a more secure smartphone enrollment</title>
		<link>https://www.privacyidea.org/privacyidea-2-21-with-a-more-secure-smartphone-enrollment/</link>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Wed, 20 Dec 2017 06:33:33 +0000</pubDate>
				<category><![CDATA[release]]></category>
		<category><![CDATA[Audit]]></category>
		<category><![CDATA[Enrollment]]></category>
		<category><![CDATA[Event Handler]]></category>
		<category><![CDATA[FOSDEM]]></category>
		<category><![CDATA[Smartphone]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=1306</guid>

					<description><![CDATA[Today we released privacyIDEA 2.21. It is available in the Ubuntu repositories for Ubuntu 16.04LTS and 14.04LTS. You can also update and install privacyIDEA on any distribution via the Python Package Index. Secure Rollout of a smartphone app The central new feature of privacyIDEA 2.21 is the possibility to enroll a smartphone token in a [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.privacyidea.org/wp-content/uploads/2017/12/privacyidea-Authenticator-teaser.png"><img loading="lazy" decoding="async" class="aligncenter wp-image-1310 size-full" src="https://www.privacyidea.org/wp-content/uploads/2017/12/privacyidea-Authenticator-teaser.png" alt="The privacyIDEA Authenticator allows secure enrollment of smartphones" width="480" height="400" srcset="https://www.privacyidea.org/wp-content/uploads/2017/12/privacyidea-Authenticator-teaser.png 480w, https://www.privacyidea.org/wp-content/uploads/2017/12/privacyidea-Authenticator-teaser-300x250.png 300w" sizes="auto, (max-width: 480px) 100vw, 480px" /></a>Today we released privacyIDEA 2.21. It is available in the <a href="http://privacyidea.readthedocs.io/en/latest/installation/ubuntu.html" target="_blank" rel="noopener">Ubuntu repositories for Ubuntu 16.04LTS and 14.04LTS</a>. You can also update and install privacyIDEA <a href="http://privacyidea.readthedocs.io/en/latest/installation/index.html" target="_blank" rel="noopener">on any distribution via the Python Package Index</a>.</p>
<h2>Secure Rollout of a smartphone app</h2>
<p>The central new feature of privacyIDEA 2.21 is the possibility to enroll a smartphone token in a more secure way. privacyIDEA supported smartphone Apps like the Google Authenticator and FreeOTP right from the start. But you already might be aware of the <a href="https://netknights.it/en/the-problem-with-the-google-authenticator/" target="_blank" rel="noopener">problems with enrolling smartphone tokens</a>.</p>
<p>This is why we added a 2-step enrollment in privacyIDEA 2.21.</p>
<h3>2-Step enrollment in privacyIDEA 2.21</h3>
<p>Using privacyIDEA you have now the possibility to enroll a smartphone token in a much securer way. The sensitive secret key is created from a part generated on the server side and a second part generated on the phone side. This way an attacker can no longer easily copy the smartphone token during the enrollment process. You can find a more technical specification of the <a href="http://privacyidea.readthedocs.io/en/latest/workflows_and_tools/2step/index.html" target="_blank" rel="noopener">two step enrollment in the online documentation</a>.</p>
<p><figure id="attachment_1308" aria-describedby="caption-attachment-1308" style="width: 353px" class="wp-caption alignright"><a href="https://www.privacyidea.org/wp-content/uploads/2017/12/hands-1167612_640.jpg"><img loading="lazy" decoding="async" class="wp-image-1308" src="https://www.privacyidea.org/wp-content/uploads/2017/12/hands-1167612_640.jpg" alt="More secure enrollment of a smartphone app." width="353" height="202" srcset="https://www.privacyidea.org/wp-content/uploads/2017/12/hands-1167612_640.jpg 640w, https://www.privacyidea.org/wp-content/uploads/2017/12/hands-1167612_640-300x172.jpg 300w" sizes="auto, (max-width: 353px) 100vw, 353px" /></a><figcaption id="caption-attachment-1308" class="wp-caption-text">More secure enrollment of a smartphone app.</figcaption></figure></p>
<p>The new privacyIDEA Authenticator App will support this new two step enrollment and is also backward compatible to the normal Google Authenticator enrollment URI. <a href="https://netknights.it/en/privacyidea-authenticator-the-better-smartphone-factor/" target="_blank" rel="noopener">Ask the company NetKnights to be part of the beta testing phase of the privacyIDEA Authenticator App</a>.</p>
<h2>Easy administration</h2>
<p>Many enhancements will make the daily life easier for the token administrator. The root user can now export an encrypted PSKC file. The data can then be imported to another privacyIDEA instance or to any other RFC6030 complient applicantion. The event handlers were also improved: The Notification handler now has more tags to be used in the body and the Federation handler can forward administrative requests.</p>
<h2>Clean-up Audit log</h2>
<p>Audit Log can be rotated in a more sophisticated way. The administrator can specify retention times for different log entries.</p>
<h2>Better HSM support</h2>
<p>Hardware Securtiy Modules can now be used to generate random numbers at many different places within privacyIDEA:</p>
<p>You can view a complete <a href="https://github.com/privacyidea/privacyidea/blob/master/Changelog" target="_blank" rel="noopener">changelog at github</a>.</p>
<h2>Enterprise Edition</h2>
<p>If you are running large mission critical setups, privacyIDEA is also available as <a href="https://netknights.it/en/produkte/privacyidea/" target="_blank" rel="noopener">Enterprise Edition with support and warranty/liability</a>.</p>
<h2>privacyIDEA going FOSDEM</h2>
<p>The privacyIDEA project will be at FOSDEM 2018 on February 3rd and 4th. We have a stand in building H. <a href="https://www.privacyidea.org/privacyidea-going-fosdem/">Please join us there</a>!</p>
<p>&nbsp;</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Highest flexibility with the tokeninfo fields</title>
		<link>https://www.privacyidea.org/highest-flexibility-tokeninfo-fields/</link>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Thu, 09 Nov 2017 21:43:06 +0000</pubDate>
				<category><![CDATA[documentation]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Event Handler]]></category>
		<category><![CDATA[Tokeninfo]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=1273</guid>

					<description><![CDATA[On a wish list for another OTP solutions I saw the requirement to have an &#8220;enrollment date&#8221; or a &#8220;last use date&#8221; of a token. Well, you might know, that privacyIDEA can do all this. Then you are welcome to skip this blog post and visit the privacyIDEA community to help answering questions there. Thanks [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>On a wish list for another OTP solutions I saw the requirement to have an &#8220;enrollment date&#8221; or a &#8220;last use date&#8221; of a token.</p>
<p>Well, you might know, that privacyIDEA can do all this. Then you are welcome to skip this blog post and visit the <a href="https://community.privacyidea.org" target="_blank" rel="noopener">privacyIDEA community</a> to help answering questions there. Thanks a lot! If not &#8211; go on reading!</p>
<h2>The tokeninfo table</h2>
<p>Every token has its own Tokeninfo table, that can hold any additional arbitrary information. In the UI it looks like this:</p>
<p><a href="https://www.privacyidea.org/wp-content/uploads/2017/11/Bildschirmfoto-vom-2017-11-09-21-50-29.png"><img loading="lazy" decoding="async" class="aligncenter wp-image-1274 size-full" src="https://www.privacyidea.org/wp-content/uploads/2017/11/Bildschirmfoto-vom-2017-11-09-21-50-29.png" alt="" width="565" height="75" srcset="https://www.privacyidea.org/wp-content/uploads/2017/11/Bildschirmfoto-vom-2017-11-09-21-50-29.png 565w, https://www.privacyidea.org/wp-content/uploads/2017/11/Bildschirmfoto-vom-2017-11-09-21-50-29-300x40.png 300w" sizes="auto, (max-width: 565px) 100vw, 565px" /></a></p>
<p>It tells us that the used hashlib is &#8220;sha1&#8221; and the token was used 3 times for authentication.</p>
<p>On the database level the tokeninfo is a table on its own, which means that every token can hold as many token information as it needs to:</p>
<p><figure id="attachment_1275" aria-describedby="caption-attachment-1275" style="width: 724px" class="wp-caption aligncenter"><a href="https://www.privacyidea.org/wp-content/uploads/2017/11/tokeninfo-table.png"><img loading="lazy" decoding="async" class="wp-image-1275 size-full" src="https://www.privacyidea.org/wp-content/uploads/2017/11/tokeninfo-table.png" alt="" width="724" height="215" srcset="https://www.privacyidea.org/wp-content/uploads/2017/11/tokeninfo-table.png 724w, https://www.privacyidea.org/wp-content/uploads/2017/11/tokeninfo-table-300x89.png 300w" sizes="auto, (max-width: 724px) 100vw, 724px" /></a><figcaption id="caption-attachment-1275" class="wp-caption-text">A view on the tokeninfo database table</figcaption></figure></p>
<p>It does not matter where and how you add tokeninfos to this table. privacyIDEA will use them.</p>
<p>privacyIDEA knows some default or preserve keywords, for which it is using the tokeninfo table. This is the <a href="http://privacyidea.readthedocs.io/en/latest/modules/lib/tokenclass.html#privacyidea.lib.tokenclass.TokenClass.get_validity_period_end" target="_blank" rel="noopener">validity period</a> of a token, that is denoted with &#8220;validity_period_start&#8221; and &#8220;validity_period_end&#8221;, the &#8220;count_auth&#8221; or &#8220;count_auth_success&#8221; and also markes that define for how many authentications a token can be used.</p>
<p>But you can also set any other value.</p>
<h2>Event Handler and tokeninfo</h2>
<p>There are probably many ways to set tokeninfo fields, but obviously the most interesting way is the event handler. If you do not know the event handler yet, you can either read about it in <a href="https://www.privacyidea.org/most-flexible-two-factor-authentication-handling-your-events/">our blog</a> or in the <a href="http://privacyidea.readthedocs.io/en/latest/eventhandler/index.html" target="_blank" rel="noopener">online documentation</a>.</p>
<p>Using the <strong>Token Handler</strong> you can set a tokeninfo field during any REST API call. You could e.g. set a tokeninfo field &#8220;enrollment_date&#8221; and hook it to the event <strong>/token/init</strong>.</p>
<p><a href="https://www.privacyidea.org/wp-content/uploads/2017/11/event-enrollment-date.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1278" src="https://www.privacyidea.org/wp-content/uploads/2017/11/event-enrollment-date.png" alt="" width="840" height="663" srcset="https://www.privacyidea.org/wp-content/uploads/2017/11/event-enrollment-date.png 840w, https://www.privacyidea.org/wp-content/uploads/2017/11/event-enrollment-date-300x237.png 300w, https://www.privacyidea.org/wp-content/uploads/2017/11/event-enrollment-date-768x606.png 768w" sizes="auto, (max-width: 840px) 100vw, 840px" /></a></p>
<p>As mentioned, you can set any arbitrary tokeninfo field. In this case we set the &#8220;enrollment_date&#8221; to the current time. The timestamp of the current time will be saved in the token info.</p>
<p>Well, why not immediately and automatically set the validity period? No problem: The value can not only use tags, but also <a href="http://privacyidea.readthedocs.io/en/latest/eventhandler/tokenhandler.html#set-tokeninfo" target="_blank" rel="noopener">some other magic</a>:</p>
<p><a href="https://www.privacyidea.org/wp-content/uploads/2017/11/set-validity.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1279" src="https://www.privacyidea.org/wp-content/uploads/2017/11/set-validity.png" alt="" width="847" height="674" srcset="https://www.privacyidea.org/wp-content/uploads/2017/11/set-validity.png 847w, https://www.privacyidea.org/wp-content/uploads/2017/11/set-validity-300x239.png 300w, https://www.privacyidea.org/wp-content/uploads/2017/11/set-validity-768x611.png 768w" sizes="auto, (max-width: 847px) 100vw, 847px" /></a></p>
<p>Setting the value of &#8220;validity_period_end&#8221; to &#8220;{current_time}+12&#8221; will result in a timestamp, that is 12 days in the future. Combining this with the reserved key &#8220;validity_period_end&#8221; we can automatically enroll tokens, that are only valid for 12 days!</p>
<h2>How to use tokeninfo fields</h2>
<p>privacyIDEA knows how to use the preserved tokeninfo fields. These actions are hard wired into the code.<br />
Of course you can use any arbitrary field simply to pass information to a help desk employee or to store some notes. But there are again at lease two interesting way how to automatically use the tokeinfo field.</p>
<h3>Again the event handler</h3>
<p>Again &#8211; you can use the tokeninfo field with the event handler. <a href="http://privacyidea.readthedocs.io/en/latest/eventhandler/index.html#basic-conditions" target="_blank" rel="noopener">But this time as a condition</a>. For any REST API call you can check the tokeninfo field of the token involved. And if any arbitrary (I like this word!) tokeninfo field matches your condition, you can trigger a new action.</p>
<p>A condition could be anything or a fixed timestamp but also &#8211; again &#8211; &#8220;{now}&#8221;:</p>
<p><a href="https://www.privacyidea.org/wp-content/uploads/2017/11/condition-now.png"><br />
<img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1284" src="https://www.privacyidea.org/wp-content/uploads/2017/11/condition-now.png" alt="" width="947" height="339" srcset="https://www.privacyidea.org/wp-content/uploads/2017/11/condition-now.png 947w, https://www.privacyidea.org/wp-content/uploads/2017/11/condition-now-300x107.png 300w, https://www.privacyidea.org/wp-content/uploads/2017/11/condition-now-768x275.png 768w" sizes="auto, (max-width: 947px) 100vw, 947px" /></a></p>
<p>This way we can check if the tokeninfo field &#8220;validity_period_end&#8221; has a youger timestamp than the current moment. Only if the condition applies the defined action will be triggered.</p>
<p>But often &#8220;now&#8221; is not the right moment!</p>
<p><a href="https://www.privacyidea.org/wp-content/uploads/2017/11/tokenenrolled-lastweek.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1285" src="https://www.privacyidea.org/wp-content/uploads/2017/11/tokenenrolled-lastweek.png" alt="" width="921" height="273" srcset="https://www.privacyidea.org/wp-content/uploads/2017/11/tokenenrolled-lastweek.png 921w, https://www.privacyidea.org/wp-content/uploads/2017/11/tokenenrolled-lastweek-300x89.png 300w, https://www.privacyidea.org/wp-content/uploads/2017/11/tokenenrolled-lastweek-768x228.png 768w" sizes="auto, (max-width: 921px) 100vw, 921px" /></a></p>
<p>In this example the action will only trigger, if the &#8220;enrollment_date&#8221; is older than one week. You can use the tag &#8220;{now}-7d&#8221; which will result in a timestamp of last week!</p>
<p>Combined with the event handlers for <strong>notification, scripting, token handling or federation</strong> the administrator can probably define anything and automate a lot of processes!</p>
<h3>Clean it! The token janitor</h3>
<p>There is also another way of using the tokeninfo fields. It is the tokenjanitor script.</p>
<p>The privacyidea-token-janitor runs as a script from the command line and find specific tokens and perform actions on these tokens. It was first used to <a href="http://privacyidea.readthedocs.io/en/latest/modules/lib/tokenclass.html#privacyidea.lib.tokenclass.TokenClass.is_orphaned" target="_blank" rel="noopener">find orphaned tokens</a> and possibly delete these orphaned tokens.</p>
<p>But of course the token-janitor can find tokens based on may conditions &#8211; also based on the tokeninfo field.</p>
<p><a href="https://www.privacyidea.org/wp-content/uploads/2017/11/privacyidea-token-janitor.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1289" src="https://www.privacyidea.org/wp-content/uploads/2017/11/privacyidea-token-janitor.png" alt="" width="928" height="400" srcset="https://www.privacyidea.org/wp-content/uploads/2017/11/privacyidea-token-janitor.png 928w, https://www.privacyidea.org/wp-content/uploads/2017/11/privacyidea-token-janitor-300x129.png 300w, https://www.privacyidea.org/wp-content/uploads/2017/11/privacyidea-token-janitor-768x331.png 768w" sizes="auto, (max-width: 928px) 100vw, 928px" /></a></p>
<p>This way the administrator can use the tokeninfo field to mark tokens and e.g. delete all marked tokens. The condition can also be a timestamp in the tokeninfo field. Actions can also be to disable or enable a token or only to mark this token (in the tokeninfo field).</p>
<p>&nbsp;</p>
<p>If you thought privacyIDEA is cool &#8211; you may realize you were wrong.</p>
<p>privacyIDEA is extremely cool!</p>
<p>So use it! &#8211; share your ideas at the <a href="https://community.privacyidea.org" target="_blank" rel="noopener">community</a> or enlighten use with your <a href="https://github.com/privacyidea/privacyidea" target="_blank" rel="noopener">pull request at github</a>!</p>
<p>If you also want to be cool &#8211; you may also <a href="https://netknights.it/en/unternehmen/job-offers/" target="_blank" rel="noopener">apply for a job at the cool guys!</a> <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
