\certifio-manager API documentation version \1.1.0
https://certifio.notariuslocal.com
Introduction
CertifiO Manager is your one-stop shop access to your digital signature, providing a near-zero footprint client side signature experience. Traditionnaly, client-side signature through a web page was based on Java Applets, but these are being phased out by all major browser vendors. As of today, Internet Explorer and Safari are the only browsers supporting them.
Installation
CertifiO Manager is a simple desktop application which acts as an access point to a digital signature. It executes a local web server which processes requests coming from a web site.
Installation details
- Installation path: %APPDATA%\Notarius\certifio-manager
- Logs: %APPDATA%\Notarius\log\certifio-manager
- Local listening port: 24250
- Startup exe: %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\certifio-manager.exe
Requirements
Operating Systems
- Windows 8 or 10, version 64-bits
- OSX 10.10 or later
CPU/RAM
- Modern CPU
- 128MB RAM
Browsers
- Microsoft Edge
- Google Chrome
- Mozilla Firefox
- Internet Explorer 11
- Safari
User Mode
By default, the installation/update process gets triggered at the moment a function is called on CertifiO Manager. The user will be invited to download and execute the installation/update package. The package does not require administrative privileges.
Enterprise Mode
Some organizations have specific requirements regarding software installation/execution. For example, restrictions regarding executing software packages downloaded from the web, or restrictions regarding external accesses to remote systems. In these cases, CertifiO Manager can be deployed throughout the organization by following the procedure described below:
Silent install
CertifiO Manager can be installed silently by running the following command:
certifio-manager.exe /S
Configuration
CertifiO Manager addresses a lot of potential organization-specific restrictions by allowing the default behavior to be altered using environment variables:
Environment variable | Description |
---|---|
NTS_PROXY_HOST | Internal proxy host name / IP address. For example, *proxy.mybiz.com* |
NTS_PROXY_PORT | Proxy port. For example: 80 |
NTS_NON_PROXY_HOSTS | Exclusion list, separated by pipes. For example, \*.noproxy.notarius.com|127.0.0.\* |
CFM_LICENSE | Use a specific license. Allows use of a test license with test domain authorizations. |
CFM_AUTOUPDATE | Default to true. If false, the update process will be disabled. Used by organisations which disallow execution of EXE from the web. |
Integration
Integrating CertifiO Manager into an existing web application is as simple as sourcing the following javascript file:
- certifio-manager.js
The functions documented in Javascript API section will afterward be available to the application. CertifiO Manager also have the following dependencies:
- JQuery (If not already available)
- Twitter Bootstrap (If not already available)
- JS Source: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js
An example integration is available here: https://notarius.com/cf-test/
Javascript API
The Javascript API provides the most simple way to integrate CertifiO Manager to a web application. It hides the low-level details and handles installation and updates.
Constructor | Description |
---|---|
CertifioManager(lang:string) | Creates a new CertifioManager instance using the specified language (en or fr). Will try to communicate with a running instance of CertifiO Manager and triggers the installation/update process if needed. |
Methods | Description |
---|---|
getCertificates(success:func, failure:func) | Return value: Array of available certificates (Certificate class) in the success callback. |
sign(req:SignRequest, success:func, failure:func) | Return value: Signature result in success callback. Result is a Base64-encoded string whose value depends on SignRequest.type specified. |
Properties | Description |
---|---|
deviceId | Type: string. Unique reference to this certificate. |
cn | Type: string. The Common Name (CN part of DN). |
dn | Type: string. The Distinguished Name. |
org | Type: string. The Organization Name (The O part of DN). |
displayName | Type: string. A human friendly name. Format is: CN (ORG). For example, John Doe (OIQ). |
encodedForm | Type: string. A base-64 encoded representation of the X.509 Certificate. To create a .cer file to be used in conjonction with ConsignO Server, you should add to the resulting string: 1.- At the beginning, this text: -----BEGIN CERTIFICATE----- 2.- To the end, this text: -----END CERTIFICATE----- |
Properties | Description |
---|---|
deviceId | Type: string. Unique reference to the signing certificate. |
type | Type: string. The signature type. One of:
|
data | Type: string. Data To Be Signed. |
Examples
Listing the available certificates
var mgr = new CertifioManager("en");
mgr.getCertificates(
function(certs){
$.each(certs, function (i, cert) {
//fill select box with certificate display name
$('#certificates').append($('<option>', {
value: cert.deviceId,
text : cert.displayName)
}));
});
},
function(resp) {
console.error(resp);
}
);
Authentication
Authentication based on a digital signature is essentially a signature over a random value known only by the server. The signature result is sent back to the server, which will verify the signature and log in the digital signature owner.
var req = {
//seleted certificate device id
deviceId: $('#certificates').val(),
type: "ENVELOPED",
data: "myrandomvalueonlyknownbyserver"
}
mgr.sign(req,
function(data){
//submit data to server
},
function(resp){
console.error(resp);
}
);
Signing the web page content
var req = {
//seleted certificate device id
deviceId: $('#certificates').val(),
type: "ENVELOPED",
data: $('html').html();
}
mgr.sign(req,
function(data){
//submit data to server
},
function(resp){
console.error(resp);
}
);
Signing a PDF file
Refer to CSA documentation, functions prepareExtSignPDF and finalizeExtSignPDF.
//the method below should submit selected certificate to server for external signature preparation by CSA
var dataToBeSigned = prepareSig(selectedCert.encodedForm);
//do the actual signing using type PKCS1.5
var req = {
//seleted certificate device id. Must match the certificate selected during signature preparation
deviceId: selectedCert.deviceId,
type: "PKCS1.5",
data: dataToBeSigned;
}
mgr.signatures(req,
function(data){
//the method below should submit data to server for signature finalization by CSA
finalizeSig(data);
},
function(resp){
console.error(resp);
}
);
API resources
- URI: http://127.0.0.1:24250/api/v1
- Version: V1
In the current version, the following resources are available:
/certs
/signatures
Signature result in success callback. Result is a Base64-encoded string whose value depends on SignRequest.type specified.