Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

Obsah

Smart Web podporuje autentifikácie web klientov pomocou klientskych certifikátov. Jedná sa o špeciálny režim autentifikácie klientov známy ako ‘Mutual authentication’ alebo ‘HTTPS client authentication’ alebo supports authentication of web clients using client certificates. It is a special mode of authentication of clients known as ‘Mutual authentication’ or ‘HTTPS client authentication’ or TLS Client Certificate Authentication.

Client certificate handshake

Smart Web podporuje dva režimy overovania klientskych certifikátov konfigurovateľné v súbore smartweb.json:support two ways of authenticating of client certificates configurable in the smartweb.json file:

  1. Local authentication Lokálne overovanie (AUTH_CERTIFICATE_LOCALLY) na strane on the WildFly AS side
  2. Vzdialené overovanie Remote authentication (AUTH_CERTIFICATE_REMOTELY) v aplikácii in the D2000

Nasledujúce kapitoly obsahujú odporúčania pre generovanie a správu klientskych certifikátov.

Postup generovania klientských certifikátov

Klientske certifikáty sa generujú pomocou nástroja KeyStore Explorer. Postup je nasledovný:

  1. application

The following chapters contain recommendations for generating and administration of client certificates.

Process of Generating Client Certificates

Client certificates are generated using the KeyStore Explorer tool. Steps of the process are as follows: 

  1. It is necessary to create a keystore in which a Je potrebné vytvoriť keystore, v ktorom bude uložený self-signed companyca keypair . Názov tohto súboru je will be stored. A name of this file is master-client-credentials.jks. Vytvorí sa nasledovne, po štarte programu vybrať Create a new KeyStore, kde definujeme typ KeyStoru v našom prípade It is created by choosing Create and new KeyStore after the program start where we define the type of KeyStore, in our case JKS. 

    Varovanie

    Súbor The master-client-credentials.jks sa nepoužíva priamo na serveroch, ale slúži len ako repository certifikátov. Zo súboru file is not used directly on servers but serves only as a repository certificate. From the master-client-credentials.jks sa nikdy neexportuje privátny kľúč companyca !!! 

    Image Removed

    file, the private key companyca is never exported!

    Image Added

  2. Then we right-click and choose Ďalej klikneme pravým tlačidlom a vyberieme Generate Key Pair. 

  3. Algorithm Selection necháme na RSA s hodnotou The Selection algorithm is left on RSA with the value Key Size 2048. Ďalej vyberieme verziu  Then we choose the version 3, Signature Alghorithm Algorithm SHA-256 with RSA and a dobu platnosti. Pri položke Name je dôležité vyplniť čo najviac údajov pre dôveryhodnosťvalidity period. In the Name item, it is important to fill in as much data as possible for it to be trustworthy
  4. Následne zvolíme Then we choose Alias and a heslo password of companyca Key Pair-u. Ďalej uložíme KeyStore pod menom . Further, we store KeyStore under the master-client-credentials.jks . Pri ukladaní sa opäť vyžaduje nastavenie hesla, tentokrát však na name. When storing, setting password is again required but this time on KeyStore.
  5. Pre každého klienta je potrebné vygenerovať For every client, it is necessary to generate key-pair podpísaný pomocou signed by companyca. Postupujeme tak, že klikneme pravým na companyca v menu zvolíme Sign a We proceed by right-clicking on companyca, we choose Sign and Sign New Key Pair . Vytvoríme nový KeyPair pre ClientaA s nastaveniami šifrovania ako pri in the menu. We create new KeyPair for ClientaA with the coding set as in companyca
  6. Pre overenie, že je klientsky KeyPair podpísaný companyca autoritou, klikneme pravým na ClientaAa vyberieme z menu View Details a Certificate Chain Details. V danom okne je vidieť, že vlastníkom je companyca autorita.
    Image Removed
  7. To authenticate that the client KeyPair is signed by companyca authority, we right-click on ClientaAa and choose from the menu View Details and Certificate Chain Details. We can see in the given window that the owner is the companyca authority.
    Image Added
  8. From the Zo súboru master-client-credentials.jks sa exportujú certifikáty klientov a companyca do súborov file, client certificates are exported and companyca into files clientcertificates-full.jks, client-certificates-d2ws.jks, client-certificates-d2000.jks (Dávajú sa na servery, obsahujú verejné kľúče). Certifikáty jednotlivých klientov a companyca vyexportujeme kliknutím na klienta, prípadne companyca a dáme Export a They are located on servers and contain public keys). Certificates od individual clients and companyca are exported by clicking on a client or else on companyca and by clicking Export and Export Certificate Chain.
  9. Pri exporte ponecháme nastavenia prípadne upravíme cestu, kde sa ma certifikát uložiť a klikneme na When exporting, we leave the settings or adjust the path where the certificate should be stored and click the export.
     
  10. Keď sú všetky certifikáty vyexportované, uložíme ich do When all certificates are exported, we store them into clientcertificates-full.jks a to tak, že vytvoríme nový JKS súbor cez menu programu by creating new JKS file through a menu of the program KeyStore File > New a vyberieme typ JKS. Tu naimportujeme certifikáty kliknutím pravým tlačidlom myši a vyberieme Import Trusted Certificate a certifikát, ktorý chceme importovaťand choose the JKS type. Here we import certificates by right-clicking and choose Import Trusted Certificate and the certificate which we want to import.
     
  11. Po naimportovaní KeyStore uložíme ako After importing KeyStore, we store it as clientcertificates-full. Opäť je vyžadovanie nastavenie hesla na tento JKS súbor.
    Tento súbor Again it is required to set a password on this JKS file.
    We store the clientcertificates-full.jks uložíme na konkrétny server, kde to je vyžadované.file on a particular server where it is required. 
  12. From the Zo súboru master-client-credentials.jks sa exportujú file, key-pairs klientov vo formáte of clients are exported in the *.p12 (obsahujú verejné aj privátne kľúče, dáva sa zákazníkovi na zariadenie (format (they contain public and private keysit is given to customers on devices - PC, Tablet ...)). Export vykonáme v súbore We export in the master-client-credentials.jks , kde klikneme pravým tlačidlom na jednotlivých klientov a dáme file where we right-click on individual clients and click Export > Export Key Pair. V zložke sa nám vytvoria súbory ClientA.p12 a and ClientB.p12 , ktoré sa pošlú jednotlivým užívateľom na zariadeniafiles are created in the folder and they are sent to individual users to their devices.

Správa klientskych certifikátov

Administration of Client Certificates

  1. The master-client-credentials.jks keystore obsahuje contains master companyca key-pair a ním podpísané klientske and by them signed client key-pairs.
  2. Klientske certifikáty pre klientov Client certificates for clients of the Smart Web aplikácie a companyca certifikát je potrebné vyexportovať do súboru application and companyca certificate must be exported to the client-certificates-full.jks , ktorý musí byť prístupný na čítanie pre jvm proces, v ktorom beží WildFly AS.file that must be accessible for reading for jvm process in which the WildFly AS runs.
  3. Client certificates and private keys must be exported from the Klientske certifikáty a privátne kľúče je potrebné exportovať zo súboru master-client-credentials.jks vo formáte file in the *.p12 file.

...

Installation of Client Certificate

Microsoft Windows 7/8/10 – desktop PC

Na import klientskych certifikátov je vhodné použiť aplikáciu certmgr.msc, ktorá je štandardnou súčasťou OS Windows. Je potrebné vybrať priečinok “Personal” a zvoliť akciu import pre príslušný To import client certificates, it is suitable to use the certmgr.msc application that is standardly a part of OS Windows. It is necessary to choose the folder “Personal” and select action import for the relevant *.p12 key-pair.

Android

Klientsky The client *.p12 key-pair je potrebné uložiť do adresára “Downloads” a importovať cez nastavenia systému.must be stored in the directory “Downloads” and imported through system settings. 

iOS

Klientsky The client *.p12 key-pair je potrebné poslať v prílohe mailom na klientske zariadenia importovať cez nastavenia systému.must be sent in an attachment of a mail to the client device and imported through system settings.