> For the complete documentation index, see [llms.txt](https://docs.openg2p.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openg2p.org/products/pbms/_archive/previous-generation/developer-zone/odoo-modules/g2p-registry-security.md).

# G2P Registry: Security

This module enhances the security of the OpenG2P application.

### Module name

`g2p_security`

### Module title

G2P Registry: Security

### Technology base

[Odoo](https://www.odoo.com/)

**Functionality**

**Session Timeout Management**

* **Automatic User Logout**: Monitors user session activity and automatically logs out inactive users
* **Configurable Timeout**: Session timeout duration can be configured via system parameters
* **Activity Tracking**: Updates session timestamps on active HTTP requests to track user activity
* **Session Expiration Check**: Compares last activity time with current time to determine if session has expired
* **Graceful Logout**: Properly terminates expired sessions while preserving database connection

**Session Timeout Control**

* **Enable/Disable Feature**: Session timeout can be activated or deactivated via configuration
* **Real-time Configuration**: Changes to session timeout settings immediately clear cache for instant application

**Debug Mode Restriction**

* Restricts access to Debug Mode for users by "Restrict Debug Mode" group

**Database Parameter Removal from Signup URLs**

* Removes the `db` parameter from generated signup URLs for enhanced security

**Dependencies**

**Module dependencies**

* base
* auth\_signup

**Configuration**

**Session Timeout Parameters**

**Timeout Duration**

* **Parameter Key**: `inactive_session_timeout_seconds`
* **Default Value**: `7200` seconds (2 hours)
* **Description**: Sets the duration of inactivity before a session expires

**Timeout Activation**

* **Parameter Key**: `inactive_session_timeout_active`
* **Default Value**: `False`
* **Description**: Enables or disables the session timeout feature
* **Values**:
  * `"True"` - Session timeout is active
  * `"False"` - Session timeout is disabled

**Hide DB in URLs (Optional)**

* **Parameter Key**: `g2p_security.hide_db_param`
* **Set to**: `"True"` to remove the `db` parameter from generated signup URLs
* **Default**: `"True"`

**Source code** <https://github.com/OpenG2P/openg2p-registry/tree/17.0-develop/g2p_security>

**Installation**

* Install the "G2P Registry: Security" module from the Odoo Apps interface.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openg2p.org/products/pbms/_archive/previous-generation/developer-zone/odoo-modules/g2p-registry-security.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
