Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
b12d4ef
Add support for Amazon Linux 2022 in Vulnerability Detector
MarcelKemp May 13, 2022
960f5f6
Add RBAC database migration documentation
mcarmona99 May 25, 2022
164d252
Add minor changes to RBAC database integrity documentation
mcarmona99 May 25, 2022
7051eef
Update release and API tag
s-ocando Jun 1, 2022
8331444
Merge branch 'develop' into 5099-al2022-vdt-support
MarcelKemp Jun 2, 2022
a729231
Update rbac-database-integrity.rst after the RBAC migration changes
mcarmona99 Jun 2, 2022
82d3141
Add minor changes to rbac-database-integrity.rst
mcarmona99 Jun 2, 2022
f321bf6
Merge branch '4.4' into develop
s-ocando Jun 9, 2022
70b8c61
Removes local_ip option for agent configuration.
Nicogp Jun 15, 2022
0b9a949
Add rbac_control CLI documentation
mcarmona99 Jun 17, 2022
336274a
Add examples to the rbac-database-integrity docu
mcarmona99 Jun 17, 2022
074e9d3
Update tools index
mcarmona99 Jun 17, 2022
dc7d722
Add rbac-control to toctree
mcarmona99 Jun 17, 2022
621925e
Add requested changes
mcarmona99 Jun 20, 2022
a361d1d
Update source/user-manual/reference/tools/rbac-control.rst
mcarmona99 Jun 20, 2022
e5677d3
Merge pull request #5271 from wazuh/feature/5058-rbac-migration-docu
Jun 20, 2022
fc09f89
Merge branch '4.4' into develop
s-ocando Jun 21, 2022
9f12354
Merge branch 'develop' into 5099-al2022-vdt-support
MarcelKemp Jun 21, 2022
da8c7fc
Merge branch '4.4' into develop
s-ocando Jun 21, 2022
4a912ba
Merge pull request #5223 from wazuh/5099-al2022-vdt-support
chemamartinez Jun 21, 2022
8b39766
Merge branch '4.4' into develop
s-ocando Jun 30, 2022
5607760
Add redirects and changes to wording
javimed Jul 4, 2022
3e0b784
Update source/development/rbac-database-integrity.rst
javimed Jul 5, 2022
8983112
Merge branch '4.4' into develop
s-ocando Jul 6, 2022
1794024
Update the Wazuh version
s-ocando Jul 6, 2022
081c44b
Add changes as requested
javimed Jul 6, 2022
194251b
Merge pull request #5412 from wazuh/suggestions-to-dev-13109
s-ocando Jul 7, 2022
2aa1ce5
Merge branch 'develop' into dev-13109-rbac-upgrade-migration
javimed Jul 7, 2022
00ac00d
Merge pull request #5361 from wazuh/dev-13109-rbac-upgrade-migration
javimed Jul 8, 2022
7120a49
Add section to explain how the manager certificates are generated.
Jul 12, 2022
0a55e14
Apply review suggestions.
Jul 13, 2022
6530a53
Merge branch '4.4' into develop
s-ocando Jul 15, 2022
00f915e
Merge branch '4.4' into develop
s-ocando Jul 21, 2022
1e06b8b
Merge branch '4.4' into develop
javimed Jul 26, 2022
1204c12
Merge pull request #5354 from wazuh/dev-remove-local-ip-agent
vikman90 Jul 27, 2022
4c784ff
Fix EICAR URL
zbalkan Aug 3, 2022
e8977b4
Remove step 2
Zapatannicolas Aug 7, 2022
2e28839
Merge branch '4.4' into develop
s-ocando Aug 10, 2022
4fde32a
Merge branch '4.4' into develop
s-ocando Aug 17, 2022
dc3b6dc
Merge branch '4.4' into develop
s-ocando Aug 25, 2022
1b62425
change Svc name
Zapatannicolas Sep 5, 2022
b03ca99
Add new API log rotation option based on file size
vicferpoy Aug 29, 2022
38384b1
Update source/user-manual/api/configuration.rst
Sep 8, 2022
728aad9
Merge pull request #5545 from wazuh/5300-api-log-rotate-file-size
s-ocando Sep 8, 2022
4ebe8fe
Merge branch '4.4' into develop
s-ocando Sep 9, 2022
f7415c2
Update pull_request_template.md
s-ocando Sep 13, 2022
81ed500
Update exit codes references
nico-stefani Sep 12, 2022
3c0157a
Add Reparse section to GCP and Azure
fdalmaup Sep 9, 2022
9c1eef8
Change reparse example command
fdalmaup Sep 14, 2022
15a8556
Add Policy configuration section
fdalmaup Sep 8, 2022
51f0727
Divide permissions into groups
fdalmaup Sep 12, 2022
b7f37bc
Add new permissions required
fdalmaup Sep 13, 2022
23e666b
Add last set of permissions
fdalmaup Sep 16, 2022
261c8f4
Modify indentation
fdalmaup Sep 16, 2022
28ca2eb
Modify iam permissions
fdalmaup Sep 19, 2022
9badec6
Modify policy section details
fdalmaup Sep 21, 2022
4d53e05
Merge pull request #5508 from Zapatannicolas/issue/5422-remove-step-2…
s-ocando Sep 22, 2022
98f4d9a
Merge branch '4.4' into develop
s-ocando Sep 22, 2022
7a6ecaf
Rephrase reparse option texts
javimed Sep 22, 2022
4c2bd26
Minor editorial changes
s-ocando Sep 23, 2022
c2e357a
Merge pull request #5461 from wazuh/5457-add-new-authd-options
s-ocando Sep 23, 2022
9087b8b
Modify AWS reparse section
fdalmaup Sep 23, 2022
e51d90a
Add container prefix option
nico-stefani Sep 6, 2022
37e6ff6
Replace 'prefix' by 'path'
nico-stefani Sep 8, 2022
370317f
CR changes
nico-stefani Sep 23, 2022
fb687c5
Merge pull request #5577 from wazuh/4902-add-reparse-aws-azure-gcp
javimed Sep 23, 2022
185a33d
Update source/user-manual/reference/ossec-conf/wodle-azure-logs.rst
javimed Sep 23, 2022
d11b423
Merge pull request #5569 from wazuh/11147-add-prefix-parameter-to-azu…
javimed Sep 23, 2022
634575c
Review Image scanning permissions text
javimed Sep 26, 2022
c1c1e28
Update pull_request_template.md
s-ocando Sep 28, 2022
e74ff66
Review Image scanning permissions text
javimed Sep 28, 2022
89c047c
Merge pull request #5588 from wazuh/5005-add-permissions-required-aws
javimed Sep 28, 2022
de828f8
Merge branch '4.4' into develop
s-ocando Sep 30, 2022
f3e928f
Merge branch 'wazuh:develop' into develop
zbalkan Sep 30, 2022
eaf9b1b
Update source/amazon/services/troubleshooting.rst
nico-stefani Oct 6, 2022
e61fa3f
Added link to supported services and fixed another that already exists
nico-stefani Oct 6, 2022
0eaada0
Merge branch '4.4' into develop
s-ocando Oct 7, 2022
c7e8dc6
Apply suggestions from code review
nico-stefani Oct 13, 2022
dde2ab9
Merge pull request #5580 from wazuh/5570-update-aws-error-codes
s-ocando Oct 14, 2022
3a4b8b0
Merge branch '4.4' into develop
s-ocando Oct 14, 2022
eefd21f
Merge branch '4.4' into develop
s-ocando Oct 21, 2022
0df09e8
Merge branch '4.4' into develop
s-ocando Nov 4, 2022
5f3e675
Merge pull request #5499 from zbalkan/develop
s-ocando Nov 4, 2022
066f47c
Add the new vacuum config options for wazuh-db in internal_options. A…
Nicogp Nov 10, 2022
0dc4c58
Change blob style in metadata table note.
Nicogp Nov 10, 2022
9e6ec08
Add storage in disk option for remoted groups generation
TomasTurina Nov 10, 2022
a04a90f
Merge branch '4.4' into develop
s-ocando Nov 11, 2022
3c66557
Merge pull request #5744 from wazuh/14733_optimize_multigroups_cpu
javimed Nov 11, 2022
8546d18
Change the 'note' tag to 'versionadded' in the wazuh-db metadata table.
Nicogp Nov 15, 2022
67f6bbc
Merge branch '4.4' into develop
s-ocando Nov 17, 2022
249e577
Improve the description of last_vacuum_time.
Nicogp Nov 17, 2022
ac6ad72
Merge pull request #5742 from wazuh/dev-wazuh-db-vacuum
s-ocando Nov 17, 2022
440ee56
Update pull_request_template.md
s-ocando Nov 23, 2022
93a2c57
Add Upgrade with installation assistant
DFolchA Dec 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 11 additions & 26 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,23 @@
<!--
This template reflects sections that must be included in new Pull requests.
Contributions from the community are really appreciated. If this is the case, please add the
"contribution" to properly track the Pull Request.

Contributions from the community are really appreciated. If this is the case, please add the "contribution" to properly track the Pull Request.
Please fill the table below. Feel free to extend it at your convenience.
-->
<!--
## Community contributions advice

We love our community contributions. First, we work with the numbered branches. The `master` branch is only updated when a new Wazuh release is done. We recommend making PRs from the actual branch. For instance, if Wazuh 3.11.4 is the latest release, the branch to be used is 3.11.

Anyway, if you contribute from the master branch, we will `cherry-pick` your commits to the numerated branch for you.

We love our community contributions. We recommend making PRs from the current branch. For instance, if Wazuh 4.3.7 is the latest release, the branch to be used is 4.3.
Thanks!
-->

## Description

<!--
Add a clear description of how the problem has been solved.
If your PR closes an issue, please use the "closes" keyword indicating the issue.
Add a clear description of how the problem has been solved.
If your PR closes an issue, please use the "closes" keyword indicating the issue.
-->

## Checks
- [ ] It compiles without warnings.
- [ ] Spelling and grammar.
- [ ] Used impersonal speech.
- [ ] Used uppercase only on nouns.
- [ ] Updated the `redirect.js` script if necessary (check [this guide](https://github.com/wazuh/wazuh-documentation/blob/master/NEW_RELEASE.md)).

<!--
Leave the following note if you made any changes to the redirect.js script. Remove it otherwise.
-->

## Note to the reviewer

This PR includes changes to the `redirect.js` script that need to be included in all production branches.
- [ ] Compiles without warnings.
- [ ] Uses present tense, active voice, and semi-formal registry.
- [ ] Uses short, simple sentences.
- [ ] Uses **bold** for user interface elements, _italics_ for key terms or emphasis, and `code` font for Bash commands, file names, REST paths, and code.
- [ ] Uses three spaces indentation.
- [ ] Adds or updates meta descriptions accordingly.
- [ ] Updates the `redirects.js` script if necessary (check [this guide](https://github.com/wazuh/wazuh-documentation/blob/master/NEW_RELEASE.md)).
2 changes: 2 additions & 0 deletions source/_static/js/redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ newUrls['4.4'] = [
'/amazon/services/supported-services/elastic-load-balancing/alb.html',
'/amazon/services/supported-services/elastic-load-balancing/nlb.html',
'/amazon/services/supported-services/elastic-load-balancing/clb.html',
'/development/rbac-database-integrity.html',
'/user-manual/reference/tools/rbac-control.html',
'/user-manual/agents/key-request.html',
'/user-manual/manager/manual-backup-restore.html',
'/user-manual/reference/ossec-conf/wazuh-db-config.html',
Expand Down
19 changes: 9 additions & 10 deletions source/amazon/services/prerequisites/considerations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,23 @@ On the other hand, the ``CloudWatch Logs`` module can process logs older than th


Reparse
~~~~~~~

.. note::
Option not available for CloudWatch Logs.
-------

.. warning::
Using the ``reparse`` option will fetch and process every log from the starting date until the present. This process may generate duplicate alerts.

Using the ``reparse`` option will fetch and process all the logs from the starting date until the present. This process may generate duplicate alerts.

To fetch and process older logs, you need to manually run the module using the ``--reparse`` option.

To process older logs, it's necessary to manually execute the module using the ``--reparse`` or ``-o`` option. Executing the module with this option will use the ``only_logs_after`` value provided to fetch and process every log from that date until the present. If no ``only_logs_after`` value was provided, it will use the date of the first file processed.
The ``only_logs_after`` value sets the time for the starting point. If you don't provide an ``only_logs_after`` value, the module uses the date of the first file processed.

Below there is an example of a manual execution of the module using the ``--reparse`` option on a manager, being ``/var/ossec`` the Wazuh installation path:
Find an example of running the module on a manager using the ``--reparse`` option. ``/var/ossec`` is the Wazuh installation path.

.. code-block:: console

# cd /var/ossec/wodles/aws
# ./aws-s3 -b 'wazuh-example-bucket' --reparse --only_logs_after '2021-Jun-10' --debug 2
# /var/ossec/wodles/aws/aws-s3 -b 'wazuh-example-bucket' --reparse --only_logs_after '2021-Jun-10' --debug 2

The ``--debug 2`` parameter was used to get a verbose output since by default the script won't print anything on the terminal, and it could seem like it's not working when it could be handling a great amount of data instead.
The ``--debug 2`` parameter gets a verbose output. This is useful to show the script is working, specially when handling a large amount of data.


Connection configuration for retries
Expand Down
143 changes: 142 additions & 1 deletion source/amazon/services/supported-services/ecr-image-scanning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,148 @@ The following sections cover how to configure AWS to store the scan findings in
AWS configuration
-----------------

AWS provides a `template <https://github.com/aws-samples/ecr-image-scan-findings-logger/blob/main/Template-ECR-SFL.yml>`_ for creating a stack in CloudFormation that loads the image scan findings from Amazon ECR in CloudWatch using an AWS Lambda function.
AWS provides a `template <https://github.com/aws-samples/ecr-image-scan-findings-logger/blob/main/Template-ECR-SFL.yml>`__ that logs to CloudWatch the findings of Amazon ECR scans of images. The template uses an AWS Lambda function to accomplish this.

Uploading the template and creating a stack, uploading the images to Amazon ECR, scanning the images, and using the logger all require specific permissions. Because of this, you need to create a custom policy granting these permissions.

.. include:: /_templates/cloud/amazon/create_policy.rst

IAM permissions
^^^^^^^^^^^^^^^

You need the permissions listed below inside the sections for ``RoleCreator`` and ``PassRole`` to create and delete the stack based on the template.

.. warning::

These permissions must be bound to the specific resources due to overly permissive actions.

.. code-block:: json

{
"Sid": "RoleCreator",
"Effect": "Allow",
"Action": [
"iam:CreateRole",
"iam:PutRolePolicy",
"iam:AttachRolePolicy",
"iam:DeleteRolePolicy",
"iam:DeleteRole",
"iam:GetRole",
"iam:GetRolePolicy",
"iam:PassRole"
],
"Resource": "arn:aws:iam::<account-ID>:role/*"
},
{
"Sid": "PassRole",
"Effect": "Allow",
"Action": "iam:PassRole",
"Resource": "arn:aws:iam::<account-ID>:role/*-LambdaExecutionRole*"
}

CloudFormation stack permissions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You need the following permissions to create and delete any template-based CloudFormation stack.

.. code-block:: json

{
"Sid": "CloudFormationStackCreation",
"Effect": "Allow",
"Action": [
"cloudformation:CreateStack",
"cloudformation:ValidateTemplate",
"cloudformation:CreateUploadBucket",
"cloudformation:GetTemplateSummary",
"cloudformation:DescribeStackEvents",
"cloudformation:DescribeStackResources",
"cloudformation:ListStacks",
"cloudformation:DeleteStack",
"s3:PutObject",
"s3:ListBucket",
"s3:GetObject",
"s3:CreateBucket"
],
"Resource": "*"
}

ECR registry and repository permissions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This `Amazon ECR <https://docs.aws.amazon.com/AmazonECR/latest/userguide/set-repository-policy.html>`__ permission allows calls to the API through an IAM policy.

.. note::

Before authenticating to a registry and pushing or pulling any images from any Amazon ECR repository, you need ``ecr:GetAuthorizationToken``.

.. code-block:: json

{
"Sid": "ECRUtilities",
"Effect": "Allow",
"Action": [
"ecr:GetAuthorizationToken",
"ecr:DescribeRepositories"
],
"Resource": "*"
}

Image pushing and scanning permissions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You need the following Amazon ECR permissions to `push images <https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-push.html#image-push-iam>`__. They are scoped down to a specific repository. The steps to push Docker images are described in the `Amazon ECR - Pushing a Docker image <https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-push-ecr-image.html>`_ documentation.

.. code-block:: json

{
"Sid": "ScanPushImage",
"Effect": "Allow",
"Action": [
"ecr:CompleteLayerUpload",
"ecr:UploadLayerPart",
"ecr:InitiateLayerUpload",
"ecr:BatchCheckLayerAvailability",
"ecr:PutImage",
"ecr:ListImages",
"ecr:DescribeImages",
"ecr:DescribeImageScanFindings",
"ecr:StartImageScan"
],
"Resource": "arn:aws:ecr:<region>:<account-ID>:repository/<repository-name>"
}

Amazon Lambda and Amazon EventBridge permissions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You need the following permissions to create and delete the resources handled by the Scan Findings Logger template.

.. code-block:: json

{
"Sid": "TemplateRequired0",
"Effect": "Allow",
"Action": [
"lambda:RemovePermission",
"lambda:DeleteFunction",
"lambda:GetFunction",
"lambda:CreateFunction",
"lambda:AddPermission"
],
"Resource": "arn:aws:lambda:<region>:<account-ID>:*"
},
{
"Sid": "TemplateRequired1",
"Effect": "Allow",
"Action": [
"events:RemoveTargets",
"events:DeleteRule",
"events:PutRule",
"events:DescribeRule",
"events:PutTargets"
],
"Resource": "arn:aws:events:<region>:<account-ID>:*"
}

How to create the CloudFormation Stack
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
19 changes: 11 additions & 8 deletions source/amazon/services/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.. meta::
:description: Frequently asked questions about the Wazuh module for Amazon. Learn more about it in this section of the documentation.

.. _amazon_troubleshooting:

Troubleshooting
Expand Down Expand Up @@ -65,7 +65,7 @@ Follow these steps to enable debug mode:
wazuh_modules.debug=2


#. Restart the Wazuh service.
#. Restart the Wazuh service.

.. include:: ../../_templates/common/restart_manager_or_agent.rst

Expand Down Expand Up @@ -191,7 +191,7 @@ Take into account that Wazuh does not provide default rules for the different lo
Interval overtaken message is present in the ossec.log
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The ``Interval overtaken`` message is present in the ``ossec.log`` file.
The ``Interval overtaken`` message is present in the ``ossec.log`` file.

**Solution**

Expand All @@ -211,7 +211,7 @@ Error codes reference
| 1 | Unknown error | Programming error. Please, open an issue in the `Wazuh GitHub repository <https://github.com/wazuh/wazuh/issues/new/choose>`_ with the trace of the |
| | | error. |
+-----------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| 2 | Error parsing configuration (bucket name, keys, etc.) | Check the wodle configuration in ``ossec.conf`` file. |
| 2 | SIGINT | The module stopped due to an interrupt signal. |
+-----------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| 3 | Invalid credentials to access S3 bucket | Make sure that your credentials are OK. For more information, see the :ref:`Configuring AWS credentials <amazon_credentials>` section. |
+-----------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
Expand All @@ -225,11 +225,11 @@ Error codes reference
+-----------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| 8 | Failed to decompress file | Only ``.gz`` and ``.zip`` compression formats are supported. |
+-----------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| 9 | Failed to parse file | Check the type of the bucket. |
| 9 | Failed to parse file | Ensure that the log file contents have the expected structure. |
+-----------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| 11 | Unable to connect to Wazuh | Ensure that Wazuh is running. |
+-----------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| 12 | SIGINT | The module stopped due to an interrupt signal. |
| 12 | Invalid type of bucket | Check if the type of bucket is one of the :ref:`supported <amazon_supported_services>`. |
+-----------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| 13 | Error sending message to Wazuh | Make sure that Wazuh is running. |
+-----------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
Expand All @@ -239,6 +239,9 @@ Error codes reference
+-----------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| 16 | Throttling error | AWS is receiving more than 10 requests per second. Try to run the module again when the number of requests to AWS has decreased. |
+-----------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| 17 | Invalid file key format | Ensure that the file path follows the format specified in the |
| | | `Wazuh documentation <https://documentation.wazuh.com/current/amazon/services/supported-services/index.html>`_. |
| 17 | Invalid file key format | Ensure that the file path follows the format specified in the :ref:`Wazuh documentation <amazon_supported_services>`. |
+-----------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| 18 | Invalid prefix | Make sure that the indicated path exists in the S3 bucket. |
+-----------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| 19 | The server datetime and datetime of the AWS environment differ | Make sure that the server datetime is correctly set. |
+-----------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
20 changes: 20 additions & 0 deletions source/azure/activity-services/prerequisites/considerations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@
Considerations for configuration
================================

Reparse
-------

.. warning::

Using the ``reparse`` option will fetch and process all the logs from the starting date until the present. This process may generate duplicate alerts.

To fetch and process older logs, you need to manually run the module using the ``--reparse`` option.

The ``la_time_offset`` value sets the time as an offset for the starting point. If you don't provide an ``la_time_offset`` value, the module goes back to the date of the first file processed.

Find an example of running the module on a manager using the ``--reparse`` option. ``/var/ossec`` is the Wazuh installation path.

.. code-block:: console

# /var/ossec/wodles/azure/azure-logs --log_analytics --la_auth_path credentials_example --la_tenant_domain 'wazuh.example.domain' --la_tag azure-activity --la_query "AzureActivity" --workspace example-workspace --la_time_offset 50d --debug 2 --reparse

The ``--debug 2`` parameter gets a verbose output. This is useful to show the script is working, specially when handling a large amount of data.


Configuring multiple services
-----------------------------

Expand Down
Loading