ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Data structure

Entities (tables)

Authentication factors

This entity defines authentication factors entity information structure:

ColumnTypePurpose
iduuid
user_iduuidUser FK 
typevarchar
factorvarcharFactor value
is_activeboolean
inserted_attimestamp
updateed_attimestamp

additional constraint: create unique index (user_id, type)

where factor is string which depends on factor type, examples:

typefactor 

SMS

"+380677778899"
PHONE"+380677778899"
EMAIL"pupkin.vasya@gmail.com"

Change User entity

  • We need store for user 3 attribute:
    • count logins fail
    • count 2FA fail
    • block status of user
  • Propose store counters parameters for 2FA in `users.priv_settings` as structure :

    {
        "login_error_counter": 0,
        "otp_error_counter": 0
    }
  • Propose store information about blocked directly in entity `users`.
    New columns:

    ColumnTypePurpose
    is_blockedboolean
    block_reasonvarchar (255), NULL

Сonstraints

  • user have one active 2FA factor ( one of any type)
  • unique index for `authentication_factors` on user_id+type
  • No labels