- All 16 columns per spec (user, attempted_login, result, failure_reason, event_time, ip/geo fields, user_agent triple, device_type, database). - Check constraint binds failure_reason presence to result value. - Three composite indexes (user+time, login+time, geo_state+time) supporting the per-user, failure-burst, and geo cron queries. - Minimal admin-read ACL added so subsequent tests can verify writes. - 3 TransactionCase tests passing: model create, failure_reason nullable on success, geo_lookup_state='internal' accepted. Odoo 19 deprecation note: this implementation uses the declarative models.Constraint and models.Index attributes (Odoo 19 silently drops the legacy `_sql_constraints = [...]` list and `init()`/raw-SQL pattern with only a warning). Captured in CLAUDE.md rule #9. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
30 lines
978 B
Python
30 lines
978 B
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2026 Nexa Systems Inc.
|
|
# License OPL-1 (Odoo Proprietary License v1.0)
|
|
{
|
|
'name': 'Fusion Login Audit',
|
|
'version': '19.0.1.0.0',
|
|
'category': 'Tools',
|
|
'summary': 'Durable login audit log with geo-enrichment, retention, and failure alerts.',
|
|
'description': """
|
|
Fusion Login Audit
|
|
==================
|
|
|
|
Captures every password authentication event (success + failure) in a
|
|
dedicated, append-only audit table. Surfaces history on the user form
|
|
as a smart button + tab (admins only). Async-enriches IPs with country,
|
|
city, and reverse DNS. Emails Settings admins on consecutive-failure
|
|
bursts. Daily retention cron honours a configurable horizon.
|
|
""",
|
|
'author': 'Nexa Systems Inc.',
|
|
'website': 'https://nexasystems.ca',
|
|
'license': 'OPL-1',
|
|
'depends': ['base', 'mail'],
|
|
'data': [
|
|
'security/ir.model.access.csv',
|
|
],
|
|
'installable': True,
|
|
'application': False,
|
|
'auto_install': False,
|
|
}
|