This pull release introduces several important updates across the codebase, primarily focused on improving authentication mechanisms, enhancing the CMDB mode and host model, and refining Ansible inventory handling. The changes also include general code cleanup and documentation improvements.
Authentication and API Changes:
Replaced the x-login-header authentication header with x-login-user, updating all relevant API endpoints, documentation, and security definitions for consistency and clarity. The authentication logic now uses the User model and checks the password with check_password. [[1]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-e6720453fc4b0e74ea6fc341e1c8780da6d918f00807610f1c791d8de26a7d25R7-R24) [[2]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-34a0e37e357ff23f2a4807276f25459b957a5a3331fc3275aa1cadf28a386a36L27-R37) [[3]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-34a0e37e357ff23f2a4807276f25459b957a5a3331fc3275aa1cadf28a386a36L47-R48)
CMDB Mode and Host Model Enhancements:
Added support for CMDB mode in configuration (CMDB_MODE and CMDB_MODELS), and extended the Host model with new fields (cmdb_fields, cmdb_template, last_import_id). Introduced the CmdbField embedded document for flexible field storage. [[1]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-556ffb367cabead355f9000bec3b8d09405a54e33e3349892ecb6a777db90825R113-R114) [[2]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-556ffb367cabead355f9000bec3b8d09405a54e33e3349892ecb6a777db90825R123-R138) [[3]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-16c58a535854a27f7cc607a43cb9b08b8a805a427981a094ecaa1cf0889adfafL23-R31) [[4]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-16c58a535854a27f7cc607a43cb9b08b8a805a427981a094ecaa1cf0889adfafL40-R46) [[5]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-16c58a535854a27f7cc607a43cb9b08b8a805a427981a094ecaa1cf0889adfafL53-R64)
Improved host import and cleanup logic with the new delete_host_not_found_on_import static method and additional inventory attribute handling. Updated set_account to respect CMDB mode and use the new import ID. [[1]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-16c58a535854a27f7cc607a43cb9b08b8a805a427981a094ecaa1cf0889adfafR88-R116) [[2]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-16c58a535854a27f7cc607a43cb9b08b8a805a427981a094ecaa1cf0889adfafL342-R397) [[3]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-16c58a535854a27f7cc607a43cb9b08b8a805a427981a094ecaa1cf0889adfafR411-R413) [[4]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-16c58a535854a27f7cc607a43cb9b08b8a805a427981a094ecaa1cf0889adfafR436-L381)
Account Model and Types Improvements:
Expanded the list of supported account types and added a template type for CMDB labels. Refactored the Account model to use type instead of typ, providing backward compatibility via a property. [[1]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-ca5b141626287331063637b809556852358a35b296a3286f66cd475cf0ac8ba5R11-R33) [[2]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-ca5b141626287331063637b809556852358a35b296a3286f66cd475cf0ac8ba5R55) [[3]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-ca5b141626287331063637b809556852358a35b296a3286f66cd475cf0ac8ba5L72-R117)
Ansible Inventory and Playbook Updates:
Updated Ansible inventory scripts: replaced the old inventory script with a documentation note, and added a new inventory_single script for faster host-specific inventory generation. Fixed a typo in the cleanup playbook to enable tasks. [[1]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-6ef150b198b9cf49c007d9e098710ed083fac123177df92c443fefd84ad32560L1-R1) [[2]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-cee9ed78e4992a6f026428583fcf02ff7b486e20d2e195bf435d5117097d72a2R1-R28) [[3]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-f4f017cf8b44d51741a832a6d6b482586ceea9e710f2036817fad842b884c0f2L7-R7)
General Codebase Cleanup and Documentation:
Improved documentation and code comments in models and configuration files. Removed unused imports and updated versioning in application/__init__.py. [[1]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-1b4edbe81db1496f2c1e16e23959787445b422d14cfd34bb07682643cc1ce459L10-L13) [[2]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-1b4edbe81db1496f2c1e16e23959787445b422d14cfd34bb07682643cc1ce459L23-L34) [[3]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-de7ec3042dd5439c0ee22413010ab35deae91ab8e1e95d0503bd59d82c98ed75L8-R8) [[4]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-de7ec3042dd5439c0ee22413010ab35deae91ab8e1e95d0503bd59d82c98ed75L59-R59) [[5]](https://github.com/kuhn-ruess/cmdbsyncer/pull/71/files#diff-ade8f5ff16323b428edb6463ffb52d56822294039615645ed370b51dce380cc0L12)
These changes collectively improve security, maintainability, and flexibility for both API consumers and internal data management.