<commit_before>EstIdcardBundle
===============

Enables authentication via Estonian national ID card in Symfony 2 projects
Detailed description will be available soon

Installation
===============
Isn't available yet. When the Bundle will be completed, instructions for Composer will be added.

Configuration
===============

As soon as Estonian National ID cards use assymertic key ancryption to authenticate on websites, EstIdcardBundle requires OpenSSL extension installed and enabled on server machine. When ID card authentication is required, Apache (not PHP!) requests client's certificate. After certificate was sent, user's certificate information becomes available from $_SERVER array. Please note that autentication via ID cards is only available if website uses HTTPS protocol.


Your HTTP server should check client's certificate on some specific page. An example of Apache virtual host configuration is provided below:
~~~
#HTTPS-based websites listen port 443. It might be necessary to add NameVirtualHost directive before declaration of virtual host.

<VirtualHost *:443>
        #Here are such common directives as ServerName, ServerAlias, paths to log files, etc 

        #Directives for SSL
        SSLEngine On
        SSLProtocol all -SSLv2
        SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
        
        #Information about certificates. More info on http://id.ee/index.php?id=35753
        
        SSLCertificateFile /etc/apache2/conf/ssl.key/mykey.crt
        SSLCertificateKeyFile /etc/apache2/conf/ssl.key/mykey.key
        SSLCACertificateFile /etc/apache2/conf/ssl.key/id_key.crt
        SSLCARevocationPath /etc/apache2/conf/ssl.key/revocation/<commit_msg>Updated installation instructions<commit_after>EstIdcardBundle
===============

Enables authentication via Estonian national ID card in Symfony 2 projects
Detailed description will be available soon

Installation
===============
Add a dependency to composer.json file:
~~~
"tfox/estidcard-bundle": "1.0.0"
~~~

Add to AppKernel.php:

~~~
$bundles = array(
  ...
  new TFox\EstIdcardBundle\TFoxEstIdcardBundle(),
  ...
);
~~~


Configuration
===============

As soon as Estonian National ID cards use assymertic key ancryption to authenticate on websites, EstIdcardBundle requires OpenSSL extension installed and enabled on server machine. When ID card authentication is required, Apache (not PHP!) requests client's certificate. After certificate was sent, user's certificate information becomes available from $_SERVER array. Please note that autentication via ID cards is only available if website uses HTTPS protocol.


Your HTTP server should check client's certificate on some specific page. An example of Apache virtual host configuration is provided below:
~~~
#HTTPS-based websites listen port 443. It might be necessary to add NameVirtualHost directive before declaration of virtual host.

<VirtualHost *:443>
        #Here are such common directives as ServerName, ServerAlias, paths to log files, etc 

        #Directives for SSL
        SSLEngine On
        SSLProtocol all -SSLv2
        SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
        
        #Information about certificates. More info on http://id.ee/index.php?id=35753
        
        SSLCertificateFile /etc/apache2/conf/ssl.key/mykey.crt
        SSLCertificateKeyFile /etc/apache2/conf/ssl.key/mykey.key
        SSLCACertificateFile /etc/apache2/conf/ssl.key/id_key.crt
        SSLCARevocationPath /etc/apache2/conf/ssl.key/revocation/
{'fraction_non_alphanumeric': 0.08775395033860045, 'fraction_numerical': 0.011568848758465011, 'mean_word_length': 4.078796561604585, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5718823', 'n_tokens_mistral': 973, 'n_tokens_neox': 920, 'n_words': 357}