Skip to content
Viktor Filinkov edited this page Feb 18, 2017 · 14 revisions

Welcome to the SMMA wiki!

SMMA is an authentication system.

Services

All authentication tries are recorded. What do we store:

  • Connection timestamp;
  • API key used to connect;
  • Status with which connection was closed;
  • Service requested for authentication;
  • Preformed services: if data failed in one of steps it will be counted off;
  • Stored data ID.

Storage

First and basic service we provide. All data stored on our protected servers encrypted and there is no way even you can get it back: we will share it only with a court. One restriction: data you send must not be greater than 1MiB.

Hash

We may take SHA256 as data ID, otherwise random IDs are used. This service can not provoke auth denial.

Face detection

Incoming data is analyzed by computer vision system, deciding is any faces in it. Data requirements for this service:

  1. At least three frames.

  2. At least one face with two eyes detected.

  3. ⅓ of frames must be with faces with, at least, one eye.

In all other cases this service will provoke authentication denial.

Mask detection (not yet implemented)

Service to distinguish is it real face or just mask/printed face.

Face identification (not yet implemented)

First videos used to form person figure. All incoming video analyzed to identify persons on it. Only one person can be authenticated with this service for each API key.

How can I use SMMA in my project?

Frontend

On the client you should record the video and send it to SMMA server using WebSocket, then our server will close connection with one of WebSocket Close Codes: 1000 for 'all okay' and '1008' if one of internal services triggered.

Test WebApp

WebApp must work either on desktop or mobile.

Example

Backend

To identify your client and allow them interaction with our servers we provide API-keys mechanism. To get it, you must be able to open WebSocket connection on backend, send and receive JSON describing what you want.

Most common case: to get new API key as you user registered.

{
    "key" : "your-client-api-key",
    "operation" : "add",
    "count" : 1,
    "service" : 0
}

Field description:

  • key — this is key, that allows you to perform such operations, 32 characters length;
  • operation — describes operation you want to perform;
  • count — this field related to add operation, describing how many keys we want to generate;
  • service — for the keys encoded as bit fields. 0 is for default service (which is set for your account).

Possible answer will look like that:

[ "smma-XopNe1oLIzG8FfA0iTwA7ixR" ]

This is an array with one element: API key that you can use to authentication.

Other operations

list

Get list of all keys related to your account.

change

Change service for keys. Required fields:

  • key — an array with API keys to modify;
  • service — new service.

enable

You can disable authentication for API keys. Required fields:

  • key — an array with API keys to modify;
  • enable — status to set.

self-manage

You can change default status or enable/disable your account. You can't use 0 as service.

How to code desired service?

var SMMAService = {
    STORE: 0x01,
    HASH: 0x02,
    FACE_DETECTION: 0x04,
    MASK_DETECTION: 0x08,
    FACE_IDENTIFICATION: 0x10,
};

// So, for example, if we want STORE and FACE_DETECTION services
// resulting service will look like:
let desired_service = SMMAService.STORE | SMMAService.FACE_DETECTION;

console.log(desired_service);

Example