ores.accounts Protocol Reference

Table of Contents

Protocol messages for the Accounts subsystem (0x2000-0x2FFF).

See Protocol Reference for the complete protocol documentation.

Messages Overview

ID Name Description
0x2001 create_account_request Request to create a new account.
0x2002 create_account_response Response containing the created account ID.
0x2003 list_accounts_request Request to retrieve accounts with pagination suppo…
0x2004 list_accounts_response Response containing accounts with pagination metad…
0x2005 login_request Request to authenticate a user.
0x2006 login_response Response containing authentication result and acco…
0x2007 unlock_account_request Request to unlock a locked account. Requires admi…
0x2008 unlock_account_response Response indicating whether unlock operation succe…
0x2009 delete_account_request Request to delete an account.
0x200A delete_account_response Response confirming account deletion.
0x200B list_login_info_request Request to retrieve all login info records.
0x200C list_login_info_response Response containing all login info records.
0x200D logout_request Request to logout the current user. The server wi…
0x200E logout_response Response indicating logout result.
0x200F create_initial_admin_request Request to create the initial administrator accoun…
0x2010 create_initial_admin_response Response from creating the initial administrator a…
0x2011 bootstrap_status_request Request to check the bootstrap mode status. This …
0x2012 bootstrap_status_response Response containing the bootstrap mode status.
0x2013 lock_account_request Request to lock an account. Requires admin privil…
0x2014 lock_account_response Response indicating whether lock operation succeed…

Message Details

create_account_request (0x2001)

Request to create a new account.

Fields

Field Type Description
username std::string  
password std::string  
totp_secret std::string  
email std::string  
modified_by std::string  
is_admin bool  

Wire Format

  • 2 bytes: username length
  • N bytes: username (UTF-8)
  • 2 bytes: password length
  • N bytes: password (UTF-8)
  • 2 bytes: totp_secret length
  • N bytes: totp_secret (UTF-8)
  • 2 bytes: email length
  • N bytes: email (UTF-8)
  • 2 bytes: modified_by length
  • N bytes: modified_by (UTF-8)
  • 1 byte: is_admin (boolean)

create_account_response (0x2002)

Response containing the created account ID.

Fields

Field Type Description
account_id boost::uuids::uuid  

Wire Format

  • 16 bytes: account_id (UUID)

list_accounts_request (0x2003)

Request to retrieve accounts with pagination support. Supports pagination through offset and limit parameters.

Fields

Field Type Description
offset std::uint32_t Number of records to skip (0-based)
limit std::uint32_t Maximum number of records to return

Wire Format

  • 4 bytes: offset (uint32_t)
  • 4 bytes: limit (uint32_t)

list_accounts_response (0x2004)

Response containing accounts with pagination metadata.

Fields

Field Type Description
accounts std::vector<domain::account>  
total_available_count std::uint32_t Total number of accounts available (not just in this page)

Wire Format

  • 4 bytes: total_available_count (uint32_t)
  • 4 bytes: count (number of accounts in this response)
  • For each account:
  • 4 bytes: version
  • 2 bytes: modified_by length
  • N bytes: modified_by (UTF-8)
  • 16 bytes: id (UUID)
  • 2 bytes: username length
  • N bytes: username (UTF-8)
  • 2 bytes: password_hash length
  • N bytes: password_hash (UTF-8)
  • 2 bytes: password_salt length
  • N bytes: password_salt (UTF-8)
  • 2 bytes: totp_secret length
  • N bytes: totp_secret (UTF-8)
  • 2 bytes: email length
  • N bytes: email (UTF-8)
  • 1 byte: is_admin (boolean)

login_request (0x2005)

Request to authenticate a user.

Fields

Field Type Description
username std::string  
password std::string  

Wire Format

  • 2 bytes: username length
  • N bytes: username (UTF-8)
  • 2 bytes: password length
  • N bytes: password (UTF-8)

login_response (0x2006)

Response containing authentication result and account information.

Fields

Field Type Description
success bool  
error_message std::string  
account_id boost::uuids::uuid  
username std::string  
is_admin bool  

Wire Format

  • 1 byte: success (boolean)
  • 2 bytes: error_message length
  • N bytes: error_message (UTF-8)
  • 16 bytes: account_id (UUID)
  • 2 bytes: username length
  • N bytes: username (UTF-8)
  • 1 byte: is_admin (boolean)

unlock_account_request (0x2007)

Request to unlock a locked account. Requires admin privileges - the server verifies the requester's identity from the session context.

Fields

Field Type Description
account_id boost::uuids::uuid  

Wire Format

  • 16 bytes: account_id (UUID)

unlock_account_response (0x2008)

Response indicating whether unlock operation succeeded.

Fields

Field Type Description
success bool  
error_message std::string  

Wire Format

  • 1 byte: success (boolean)
  • 2 bytes: error_message length
  • N bytes: error_message (UTF-8)

delete_account_request (0x2009)

Request to delete an account.

Fields

Field Type Description
account_id boost::uuids::uuid  

Wire Format

  • 16 bytes: account_id (UUID)

delete_account_response (0x200A)

Response confirming account deletion.

Fields

Field Type Description
success bool  
message std::string  

Wire Format

  • 1 byte: success (boolean)
  • 2 bytes: message length
  • N bytes: message (UTF-8)

list_login_info_request (0x200B)

Request to retrieve all login info records.

list_login_info_response (0x200C)

Response containing all login info records.

Fields

Field Type Description
login_infos std::vector<domain::login_info>  

logout_request (0x200D)

Request to logout the current user. The server will set login_info.online to false for the specified account and close the connection after sending the response.

Fields

Field Type Description
account_id boost::uuids::uuid  

Wire Format

  • 16 bytes: account_id (UUID)

logout_response (0x200E)

Response indicating logout result.

Fields

Field Type Description
success bool  
message std::string  

Wire Format

  • 1 byte: success (boolean)
  • 2 bytes: message length
  • N bytes: message (UTF-8)

create_initial_admin_request (0x200F)

Request to create the initial administrator account. This endpoint is only available during bootstrap mode (when no admin accounts exist). It must be called from localhost only.

Fields

Field Type Description
username std::string  
password std::string  
email std::string  

Wire Format

  • 2 bytes: username length
  • N bytes: username (UTF-8)
  • 2 bytes: password length
  • N bytes: password (UTF-8)
  • 2 bytes: email length
  • N bytes: email (UTF-8)

create_initial_admin_response (0x2010)

Response from creating the initial administrator account.

Fields

Field Type Description
success bool  
error_message std::string  
account_id boost::uuids::uuid  

Wire Format

  • 1 byte: success (boolean)
  • 2 bytes: error_message length
  • N bytes: error_message (UTF-8)
  • 16 bytes: account_id (UUID)

bootstrap_status_request (0x2011)

Request to check the bootstrap mode status. This endpoint is always available and returns whether the system is in bootstrap mode (waiting for initial admin) or secure mode (admin exists).

bootstrap_status_response (0x2012)

Response containing the bootstrap mode status.

Fields

Field Type Description
is_in_bootstrap_mode bool  
message std::string  

Wire Format

  • 1 byte: is_in_bootstrap_mode (boolean)
  • 2 bytes: message length
  • N bytes: message (UTF-8)

lock_account_request (0x2013)

Request to lock an account. Requires admin privileges - the server verifies the requester's identity from the session context.

Fields

Field Type Description
account_id boost::uuids::uuid  

Wire Format

  • 16 bytes: account_id (UUID)

lock_account_response (0x2014)

Response indicating whether lock operation succeeded.

Fields

Field Type Description
success bool  
error_message std::string  

Wire Format

  • 1 byte: success (boolean)
  • 2 bytes: error_message length
  • N bytes: error_message (UTF-8)