Porovnávané verzie

Kľúč

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

Obsah

Konfigurácia autentifikácie SmartWeb aplikácie má nasledovnú štruktúru v súbore Configuration of authentication of the SmartWeb application has the following structure in the smartweb.json. Príklady konfigurácie sú uvedené nižšie. file. the examples of configuration are mentioned below. 

Blok kódu
languagejs
titlesmartweb.json
{	
    /* object objektwith sconfiguration konfiguráciouof autentifikácieusers' používateľovauthentication */
	"authentication": {
		"authModes": [
			"AUTH_AUTO_LOGON_IN_SESSION",	// automatickéautomatic prihlásenielogon doto D2000 bezwithout zobrazenia prihlasovacej obrazovkydisplay of a logon dialog box 
  			"AUTH_CREDENTIALS_IN_SESSION",  // autentifikácia mena/hesla kname/password authentication to the D2000 používateľoviuser
			"AUTH_CREDENTIALS_IN_RPC",		// autentifikácia mena/hesla cezname/password authentication through RPC (aplikačneapplicatively definovanýdefined používateliausers)
		 	"AUTH_CERTIFICATE_LOCALLY", 	// certificate autentifikáciaauthentication certifikátuto ka lokálnemulocal keystorukeystore
			"AUTH_CERTIFICATE_REMOTELY",  	// autentifikáciacertificate certifikátuauthentication cezthrough RPC kuto a keystorukeystore spravovanémuadministrated vfrom D2000			
		],

		// D2000 definíciauser D2000definition použivateľafor nacreating vytvoreniea JAPI session
		// only ibafor prethe módmode AUTH_AUTO_LOGON_IN_SESSION aleboor AUTH_CREDENTIALS_IN_RPC
		"authSessionUsername": "D2000UserName",		// používateľskéuser menoname doto D2000 
		"authSessionPassword": "D2000UserPassword", // heslopassword doto D2000 

		// cestapath to kua keystore aand koreňovýroot certifikátcertificate nafor validáciu klientských certifikátovvalidation of clients' certificates
  		// only ibafor prethe módmode AUTH_CERTIFICATE_LOCALLY
		"keystorePath": "C:\cestapath kuto keystore\keystore.jks",
		"caCertificateAlias": "SmartWebUsersCert", 	// alias koreňovéhoroot certifikátucertificate vto keystore.jks,

		// definition definíciaof autentifikačnejauthentication RPC, only for ibaa priturned zapnutomon módemode AUTH_CREDENTIALS_IN_RPC
		"authRpc": {
    		"eventName": "E.SMARTWEB_USER",
			"interfaceName": "I.XXX",
    		"methodName": "authenticate",
			"useJava": "false"
    	},
    	"authRpcParams": [ // poradieparameters order parametrovof volanejcalled autentifikačnejauthentication metódymethod, povinnýcompulsory jeis lenonly the OUT parameter _OK (BOOL);
			"USERNAME",
	        "PASSWORD",
    		"CERTIFICATE",
			"NONE",
    		"_OK"
    	],

		// definition definíciaof logOnlogon RPC metódymethod, volanácalled automatickyautomatically poafter úspešnejsuccessful autentifikácieauthentication, nepovinnýnon-compulsory OUT parameter _OK (BOOL) identifikuje úspešnosť volania logOn metódy identifies calling success rate of the logon method;
    	"logOnRpc": {
	      "eventName": "E.SW_DT_Connect",
		  "interfaceName": "I.XXX",
	      "methodName": "logOn",
		  "useJava": "false"
	    },
    	"logOnRpcParams": [ // poradie parametrov volanej logOn metódy, povinný je lenparameters order of the called logon method, compulsory is only the OUT parameter _OK (BOOL);
	      "USERNAME",
    	  "PASSWORD",
	      "CERTIFICATE",
    	  "NONE",
    		"_OK"
	    ],

    	"logOutRpc": {
	      "eventName": "E.SW_DT_Connect",
		  "interfaceName": "I.XXX",
	      "methodName": "logOff",
		  "useJava": "false"
	    }		
	}	
}

Príklady konfigurácie

...

Examples of the Configuration

Simple authentication through D2000 users

Blok kódu
languagejs
titlesmartweb.json
{	   
	"authentication": {
		"authModes": [
			"AUTH_CREDENTIALS_IN_SESSION"
		]		
	}	
}

Jednoduchá autentifikácia cez aplikačne definovaných používateľov

Simple authentication through applicatively defined users 

In the following configuration, there is also the 'logOn' method registered due to the identification of currently logged on user in the called RPC methodsV nasledujúcej konfigurácii je naviac zaregistrovaná aj "logOn" metóda z dôvodu identifikácie aktuálne prihláseného používateľa vo volaných RPC metódach.

Blok kódu
languagejs
titlesmartweb.json
{
	"authentication": {
		"authModes": [			
			"AUTH_CREDENTIALS_IN_RPC"		 		
		],
		// preddefinovanépredefined username of D2000 user používateľawith swhom ktorýmthere sawill budebe vytváraťa session created
		"authSessionUsername": "D2000UserName",
		// predefined preddefinovanépassword hesloof D2000 používateľauser swith ktorýmwhom sathere budewill vytváraťbe a session created
		"authSessionPassword": "D2000UserPassword", 		

		// definíciadefinition autentifikačnejof RPC authentication
		"authRpc": {
    		"eventName": "E.SW_APPLICATION_AUTH",
    		"methodName": "authenticate"
    	},
    	"authRpcParams": [
			"USERNAME",
	        "PASSWORD",
    		"_OK"
    	],

		// definition definíciaof the logOn RPC metódymethod
    	"logOnRpc": {
	      "eventName": "E.SW_APPLICATION_AUTH",
	      "methodName": "logOn"
	    },
    	"logOnRpcParams": [
	      "USERNAME",
    	  "_OK"	  
	    ]    		
	}	
}

Autentifikácia cez D2000 používateľov a lokálne overovanie klientských certifikátov

Authentication through a D2000 user and a local verification of client certificates

A verification of client certificates takes place locally in the SmartWeb application. All client certificates have to stored in a keystore by the alias identical with the logon name (beware of the case sensitivity). The certificates have to be signed by the root certificate with a name defined in the caCertificateAlias attribute of configuration. For a successful configuration, it is necessary to correctly configure the element authentication in the standalone.xml file of theWildfly application server. It is required to generate the client certificates according to the steps described in the chapter Administration of Client Certificates.Overovanie klientských certifikátov prebieha lokálne v SmartWeb aplikácii. Všetky klientské certifikáty musia byť uložené v keystore pod aliasom identickým s prihlasovacím menom (pozor na case sensitivity) a musia byť podpísané koreňovým certifikátom smenom definovaným v caCertificateAlias atribúte konfigurácie. Pre úspešnú konfiguráciu potrebné správne nakonfigurovať element authentication v súbore standalone.xml aplikačného servera Wildfly. Klientské certifikáty je potrebné generovať podľa postupu popísaného v kapitole Správa klientských certifikátov.

Blok kódu
languagejs
titlesmartweb.json
{	
	"authentication": {
		"authModes": [		
  			"AUTH_CREDENTIALS_IN_SESSION",
		 	"AUTH_CERTIFICATE_LOCALLY"
		],	

		// path cestato kua keystore swith client klientskýmicertificates certifikátmiand a root certificate koreňovýmfor certifikátomvalidation naof validáciuclient klientskýchcertificates certifikátov
		"keystorePath": "C:\cestapath kuto keystore\keystore.jks",
		"caCertificateAlias": "SmartWebUsersCert" 	// alias of koreňovéhothe root certifikátucertificate vin keystore.jks,				
	}	
}

Autentifikácia cez D2000 používateľov a vzdialené overovanie klientských certifikátov

Authentication through a D2000 user and a remote verification of client certificates

A verification of client certificates takes place in D2000 by calling authentication RPC method with a parameter through which there will be the Base64 serialized certificate sent. For a successful configuration, it is necessary to correctly configure the element authentication in the standalone.xml file of the Wildfly application server where the keystore file has to contain a root certificate with which all client certificates are signed. Overovanie klientských certifikátov prebieha v D2000 volaním autentifikačnej RPC metódy s parametrom, cez ktorý sa pošle Base64 serializovaný certifikát.Pre úspešnú konfiguráciu potrebné správne nakonfigurovať element authentication v súbore standalone.xml aplikačného servera Wildfly, kde keystore súbor musí obsahovať koreňový certifikát s ktorým sú podpísané všetky klientské certifikáty.

Blok kódu
languagejs
titlesmartweb.json
{	
    /* objektobject swith konfiguráciou autentifikácie používateľovconfiguration of users' authentication */
	"authentication": {
		"authModes": [			
  			"AUTH_CREDENTIALS_IN_SESSION",  
			"AUTH_CERTIFICATE_REMOTELY"
		],
		
		// definíciadefinition of autentifikačnejauthentication RPC
		"authRpc": {
    		"eventName": "E.SW_APPLICATION_AUTH",
    		"methodName": "authenticate"
    	},
    	"authRpcParams": [
			"USERNAME",
	        "CERTIFICATE",
    		"_OK"
    	]				
	}	
}

Autentifikácia cez aplikačne definovaných používateľov a lokálne overovanie klientských certifikátov

Authentication through applicatively defined users and local verification of client certificates

A verification of client certificates takes place locally in the SmartWeb application. All client certificates have to be stored in a keystore by the alias identical with the logon name (beware of the case sensitivity). The certificates have to be signed by the root certificate with a name defined in the caCertificateAlias attribute of configuration. For a successful configuration, it is necessary to correctly configure the element authentication in the standalone.xml file of theWildfly application server. It is required to generate the client certificates according to the steps described in the chapter Administration of Client Certificates. In the following configuration, there is also the 'logOn' method registered due to the identification of currently logged on user in the called RPC methodsOverovanie klientských certifikátov prebieha lokálne v SmartWeb aplikácii. Všetky klientské certifikáty musia byť uložené v keystore pod aliasom identickým s prihlasovacím menom (pozor na case sensitivity) a musia byť podpísané koreňovým certifikátom smenom definovaným v caCertificateAlias atribúte konfigurácie. Pre úspešnú konfiguráciu potrebné správne nakonfigurovať element authentication v súbore standalone.xml aplikačného servera Wildfly. Klientské certifikáty je potrebné generovať podľa postupu popísaného v kapitole Správa klientských certifikátov. V nasledujúcej konfigurácii je naviac zaregistrovaná aj "logOn" metóda z dôvodu identifikácie aktuálne prihláseného používateľa vo volaných RPC metódach.

Blok kódu
languagejs
titlesmartweb.json
{	
	"authentication": {
		"authModes": [		
  			"AUTH_CREDENTIALS_IN_RPC",
		 	"AUTH_CERTIFICATE_LOCALLY"
		],	

		// preddefinovanépredefined username D2000 používateľa s ktorým sa bude vytvárať sessionof a D2000 user with whom there will be a session created
		"authSessionUsername": "D2000UserName",
		// predefined password preddefinovanéof hesloa D2000 user používateľawith swhom ktorýmthere sawill budebe vytváraťa session created
		"authSessionPassword": "D2000UserPassword",

		// cestapath to kua keystore with sclient klientskýmicertificates certifikátmiand a koreňovým certifikátom na validáciu klientských certifikátovroot certificate for validation of client certificates 
		"keystorePath": "C:\cestapath kuto keystore\keystore.jks",
		"caCertificateAlias": "SmartWebUsersCert", 	// alias of the koreňovéhoroot certifikátucertificate vin keystore.jks,


		// definition definíciaof autentifikačnejauthentication RPC
		"authRpc": {
    		"eventName": "E.SW_APPLICATION_AUTH",
    		"methodName": "authenticate"
    	},
    	"authRpcParams": [
			"USERNAME",
	        "PASSWORD",
    		"_OK"
    	],


		// definition definíciaof the logOn RPC metódymethod
    	"logOnRpc": {
	      "eventName": "E.SW_APPLICATION_AUTH",
	      "methodName": "logOn"
	    },
    	"logOnRpcParams": [
	      "USERNAME",
    	  "_OK"	  
	    ]				
	}	
}

Autentifikácia cez aplikačne definovaných používateľov a vzdialené overovanie klientských certifikátov

Authentication through applicatively defined users and a remote verification of client certificates

A verification of client certificates takes place in D2000 by calling authentication RPC methods with a parameter through which there will be the Base64 serialized certificate sent. For a successful configuration, it is necessary to correctly configure the element authentication in the standalone.xml file of the Wildfly application server where the keystore file has to contain a root certificate with which all client certificates are signed. In the following configuration, there is also the 'logOn' method registered due to the identification of currently logged on user in the called RPC methods.     Overovanie klientských certifikátov prebieha v D2000 volaním autentifikačnej RPC metódy s parametrom, cez ktorý sa pošle Base64 serializovaný certifikát. Pre úspešnú konfiguráciu potrebné správne nakonfigurovať element authentication v súbore standalone.xml aplikačného servera Wildfly, kde keystore súbor musí obsahovať koreňový certifikát s ktorým sú podpísané všetky klientské certifikáty. V nasledujúcej konfigurácii je naviac zaregistrovaná aj "logOn" metóda z dôvodu identifikácie aktuálne prihláseného používateľa vo volaných RPC metódach.

Blok kódu
languagejs
titlesmartweb.json
{	
    /* object with objekta sconfiguration konfiguráciouof autentifikácieusers' používateľovauthentication */
	"authentication": {
		"authModes": [			
  			"AUTH_CREDENTIALS_IN_RPC",  
			"AUTH_CERTIFICATE_REMOTELY"
		],


		// preddefinovanépredefined username of a D2000 používateľauser with swhom ktorýmthere sawill budebe vytváraťa session created
		"authSessionUsername": "D2000UserName",
		// preddefinované heslopredefined password of a  D2000 user používateľawith swhom ktorýmthere sawill budebe vytváraťa session created
		"authSessionPassword": "D2000UserPassword",
		
		// definíciadefinition of autentifikačnejauthentication RPC
		"authRpc": {
    		"eventName": "E.SW_APPLICATION_AUTH",
    		"methodName": "authenticate"
    	},
    	"authRpcParams": [
			"USERNAME",
			"PASSWORD",
	        "CERTIFICATE",
    		"_OK"
    	],


		// definíciadefinition of the logOn RPC metódymethod
    	"logOnRpc": {
	      "eventName": "E.SW_APPLICATION_AUTH",
	      "methodName": "logOn"
	    },
    	"logOnRpcParams": [
	      "USERNAME",
    	  "_OK"	  
	    ]				
	}	
}

...

Automatic authentication through a predefined D2000 user without a logon dialog box

Blok kódu
languagejs
titlesmartweb.json
{
	"authentication": {
		"authModes": [			
			"AUTH_AUTO_LOGON_IN_SESSION"		 		
		],
		// preddefinovanépredefined username of a D2000 používateľauser with swhom ktorýmthere sawill budebe vytváraťa session created
		"authSessionUsername": "D2000UserName",
		// predefined preddefinovanépassword of hesloa D2000 používateľauser with swhom ktorýmthere sawill budebe vytváraťa session created
		"authSessionPassword": "D2000UserPassword" 						
	}	
}

...