WL#6960: Refactoring auth code: milestone 1, new physical file structure
Affects: Server-Prototype Only
—
Status: Complete
This work is simplifying existing code maintenance by splitting the large file sql_acl.cc into smaller files group on logical operations. No functional changes are introduced. This work is about changing the physical file structure preparing for better modularization and extensibility.
1. New Files added ================== To ease further maintenance and feature development the existing auth code is reorganized into smaller files. A new sub directory sql/auth will be created and the following new files will be introduced: 1.1. auth_common.h This file is the umbrella for all authentication- and authorization code and presents the public APIs to the rest of the source code. 1.2. password.c Legacy password related functions and authentication helpers 1.3. sql_authentication.cc Code related to authentication. For example acl_authenticate(), parse_client_handshake_packet(), native_password_authenticate() etc. 1.4. sql_authentication.h Lists all authentication interfaces 1.5. sql_authorization.cc Code related to authorization. For example mysql_grant(), mysql_table_grant(), mysql_revoke_all(), mysql_routine_grant() 1.6. sql_authorization.h Lists all authorization interfaces 1.7. sql_user_cache.cc Code related to user, proxy, roles and db caches. For example: acl_get(), acl_inser_db() 1.8. sql_user_cache.h Lists all cache interfaces 1.9. sql_user.cc Sql_user_implementation 1.10. sql_user.h Sql_user, Sql_user_role interfaces 1.11 sql_user_table.cc Code related to user and ACL storage. For example: replace_table_column_priv(), replace_proxies_priv_table() etc 1.12 sql_user_table.h Lists mysql-db table APIs 1.13 auth_internal.h This file contains the necessary definitions which enables integration of the internal APIs in the sql/auth directory. 1.14 Moving auth code When refactoring is complete, sql/sql_acl.cc might become empty and removed. Authentication and authorization code which reside in mysqld.cc will be moved to corresponding file in sql/auth
Copyright (c) 2000, 2024, Oracle Corporation and/or its affiliates. All rights reserved.