MySQL 8.3.0
Source Code Documentation
HttpAuthBackendMetadataCache Class Reference

Authentication backend based on the information stored in the metadata. More...

#include <http_auth_backend_metadata_cache.h>

Inheritance diagram for HttpAuthBackendMetadataCache:
[legend]

Public Member Functions

std::error_code authenticate (const std::string &username, const std::string &authdata) override
 validate user and authdata against backend. More...
 
std::error_code authorize (const rapidjson::Document &privileges)
 Check user privileges and perform authorization. More...
 
- Public Member Functions inherited from HttpAuthBackend
 HttpAuthBackend ()=default
 
 HttpAuthBackend (const HttpAuthBackend &)=default
 
 HttpAuthBackend (HttpAuthBackend &&)=default
 
HttpAuthBackendoperator= (const HttpAuthBackend &)=default
 
HttpAuthBackendoperator= (HttpAuthBackend &&)=default
 
virtual ~HttpAuthBackend ()=0
 destructor. More...
 

Detailed Description

Authentication backend based on the information stored in the metadata.

Authentication is based on the credentials stored in the 'router_rest_accounts' table. Password hashes are stored according to the following pattern: $<id>$<rounds>$<salt>$<hash> Where: id - set to "A", only caching_sha2_password is supported currently rounds - three digits number containing hashing rounds divided by 1000 salt - password salt, length 20 hash - password hash

Member Function Documentation

◆ authenticate()

std::error_code HttpAuthBackendMetadataCache::authenticate ( const std::string &  username,
const std::string &  authdata 
)
overridevirtual

validate user and authdata against backend.

Returns
error
Return values
falseno authentication error

Implements HttpAuthBackend.

◆ authorize()

std::error_code HttpAuthBackendMetadataCache::authorize ( const rapidjson::Document &  privileges)

Check user privileges and perform authorization.

Empty privileges document means 'all privileges'.

Parameters
[in]privileges- JSON document containing user privileges.
Returns
error
Return values
falseno authorization error

The documentation for this class was generated from the following files: