Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
Data structure

...

This entity defines authentication factors entity information structure:


ColumnTypeM/OPurpose
iduuidM
user_iduuidMUser FK 
typevarcharM
factorvarcharOFactor value
is_activebooleanM
inserted_attimestampM
updateed_attimestampM


...

  • Store counters parameters for 2FA in `users.priv_settings` as structure :


    {
        "login_error_counter": 0,
        "otp_error_counter": 0
    }


  • Information about blocked directly in entity `users`. 


    ColumnTypePurpose
    is_blockedboolean
    block_reasonvarchar (255), NULL


OTP 

This entity defines OTP (one tome passwords) entity information structure:

ColumnTypeM/OPurpose
iduuidM
keyvarcharMValue of factor (1 active 2FA for user) 
codevarcharMValue of OTP
statusvarcharMStatus (Dictionary: OTP_STATUS)
code_expired_attimestampMTimestamp which OTP expired (now() + param from config)
attempts_countintegerOCount of trying OTP authorization process
updateed_attimestampM

OTP states 

  • Dictionary: `OTP_STATUS`


    ValuePurpose
    NEWInitial status for newest OTP item. Ready to use in OTP verification process.
    VERIFIEDStatus for successful OTP verification process
    UNVERIFIEDStatus for unsuccessful OTP verification process
    EXPIREDExpired after OTP lifetime.
    CANCELED

    Status for manual admin action.


  • Status Chart for OTP
    Image Added
  • Transitions


    From
    Transition
    Result

    Created new OTPstatus = NEW
    status = NEWSuccseful OTP verifystatus = VERIFIED
    status = NEWUnsuccseful OTP verify afterexcess of count [param: OTP_ERROR_MAX] status = UNVERIFIED
    status = NEW[AUTO] Termination process after end of life-time OTP [param: OTP_LIFETIME]status = EXPIRED
    status = NEWAll OTP by `key` in status=`NEW` before creating new OTPstatus = CANCELED


Сonstraints

Authentication factors

...