---
title: "1Password collector"
canonical: "https://docs.devo.com/space/latest/326893597/1Password%20collector"
format: markdown
---
> Macro (toc)

## Overview

With 1Password Collector, you can send your account activity to Devo using the 1Password Events Reporting API. This API can report 1Password activity like sign-in attempts, item usage, and audit events.

## Devo collector features

| **Feature** | **Details** |
| --- | --- |
| Allow parallel downloading (`multipod`) | `not allowed` |
| Running environments | - `collector server`
- `on premise` |
| Populated Devo events | `table` |
| Flattening pre-processing | `no` |
| Allowed source events obfuscation | `yes` |

## Data sources

| **Data source** | **Description** | **API endpoint** | **Collector service name** | **Devo table** | **Available from release** |
| --- | --- | --- | --- | --- | --- |
| Audit Events | Returns a list of audit events from the Activity Log. | `/api/v1/auditevents` | `audit` | `auth.agilebits.onepassword.audit` | `v1.0.1` |
| Item Usage Actions | Returns a list of account activity events. | `/api/v1/itemusages` | `item_usage` | `auth.agilebits.onepassword.itemusage` | `v1.0.0` |
| Sign-in Attempts | Returns a list of sign-in attempts. | `/api/v1/signinattempts` | `sign_in_attempts` | `auth.agilebits.onepassword.signinattempt` | `v1.0.0` |

## API limits

The Events API limits requests to **600 per minute** and up to **30,000 per hour**. Exceeding these limits will return an error "**429 Too many requests**".

The API can access data from the **last 120 days**. If you need to access data from more than 120 days ago, you can use the Activity Log in your 1Password account.

## Minimum configuration required for basic pulling

Although this collector supports advanced configuration, the fields required to retrieve data with basic configuration are defined below.

| **Setting** | **Details** |
| --- | --- |
| `base_url` | A token can access data for one or more events, depending on which events were scoped when the token was created. Make sure the bearer token you use has access to the events you want to request. You can verify this from the Events Reporting integration details in the [Integrations](https://start.1password.com/integrations/active) section of your 1Password account or through a [GET request to the introspection endpoint](https://developer.1password.com/docs/events-api/reference/#get-apiv2authintrospect). |
| `token` | The `base_url` is required to authenticate the requests. This is the URL for the different requests. |

## Accepted authentication methods

Every call to the 1Password Events API must be authorized with a [bearer token](https://support.1password.com/events-reporting/#appendix-issue-or-revoke-bearer-tokens). You must include your bearer token in the collector configuration.

For example:

| **Authentication method** | **Details** |
| --- | --- |
| `token` | You will need your `token` to connect to the `base_url`. |

## Vendor setup

Before you can use the 1Password Events API, you'll need to:

- [Sign up for 1Password Business](https://1password.com/business/).
- [Set up an Events Reporting integration](https://support.1password.com/events-reporting) in your account.
- [Create a bearer token](https://support.1password.com/events-reporting/#appendix-issue-or-revoke-bearer-tokens) and select the event features it can access.

To create a bearer token:

1. [Sign in](https://start.1password.com/signin) to your account on [http://1Password.com](http://1Password.com)  and click [Integrations](https://start.1password.com/integrations/active) in the sidebar.
2. Choose the Events Reporting integration where you want to issue a token and click **Add a token**.
3. Enter a name for the bearer token and choose when it will expire. Select or deselect the event types the token has access to, then click **Issue Token**.
4. Click **Save in 1Password** and choose which vault to save your token to. Then click **View Integration Details**.

### Treat your token like a password

The security of your 1Password application is tied to the security of your **token**. Secure it as you would any sensitive credential. Do not share it with unauthorized individuals or email it to anyone under any circumstances!

### Connectivity requirements

The 1Password Events API is a REST-style API that follows the [OpenAPI 3.0 Specifications](https://spec.openapis.org/oas/latest.html). All communications between clients and servers are over HTTPS.

## Run the collector

Once the data source is configured, you can either send us the required information if you want us to host and manage the collector for you (<u>Cloud collector</u>), or deploy and host the collector in your own machine using a Docker image (<u>On-premise collector</u>).

> Macro (rw-ui-tabs-macro)
> 
> > Macro (rw-tab)
> 
> We use a piece of software called Collector Server to host and manage all our available collectors.
> 
> To enable the collector for a customer:
> 
> 1. In the **Collector Server** **GUI**, access the **domain** in which you want this instance to be created
> 2. Click **Add Collector** and find the one you wish to add.
> 3. In the **Version** field, select the latest value.
> 4. In the **Collector Name** field, set the value you prefer (this name must be unique inside the same Collector Server domain).
> 5. In the sending method select **Direct Send. Direct Send** configuration is optional for collectors that create `Table` events, but mandatory for those that create `Lookups`.
> 6. In the **Parameters** section, establish the **Collector Parameters** as follows below:
> 
> ### Editing the JSON configuration
> 
> ```
> {
>   "global_overrides": {
>     "debug": false
>   },
>   "inputs": {
>     "onepassword": {
>       "id": <short_unique_id>,
>       "enabled": true,
>       "base_url": "<base_url_value>",
>       "credentials": {
>         "token": "<token_value>"
>       },
>       "services": {
>         "item_usage": {
>           "request_period_in_seconds": 60,
>           "tag_override": "<tag_override_value>",
>           "limit_override": <limit_override_value>,
>           "start_time": "<start_time_value>"
>         },
>         "sign_in_attempts": {
>           "request_period_in_seconds": 60,
>           "tag_override": "<tag_override_value>",
>           "limit_override": <limit_override_value>,
>           "start_time": "<start_time_value>"
>         },
>         "audit": {
>           "request_period_in_seconds": 60,
>           "tag_override": "<tag_override_value>",
>           "limit_override": <limit_override_value>,
>           "start_time": "<start_time_value>"
>         }
>       }
>     }
>   }
> }
> ```
> 
> Please replace the placeholders with real world values following the description table below:
> 
> |  |  |  |  |  |
> | --- | --- | --- | --- | --- |
> | **Parameter** | **Data type** | **Requirement** | **Value range / Format** | **Description** |
> | `short_unique_id` | `int` | Mandatory | Min length: 1 | Short, unique ID for input service, used in persistence addressing. Avoid duplicates to prevent collisions. |
> | `base_url_value` | `str` | Optional | Valid URL | If empty, the default value is [https://events.1password.com](https://events.1password.com)   
> If present, the base_url can be:<br>- [https://events.1password.com](https://events.1password.com)  (1Password Business)
> - [https://events.ent.1password.com](https://events.ent.1password.com)  (1Password Enterprise)
> - [https://events.1password.ca](https://events.1password.ca)
> - [https://events.1password.eu](https://events.1password.eu) |
> | `token_value` | `str` | Mandatory | Min length: 1 | Token for authentication. |
> | `request_period_in_seconds` | int | Optional | Min length: 1 | If not present, the default value is 60. |
> | `tag_override_value` | `str` | Optional | `level1.level2.level3.level4` | If present, the service logs will have a `level1.level2.level3.level4` different from `auth.agilebits.onepassword.<service>`. Use this only with `my.app.level3.level4` or you won't be able to see the logs in Devo. |
> | `limit_override_value` | int | Optional | Min length: 1 | The number of events to return in a single request. Specify a limit from 1 to 1000. If not specified, the`limit` will default to 100. |
> | `start_time_value` | `str` | Optional | `"YYYY-MM-DDTHH:MM:SS"` | If present, it will be the start date and time for pulling events. If not, the current date and time will be used. Example: `2024-09-01T03:00:00` |
> 
> > Macro (rw-tab)
> 
> This data collector can be run in any machine that has the Docker service available because it should be executed as a docker container. The following sections explain how to prepare all the required setup for having the data collector running.
> 
> ### Structure
> 
> The following directory structure should be created for being used when running the collector:
> 
> ```
> <any_directory>
> └── devo-collectors/
>     └── <product_name>/
>         ├── certs/
>         │   ├── chain.crt
>         │   ├── <your_domain>.key
>         │   └── <your_domain>.crt
>         ├── state/
>         └── config/ 
>             └── config.yaml 
> ```
> 
> > ⚠️ Replace `<product_name>` with the proper value.
> 
> ### Devo credentials
> 
> In Devo, go to **Administration → Credentials → X.509 Certificates**, download the **Certificate**, **Private key** and **Chain CA** and save them in `<product_name>/certs/`. Learn more about security credentials in Devo [here](https://devodocs.atlassian.net/wiki/spaces/latest/pages/94763701).
> 
> ![image](media://033161a2-cf53-4948-8f52-a62987dbe195)
> 
> > ⚠️ Replace `<product_name>` with the proper value.
> 
> ### Editing the config.yaml file
> 
> ```
> globals:
>   debug: false
>   id: not used
>   name: onepassword
>   persistence:
>     type: filesystem
>     config:
>       directory_name: state
> outputs:
>   devo_1:
>     type: devo_platform
>     config:
>       address: <devo_address>
>       port: 443
>       type: SSL
>       chain: <chain_filename>
>       cert: <cert_filename>
>       key: <key_filename>
> inputs:
>   onepassword:
>     id: <short_unique_id>
>     enabled: true
>     base_url: <base_url>
>     credentials:
>       token: <token_value>    
>     services:
>     audit:
>       request_period_in_seconds: <request_period_in_seconds_value>
>       tag_override: <tag_override_value>
>       limit_override: <limit_override_value>
>       start_time: <start_time_value>
>     item_usage:
>       request_period_in_seconds: <request_period_in_seconds_value>
>       tag_override: <tag_override_value>
>       limit_override: <limit_override_value>
>       start_time: <start_time_value>
>     sign_in_attempts:
>       request_period_in_seconds: <request_period_in_seconds_value>
>       tag_override: <tag_override_value>
>       limit_override: <limit_override_value>
>       start_time: <start_time_value>
> ```
> 
> Replace the placeholders with your required values following the description table below:
> 
> |  |  |  |  |  |
> | --- | --- | --- | --- | --- |
> | **Parameter** | **Data type** | **Requirement** | **Value range / Format** | **Description** |
> | `short_unique_id` | `int` | Mandatory | Min length: 1 | Short, unique ID for input service, used in persistence addressing. Avoid duplicates to prevent collisions. |
> | `base_url_value` | `str` | Optional | Valid URL | If empty, the default value is [https://events.1password.com](https://events.1password.com)   
> If present, the base_url can be:<br>- [https://events.1password.com](https://events.1password.com)  (1Password Business)
> - [https://events.ent.1password.com](https://events.ent.1password.com)  (1Password Enterprise)
> - [https://events.1password.ca](https://events.1password.ca)
> - [https://events.1password.eu](https://events.1password.eu) |
> | `token_value` | `str` | Mandatory | Min length: 1 | Token for authentication. |
> | `request_period_in_seconds` | int | Optional | Min length: 1 | If not present, the default value is 60. |
> | `tag_override_value` | `str` | Optional | `level1.level2.level3.level4` | If present, the service logs will have a `level1.level2.level3.level4` different from `auth.agilebits.onepassword.<service>`. Use this only with `my.app.level3.level4` or you won't be able to see the logs in Devo. |
> | `limit_override_value` | int | Optional | Min length: 1 | The number of events to return in a single request. Specify a limit from 1 to 1000. If not specified, the`limit` will default to 100. |
> | `start_time_value` | `str` | Optional | `"YYYY-MM-DDTHH:MM:SS"` | If present, it will be the start date and time for pulling events. If not, the current date and time will be used. Example: `2024-09-01T03:00:00` |
> 
> ### Download the Docker image
> 
> The collector should be deployed as a Docker container. Download the Docker image of the collector as a .tgz file by clicking the link in the following table:
> 
> | **Collector Docker image** | **SHA-256 hash** |
> | --- | --- |
> | [collector-onepassword_collector_if-docker-image-1.1.0](https://drive.google.com/file/d/1eMQBl7r0gP8Qn_N3seS9vRfnBolofSo6/view?usp=drive_link) | `508f366d6b936f34c2a94bcf5a912e9264d4fe2c6be0dfec45f750c4e84080be` |
> 
> Use the following command to add the Docker image to the system:
> 
> ```
> gunzip -c <image_file>-<version>.tgz | docker load
> ```
> 
> > ⚠️ Once the Docker image is imported, it will show the real name of the Docker image (including version info). Replace `<image_file>` and `<version>` with a proper value.
> 
> The Docker image can be deployed on the following services:
> 
> #### Docker
> 
> Execute the following command on the root directory `<any_directory>/devo-collectors/<product_name>/`
> 
> ```
> docker run 
> --name collector-<product_name> 
> --volume $PWD/certs:/devo-collector/certs 
> --volume $PWD/config:/devo-collector/config 
> --volume $PWD/state:/devo-collector/state 
> --env CONFIG_FILE=config.yaml 
> --restart=always 
> --interactive 
> --tty 
> <image_name>:<version>
> ```
> 
> > ⚠️ Replace `<product_name>`, `<image_name>` and `<version>` with the proper values.
> 
> #### Docker Compose
> 
> The following Docker Compose file can be used to execute the Docker container. It must be created in the `<any_directory>/devo-collectors/<product_name>/` directory.
> 
> ```
> version: '3'
> services:
>   collector-<product_name>:
>     image: <image_name>:${IMAGE_VERSION:-latest}
>     container_name: collector-<product_name>
>     restart: always
>     volumes:
>       - ./certs:/devo-collector/certs
>       - ./config:/devo-collector/config
>       - ./credentials:/devo-collector/credentials
>       - ./state:/devo-collector/state
>     environment:
>       - CONFIG_FILE=${CONFIG_FILE:-config.yaml}
> ```
> 
> To run the container using docker-compose, execute the following command from the `<any_directory>/devo-collectors/<product_name>/` directory:
> 
> ```
> IMAGE_VERSION=<version> docker-compose up -d
> ```
> 
> > ⚠️ Replace `<product_name>`, `<image_name>` and `<version>` with the proper values.

## Collector services detail

### For all the services

#### Devo categorization and destination

Please check the section [Data Source Description](#) to learn about the target tables for each service.

#### Restart the persistence

This collector uses persistent storage to download events in an orderly fashion and avoid duplicates. In case you want to re-ingest historical data or recreate the persistence, you can restart the persistence of this collector by following these steps:

1. Edit the configuration file.
2. Change the value of the `start_time_value` to a different one.
3. Save the changes.
4. Restart the collector.

The collector will detect this change and will restart the persistence using the parameters of the configuration file or the default configuration in case it has not been provided.

## Troubleshooting

This collector has different security layers that detect both an invalid configuration and abnormal operation. This table will help you detect and resolve the most common errors.

### Configuration errors

| **Error type** | **Error ID** | **Error message** | **Cause** | **Solution** |
| --- | --- | --- | --- | --- |
| `InitVariablesError` | 1 | The parameter configuration is missing and it is mandatory | The parameter is missing in the configuration | Check the documentation and update the configuration accordingly |
| `InitVariablesError` | 2 | The parameter setting must be a valid instance of <`type_A`> not <`type_B`> | The parameter type in the configuration is incorrect | Check the documentation and update the configuration accordingly |
| `InitVariablesError` | 3 | The parameter setting must not be an empty string | The parameter is present in the configuration but it is empty | Check the documentation and update the configuration accordingly |
| `PrePullError` | 200 | <Variable_text> | Some errors happened when accessing the persistence | Contact Devo Support |
| `Error` | 4xx-5xx | The execution of the 1Password request is having an unexpected response | Some errors happened when accessing the 1Password API | Usually, this error gets fixed in the next iteration. If it is a repeating error, please get in touch with Devo Support |

## Collector operations

### Verify collector operations

This is for the standalone mode only. You can check the information in the following sections to verify the correct collector operation.

#### Initialization

The initialization module validates the given configuration and runs the setup, the input (pulling logic), and output (delivering logic) services. A successful run has the following output messages for the initializer module:

```
2023-01-10T15:22:57.146 INFO MainProcess::MainThread -> Loading configuration using the following files: {"full_config": "config-test-local.yaml", "job_config_loc": null, "collector_config_loc": null}
2023-01-10T15:22:57.146 INFO MainProcess::MainThread -> Using the default location for "job_config_loc" file: "/etc/devo/job/job_config.json"
2023-01-10T15:22:57.147 INFO MainProcess::MainThread -> "\etc\devo\job" does not exists
2023-01-10T15:22:57.147 INFO MainProcess::MainThread -> Using the default location for "collector_config_loc" file: "/etc/devo/collector/collector_config.json"
2023-01-10T15:22:57.148 INFO MainProcess::MainThread -> "\etc\devo\collector" does not exists
2023-01-10T15:22:57.148 INFO MainProcess::MainThread -> Results of validation of config files parameters: {"config": "C:\git\collectors2\devo-collector-<name>\config\config.yaml", "config_validated": True, "job_config_loc": "/etc/devo/job/job_config.json", "job_config_loc_default": True, "job_config_loc_validated": False, "collector_config_loc": "/etc/devo/collector/collector_config.json", "collector_config_loc_default": True, "collector_config_loc_validated": False}
2023-01-10T15:22:57.171 WARNING MainProcess::MainThread -> [WARNING] Illegal global setting has been ignored -> multiprocessing: False
```

#### Event delivery and Devo ingestion

The event delivery module is in charge of receiving the events from the internal queues where all the events are injected by the pullers and delivering them using the selected compatible delivery method. A successful run has the following output messages for the initializer module:

```
2023-01-10T15:23:00.788    INFO OutputProcess::MainThread -> DevoSender(standard_senders,devo_sender_0) -> Starting thread
2023-01-10T15:23:00.789    INFO OutputProcess::MainThread -> DevoSenderManagerMonitor(standard_senders,devo_1) -> Starting thread (every 300 seconds)
2023-01-10T15:23:00.790    INFO OutputProcess::MainThread -> DevoSenderManager(standard_senders,manager,devo_1) -> Starting thread
2023-01-10T15:23:00.842    INFO OutputProcess::MainThread -> global_status: {"output_process": {"process_id": 18804, "process_status": "running", "thread_counter": 21, "thread_names": ["MainThread", "pydevd.Writer", "pydevd.Reader", "pydevd.CommandThread", "pydevd.CheckAliveThread", "DevoSender(standard_senders,devo_sender_0)", "DevoSenderManagerMonitor(standard_senders,devo_1)", "DevoSenderManager(standard_senders,manager,devo_1)", "OutputStandardConsumer(standard_senders_consumer_0)",
```

#### Sender services

The Integrations Factory Collector SDK has 3 different sender services depending on the event type to deliver (internal, standard, and lookup). This collector uses the following Sender Services:

| **Logging trace** | **Description** |
| --- | --- |
| Number of available senders: 1 | Displays the number of concurrent senders available for the given Sender Service. |
| Sender manager internal queue size: 0 | Displays the items available in the internal sender queue.<br>This value helps detect bottlenecks and needs to increase the performance of data delivery to Devo. This last can be made by increasing the concurrent senders. |
| Total number of messages sent: 44, messages sent since "2022-06-28 10:39:22.511671+00:00": 21 (elapsed 0.007 seconds) | Displays the number of events from the last time the collector executed the pull logic. Following the given example, the following conclusions can be obtained:<br>- 44 events were sent to Devo since the collector started.
- The last checkpoint timestamp was 2022-06-28 10:39:22.511671+00:00.
- 21 events were sent to Devo between the last UTC checkpoint and now.
- Those 21 events required 0.007 seconds to be delivered.<br>By default, these traces will be shown every 10 minutes. |

#### Sender statistics

Each service displays its performance statistics that allow checking how many events have been delivered to Devo by type:

| **Logging trace** | **Description** |
| --- | --- |
| Number of available senders: 1 | Displays the number of concurrent senders available for the given Sender Service. |
| Sender manager internal queue size: 0 | Displays the items available in the internal sender queue. |
| Standard - Total number of messages sent: 57, messages sent since "2023-01-10 16:09:16.116750+00:00": 0 (elapsed 0.000 seconds | Displays the number of events from the last time the collector executed the pull logic. Following the given example, the following conclusions can be obtained:<br>- 57 events were sent to Devo since the collector started.
- The last checkpoint timestamp was 2023-01-10 16:09:16.116750+00:00.
- 0 events were sent to Devo between the last UTC checkpoint and now.
- Those 0 events required 0.00 seconds to be delivered. |

### Check memory usage

To check the memory usage of this collector, look for the following log records in the collector which are displayed every 5 minutes by default, always after running the memory-free process.

- The used memory is displayed by running processes and the sum of both values will give the total used memory for the collector.
- The global pressure of the available memory is displayed in the global value.
- All metrics (Global, RSS, VMS) include the value before freeing and after previous -> after freeing memory

```
  INFO InputProcess::MainThread -> [GC] global: 20.4% -> 20.4%, process: RSS(34.50MiB -> 34.08MiB), VMS(410.52MiB -> 410.02MiB)
  INFO OutputProcess::MainThread -> [GC] global: 20.4% -> 20.4%, process: RSS(28.41MiB -> 28.41MiB), VMS(705.28MiB -> 705.28MiB)
```

## Change log

| **Release** | **Released on** | **Release type** | **Details** | **Recommendations** |
| --- | --- | --- | --- | --- |
| `v1.1.0` | `2024-08-30` | [IMPROVEMENTS] | - Updated DC SDK to `v1.12.4`
- Upgraded Docker Base image to `1.3.0`. | `Recommended version` |
| `v1.0.1` | `2023-11-08` | [IMPROVEMENTS] | - Update default tag for audit logs | `Upgrade` |
| `v1.0.0` | `2023-11-01` | [IMPROVEMENTS] | - Updated DCSDK from `1.4.1` to `1.9.2`:
- Upgrade internal dependencies
- Store lookup instances into DevoSender to avoid creation of new instances for the same lookup
- Ensure service_config is a dict into templates
- Ensure special characters are properly sent to the platform
- Changed log level to some messages from info to debug
- Changed some wrong log messages
- Upgraded some internal dependencies
- Changed queue passed to setup instance constructor
- Ability to validate collector setup and exit without pulling any data
- Ability to store in the persistence the messages that couldn't be sent after the collector stopped
- Ability to send messages from the persistence when the collector starts and before the puller begins working
- Ensure special characters are properly sent to the platform
- Added a lock to enhance sender object
- Added new class attrs to the setstate and getstate queue methods
- Fix sending attribute value to the setstate and getstate queue methods
- Added log traces when queues are full and have to wait
- Added log traces of queues time waiting every minute in debug mode
- Added method to calculate queue size in bytes
- Block incoming events in queues when there are no space left
- Send telemetry events to Devo platform
- Upgraded internal Python dependency Redis to v4.5.4
- Upgraded internal Python dependency DevoSDK to v5.1.3
- Fixed obfuscation not working when messages are sent from templates d
- New method to figure out if a puller thread is stopping
- Upgraded internal Python dependency DevoSDK to v5.0.6
- Improved logging on messages/bytes sent to Devo platform
- Fixed wrong bytes size calculation for queues
- New functionality to count bytes sent to Devo Platform (shown in console log)
- Upgraded internal Python dependency DevoSDK to v5.0.4
- Fixed bug in persistence management process, related to persistence reset
- Aligned source code typing to be aligned with Python 3.9.x
- Inject environment property from user config
- Obfuscation service can be now configured from user config and module definiton
- Obfuscation service can now obfuscate items inside arrays | `Upgrade` |
| `v0.1.2` | `2023-01-18` | [IMPROVEMENTS] | Added<br>- More log traces related to execution environment details
- Global rate limiters functionality
- Extra checks for supporting MacOS as a development environment
- Obfuscation functionality<br>Changed<br>- Some log traces now are shown less frequently
- The default value for the logging frequency for "main" processes has been changed (to 120 seconds)
- Updated some Python Packages
- Controlled stopping functionality more stable when using the "template"
- Improved some log messages related to Devo certificates (when using the Devo sender)
- Validate JSON objects before saving them to persistence (using the filesystem) | `Upgrade` |