Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Commit

Permalink
Copy packages from snapshot to production (#4362)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkroh authored May 10, 2022
1 parent 9fe486b commit 7529b1c
Show file tree
Hide file tree
Showing 1,070 changed files with 96,610 additions and 0 deletions.
66 changes: 66 additions & 0 deletions packages/1password/1.4.0/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# newer versions go on top
- version: "1.4.0"
changes:
- description: Change name of package
type: enhancement
link: https://github.com/elastic/integrations/pull/3245
- version: "1.3.0"
changes:
- description: Update to ECS 8.2
type: enhancement
link: https://github.com/elastic/integrations/pull/2778
- version: "1.2.2"
changes:
- description: Fix typo in config template for ignoring host enrichment
type: bugfix
link: https://github.com/elastic/integrations/pull/3092
- version: "1.2.1"
changes:
- description: Add documentation for multi-fields
type: enhancement
link: https://github.com/elastic/integrations/pull/2916
- version: "1.2.0"
changes:
- description: Add new "event.action" to item_usages events.
type: enhancement
link: https://github.com/elastic/integrations/pull/2775
- version: "1.1.1"
changes:
- description: Fix field mapping conflict for ECS `event.created`.
type: bugfix
link: https://github.com/elastic/integrations/pull/2687
- version: "1.1.0"
changes:
- description: Update to ECS 8.0
type: enhancement
link: https://github.com/elastic/integrations/pull/2368
- version: "1.0.0"
changes:
- description: GA integration
type: enhancement
link: https://github.com/elastic/integrations/pull/2360
- version: "0.2.2"
changes:
- description: Regenerate test files using the new GeoIP database
type: bugfix
link: https://github.com/elastic/integrations/pull/2339
- version: "0.2.1"
changes:
- description: Change test public IPs to the supported subset
type: bugfix
link: https://github.com/elastic/integrations/pull/2327
- version: "0.2.0"
changes:
- description: Add 8.0.0 version constraint
type: enhancement
link: https://github.com/elastic/integrations/pull/2214
- version: "0.1.1"
changes:
- description: Update Title and Description.
type: bugfix
link: https://github.com/elastic/integrations/pull/1997
- version: "0.1.0"
changes:
- description: Initial draft of the package
type: enhancement
link: https://github.com/elastic/integrations/pull/1722
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
config_version: 2
interval: {{interval}}
request.url: {{url}}/api/v1/itemusages
request.method: POST
{{#if proxy_url }}
request.proxy_url: {{proxy_url}}
{{/if}}
{{#if ssl}}
request.ssl: {{ssl}}
{{/if}}
{{#if http_client_timeout}}
request.timeout: {{http_client_timeout}}
{{/if}}
request.transforms:
- set:
target: "header.Content-Type"
value: "application/json"
- set:
target: "header.User-Agent"
value: "1Password-Elastic-Filebeat/0.1.0"
- set:
target: "header.Authorization"
value: 'Bearer {{token}}'
- set:
target: body.cursor
value: '[[if not (eq (len .cursor) 0)]][[.cursor.last_cursor]][[end]]'
- set:
target: body.limit
value_type: int
value: '[[if eq (len .cursor) 0]]{{limit}}[[end]]'
cursor:
last_cursor:
value: '[[.last_response.body.cursor]]'
response.decode_as: application/json
response.split:
target: body.items
response.pagination:
- set:
target: body.cursor
value: '[[.last_response.body.cursor]]'
fail_on_template_error: true
- delete:
target: body.limit
tags:
{{#if preserve_original_event}}
- preserve_original_event
{{/if}}
{{#each tags as |tag i|}}
- {{tag}}
{{/each}}
{{#contains "forwarded" tags}}
publisher_pipeline.disable_host: true
{{/contains}}
{{#if processors}}
processors:
{{processors}}
{{/if}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
---
description: Pipeline for normalizing 1Password Item Usage Events
processors:
- rename:
field: message
target_field: event.original
- json:
field: event.original
target_field: onepassword
- drop:
description: Drop if no timestamp (invalid json)
if: "ctx?.onepassword?.timestamp == null"

#######################
## ECS Event Mapping ##
#######################
- set:
field: ecs.version
value: "8.2.0"
# Sets event.created from the @timestamp field generated by filebeat before being overwritten further down
- set:
field: event.created
copy_from: "@timestamp"
- set:
field: event.kind
value: event
- append:
field: event.category
value: [file]
- append:
field: event.type
value: [access]
- rename:
field: onepassword.action
target_field: event.action
ignore_missing: true

#########################
## ECS Related Mapping ##
#########################
- append:
field: related.user
value: "{{onepassword.user.uuid}}"
allow_duplicates: false
if: ctx?.onepassword?.user?.uuid != null
- append:
field: related.user
value: "{{onepassword.user.email}}"
allow_duplicates: false
if: ctx?.onepassword?.user?.email != null
- append:
field: related.user
value: "{{onepassword.user.name}}"
allow_duplicates: false
if: ctx?.onepassword?.user?.name != null
- append:
field: related.ip
value: "{{onepassword.client.ip_address}}"
allow_duplicates: false
if: ctx?.onepassword?.client?.ip_address != null

######################
## ECS User Mapping ##
######################
- rename:
field: onepassword.user.uuid
target_field: user.id
ignore_missing: true
- rename:
field: onepassword.user.name
target_field: user.full_name
ignore_missing: true
- rename:
field: onepassword.user.email
target_field: user.email
ignore_missing: true

####################
## ECS OS Mapping ##
####################
- rename:
field: onepassword.client.os_name
target_field: os.name
ignore_missing: true
- rename:
field: onepassword.client.os_version
target_field: os.version
ignore_missing: true

########################
## ECS Source Mapping ##
########################
- rename:
field: onepassword.client.ip_address
target_field: source.ip
ignore_missing: true
- geoip:
field: source.ip
target_field: source.geo
- geoip:
database_file: GeoLite2-ASN.mmdb
field: source.ip
target_field: source.as
properties:
- asn
- organization_name
ignore_missing: true
- rename:
field: source.as.asn
target_field: source.as.number
ignore_missing: true
- rename:
field: source.as.organization_name
target_field: source.as.organization.name
ignore_missing: true

######################
## ECS Base Mapping ##
######################
- date:
field: onepassword.timestamp
formats:
- ISO8601

#############
## Cleanup ##
#############
- remove:
field:
- onepassword.timestamp
- onepassword.user
- onepassword.location # Use the included GeoIP processor
ignore_missing: true
- remove:
field: event.original
if: "ctx?.tags == null || !(ctx.tags.contains('preserve_original_event'))"
ignore_failure: true
ignore_missing: true
on_failure:
- set:
field: error.message
value: "{{ _ingest.on_failure_message }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
- name: input.type
type: keyword
description: Input type
- name: data_stream.type
type: constant_keyword
description: Data stream type.
- name: data_stream.dataset
type: constant_keyword
description: Data stream dataset.
- name: data_stream.namespace
type: constant_keyword
description: Data stream namespace.
- name: event.module
type: constant_keyword
description: Event module
value: 1password
- name: event.dataset
type: constant_keyword
description: Event dataset
value: 1password.item_usages
- name: '@timestamp'
type: date
description: Event timestamp.
98 changes: 98 additions & 0 deletions packages/1password/1.4.0/data_stream/item_usages/fields/ecs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
- description: |-
ECS version this event conforms to. `ecs.version` is a required field and must exist in all events.
When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events.
name: ecs.version
type: keyword
- description: All the user names or other user identifiers seen on the event.
name: related.user
type: keyword
- description: All of the IPs seen on your event.
name: related.ip
type: ip
- description: |-
This is one of four ECS Categorization Fields, and indicates the highest level in the ECS category hierarchy.
`event.kind` gives high-level information about what type of information the event contains, without being specific to the contents of the event. For example, values of this field distinguish alert events from metric events.
The value of this field can be used to inform how these kinds of events should be handled. They may warrant different retention, different access control, it may also help understand whether the data coming in at a regular interval or not.
name: event.kind
type: keyword
- description: |-
This is one of four ECS Categorization Fields, and indicates the second level in the ECS category hierarchy.
`event.category` represents the "big buckets" of ECS categories. For example, filtering on `event.category:process` yields all events relating to process activity. This field is closely related to `event.type`, which is used as a subcategory.
This field is an array. This will allow proper categorization of some events that fall in multiple categories.
name: event.category
type: keyword
- description: |-
This is one of four ECS Categorization Fields, and indicates the third level in the ECS category hierarchy.
`event.type` represents a categorization "sub-bucket" that, when used along with the `event.category` field values, enables filtering events down to a level appropriate for single visualization.
This field is an array. This will allow proper categorization of some events that fall in multiple event types.
name: event.type
type: keyword
- description: |-
event.created contains the date/time when the event was first read by an agent, or by your pipeline.
This field is distinct from @timestamp in that @timestamp typically contain the time extracted from the original event.
In most situations, these two timestamps will be slightly different. The difference can be used to calculate the delay between your source generating an event, and the time when your agent first processed it. This can be used to monitor your agent's or pipeline's ability to keep up with your event source.
In case the two timestamps are identical, @timestamp should be used.
name: event.created
type: date
- description: |-
The action captured by the event.
This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer.
name: event.action
type: keyword
- description: Unique identifier of the user.
name: user.id
type: keyword
- description: User's full name, if available.
multi_fields:
- name: text
type: match_only_text
name: user.full_name
type: keyword
- description: User email address.
name: user.email
type: keyword
- description: Operating system name, without the version.
multi_fields:
- name: text
type: match_only_text
name: os.name
type: keyword
- description: Operating system version as a raw string.
name: os.version
type: keyword
- description: Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
name: source.as.number
type: long
- description: Organization name.
multi_fields:
- name: text
type: match_only_text
name: source.as.organization.name
type: keyword
- description: City name.
name: source.geo.city_name
type: keyword
- description: Name of the continent.
name: source.geo.continent_name
type: keyword
- description: Country ISO code.
name: source.geo.country_iso_code
type: keyword
- description: Country name.
name: source.geo.country_name
type: keyword
- description: Longitude and latitude.
name: source.geo.location
type: geo_point
- description: Region ISO code.
name: source.geo.region_iso_code
type: keyword
- description: Region name.
name: source.geo.region_name
type: keyword
- description: IP address of the source (IPv4 or IPv6).
name: source.ip
type: ip
- description: List of keywords used to tag each event.
name: tags
type: keyword
Loading

0 comments on commit 7529b1c

Please sign in to comment.