Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Define `User` config model Define `AccessRoles` enum Define exceptions for user existence errors Define database ABC with documented methods * Implement SQLite backend with unit tests * Start model unit test coverage * Update default user values to use factory methods Add models module test coverage * Add Python packaging * Add GHA Automation * Update Python versions in unit tests Remove invalid Docker test automation Fix typo in unit test package installation * Reformat unit test file Fix check for existing username/user_id Move user conflict check to internal method in base class * Specify configured DoB to use a date object with unit test coverage * Define AccessRoles usage in docstring with unit test coverage * Refactor `UserNotFoundError` exception name to math File errors * Add `read_user` convenience method to `UserDatabase` base class Implement minimal `service.py` with default configuration and ovos-config configuration handling Document configuration structure * Add exception if UsersService does not have a valid database configuration Add `create_user` method with added check for input passwords being hashed with unit tests * Add default config to package data Implement `authenticate_user` method with unit test coverage and an AuthenticationError * Troubleshooting missing package_data * Remove `max-parallel` limit from unit test automation * Add locking around database operations Add separate method for reading user entries without authentication data Add helpers for update/delete operations that perform some degree of input validation Add unit test coverage for changes * Add unit test coverage for `delete_user` * Handle hashing of changed passwords in `update_user` Update exception in `delete_user` to be more specific * Add MQ request model for input validation * Update tests to reflect behavior changes * Fix and annotate delete_user tests * Define `mq_connector` module and document MQ API in README.md * Implement Docker container for MQ service * Add dockerfile * Update SQLite to allow threaded access for MQ compat. Update `TokenConfig` to match/extend existing config used in neon-hana Update MQ error handling to return HTTP codes for HANA integration * Update PermissionsConfig to dump to int for JSON serialization Accept `access_token` in `MQRequest` model as an alternate auth method * Refactor to import models from neon_data_models package * Update imports in tests to new module * Fix missed import change * Refactor to move common logic to the base class * Add MongoDb database class with unit tests Implement unit test automation with config from GHA secrets * Update dependencies for mongodb * Update MongoDb tests to support parallel runs Remove created test collections after unit test run * Add service support for MongoDB Update Dockerfile to include MongoDB dependency * Update Docker default config to include sqlite database Prevent update requests from modifying users without validating a token or password Prevent update requests from allowing an escalation of privileges * Add and implement a specific PermissionsError exception Refactor MQ handling to parse specific request models for UserDB CRUD * Update token auth handling to use HanaToken model instead of encoded string * Refactor permissions checks to match changes made to neon-data-models * Refactor to remove `RW_USERS` role since the `USER` and `ADMIN` roles already define read and write access, respectively * Refactor imports to troubleshoot circular import exception noted in https://github.com/NeonGeckoCom/neon-users-service/actions/runs/11923606971/job/33232317854?pr=1 * Remove Python 3.8 from unit test coverage * Update `neon-data-models` dependency spec Resolve syntax warnings in Dockerfile * Apply GNU Affero license * Add license note to README.md * Add link to GNU Affero description in README text
- Loading branch information