Commit Graph

58 Commits

Author SHA1 Message Date
Benjamin Edwards
909420d453
add redirect parameter to wget command for geoip db download (#17738) 2024-03-20 14:20:35 -04:00
Robert Fairburn
c10c75cb83
Update monitoring terraform module to support multiple albs (saml-auth-proxy support) (#17631) 2024-03-14 13:42:48 -05:00
Robert Fairburn
654a53f488
Allow adjusting log retention on cron monitoring lambda logs (#17613) 2024-03-13 23:19:20 -05:00
Robert Fairburn
2f835e3e70
Mdm module naming (#17519) 2024-03-13 04:57:27 -05:00
Benjamin Edwards
f57a6bafad
migrator addon vuln service compatibility (#17430)
initial pass after pairing session -- not yet tested but wanted to get
early feedback
2024-03-11 13:19:05 -04:00
Benjamin Edwards
fc567cea2a
osquery carve update (#17426) 2024-03-06 13:38:35 -05:00
Benjamin Edwards
03873f6dcc
include all secrets in vuln task (#17033)
this change should fix the issue of vuln task interfering with MDM
settings.
2024-02-21 11:40:09 -05:00
Benjamin Edwards
9ba0dafa94
vuln processing as distinct service (#16544)
create a distinct service to managed vulnerability processing
2024-02-09 13:58:28 -05:00
Robert Fairburn
6c84209b73
Update migrations to scale down services before migrating (#15908) 2024-01-04 14:33:35 -06:00
Robert Fairburn
255bcd8002
GeoLite2 addon for Dogfood and Cloud (#15643) 2023-12-14 13:22:11 -06:00
Benjamin Edwards
eb7f838125
firehose addon module updates (#15439) 2023-12-07 19:24:03 -05:00
Martin Angers
8b7d1a7e47
Remove Windows MDM feature flag (#15167)
For #14959 

---------

Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com>
2023-12-07 14:24:32 -03:00
Robert Fairburn
ccd7ae82e5
Ensure CGO_ENABLED=0 is forced for cron_monitoring lambda (#15201) 2023-11-22 11:12:09 -06:00
Benjamin Edwards
29de567dc0
add module to enable bringing your own bucket file carving destination (#15206)
This PR adds support for a new terraform module that will make it easy
to configure Fleet instances for S3 backend for file carving results.
Its intended to be applied in two phases.

1) apply target-account which will provision the s3 bucket, IAM role and
policy permissions
2) apply carve on the fleet instance, bootstrapping environment
variables for Fleet server & attaching the IAM policy.

# Checklist for submitter
- [X] Manual QA for all new/changed functionality
2023-11-20 11:26:43 -05:00
Robert Fairburn
7b1ea9cdf1
Terraform aws provider v5 fixes for terraform modules (#15159) 2023-11-15 23:50:38 -06:00
Robert Fairburn
91063d8385
Terraform addon monitoring fix (#14994)
Fixes a problem with concurrency inside of an aws account (multiple
fleets using the monitoring module).
2023-11-07 10:59:26 -06:00
Robert Fairburn
df3fd028cf
Simple fix for mdm module (#14885)
Since this was missing on the outputs, it broke apple mdm secret
population in existing implementations. This should re-assert backwards
compatibility.
2023-11-03 10:27:54 -05:00
Robert Fairburn
7b31344988
Dogfood github actions and monitoring module fixes (#14875)
These items fix the github action for use with the updates to the
monitoring module.

Additionally there were some changes needed to the monitoring module to
make it behave inside the GH action.

Once this is approved/merged, the new tag for them monitoring module
will be created as `tf-mod-addon-monitoring-v1.1.1`
2023-11-01 16:34:13 -05:00
Robert Fairburn
b74f2c059c
initial fleet-cron monitoring script (#14579) 2023-11-01 12:01:02 -05:00
Robert Fairburn
aa843e7725
Initial windows-only mdm option in terraform addon module (#14639) 2023-10-27 07:09:20 -05:00
Benjamin Edwards
4416393d57
Fix vuln scans terraform addon (#14357) 2023-10-11 11:03:47 -04:00
Robert Fairburn
4d5902108d
Update saml-auth-proxy addon to output its secret_id (#14231)
This is needed to automatically populate the secret from outside of the
module with an `aws_secretsmanager_secret_version`
2023-10-02 10:57:58 -05:00
Robert Fairburn
0f4e24a40a
Initial saml-auth-proxy code. (#14017) 2023-09-28 12:48:57 -05:00
Scott Blake
22e75a2f9b
Allows deletion and recreation in under 7 days (#13454)
# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [ ] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [ ] Added/updated tests
- [ ] Manual QA for all new/changed functionality

This changes the behavior of Secrets Manager resources to prevent the
minimum scheduled deletion time of 7 days to allow for more rapid
terraform destroy and apply scenarios.

Co-authored-by: Robert Fairburn <8029478+rfairburn@users.noreply.github.com>
2023-09-10 13:00:53 -05:00
Robert Fairburn
272cc8e88b
Update terraform module Windows MDM vars (#13749)
This updates the MDM vars to the proper `_BYTES` names
2023-09-06 11:56:33 -05:00
Zachary Winnerman
ec0ecf2915
Adjust vuln scans (#13214) 2023-08-22 16:01:57 -07:00
Zachary Winnerman
42b1951ea7
fixup (#13209)
# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [ ] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)
- [ ] Documented any permissions changes
- [ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.
- [ ] Added/updated tests
- [ ] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2023-08-08 15:55:21 -04:00
Zachary Winnerman
004cc0d3cd
Add external vuln scans addon (#13206)
# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [ ] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)
- [ ] Documented any permissions changes
- [ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.
- [ ] Added/updated tests
- [ ] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2023-08-08 14:38:20 -04:00
Zachary Winnerman
0baf8441c6
see https://github.com/fleetdm/confidential/issues/3166#issuecomment-… (#12940)
…1648567704

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [ ] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)
- [ ] Documented any permissions changes
- [ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.
- [ ] Added/updated tests
- [ ] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2023-07-24 16:53:29 -04:00
Zachary Winnerman
e7f4441f7b
fixup (#12939)
# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [ ] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)
- [ ] Documented any permissions changes
- [ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.
- [ ] Added/updated tests
- [ ] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2023-07-24 16:11:03 -04:00
Zachary Winnerman
7eecb4ac90
Add Windows MDM variables to the MDM terraform mdoule and update dogfood (#12938)
https://github.com/fleetdm/confidential/issues/3166
2023-07-24 15:49:30 -04:00
Benjamin Edwards
4156859b90
feat(outputs.tf): add FLEET_FIREHOSE_AUDIT_STREAM environment variable (#12415)
forgot to add the env variable
2023-06-20 22:55:43 -04:00
Robert Fairburn
7370e80fd7
Update terraform logging addon (#12339)
This should allow us to pass in policies for kms and both s3 buckets.
This is needed in order to allow for the new sns alerting lambda to
query athena for 5xx errors.
2023-06-14 19:01:13 -05:00
Robert Fairburn
cfe59b169e
remove s3 acl from terraform/addons/logging-alb (#12169)
Fixes "the bucket does not allow acls". If it doesn't allow them, then
don't make one.

Validated logging still works.
2023-06-06 14:42:04 -04:00
Benjamin Edwards
806e6b9887
terraform module -- firehose audit logs (#11710)
Add support for Fleet audit logs by adding a new variable
`firehose_audit_name` to the `firehose` module. If the variable is set,
a new delivery stream is created for Fleet audit logs. The IAM role is
updated to allow writing to the new delivery stream. The `outputs.tf`
file is updated to include the new environment variable
`FLEET_ACTIVITY_ENABLE_AUDIT_LOG` and `FLEET_ACTIVITY_AUDIT_LOG_PLUGIN`
to the `fleet_extra_environment_variables` output. The `firehose_policy`
in `firehose.tf` is updated to allow writing to the new delivery stream.
The `firehose_audit` policy is created and attached to the IAM role if
the `firehose_audit_name` variable is set.

---------

Co-authored-by: Robert Fairburn <8029478+rfairburn@users.noreply.github.com>
2023-05-31 15:02:22 -04:00
Benjamin Edwards
052dcb7b50
update deploying on terraform guide to be module based, update terraf… (#11847) 2023-05-30 20:11:06 -04:00
Zachary Winnerman
3a43c1ebc2
Add waf to dogfood (#11541)
# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [ ] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)
- [ ] Documented any permissions changes
- [ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.
- [ ] Added/updated tests
- [ ] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).

Closes #10716
2023-05-05 12:06:16 -04:00
Benjamin Edwards
3fc78e0e3c
firehose module update (#11444) 2023-05-01 17:38:18 -04:00
Benjamin Edwards
9a2581e1d6
fix firehose addon take 2 (#11369)
rename aws_iam_policy and aws_iam_policy_attachment resources to use
underscore instead of hyphen in their names. Also, change
aws_iam_policy_attachment to aws_iam_role_policy_attachment to match the
correct resource type.
2023-04-26 23:08:09 -04:00
Benjamin Edwards
1208c0151e
BYO-Firehose module updates (#11333)
feat(firehose): add Terraform documentation to README.md
feat(firehose): add Terraform module for IAM policy
feat(firehose): add Terraform output for IAM policy ARN

docs(byo-firehose-logging-destination): add introduction and explanation
of IAM role and policy

This commit adds an introduction and explanation of the IAM role and
policy defined in the Terraform code. Specifically, it explains that the
IAM role named `fleet_role` is being defined in the AWS account, and
that it will be assumed by the Fleet application being hosted. The
commit also explains that the IAM role is being given specific
permissions to perform certain actions on the Firehose service, and that
the associated IAM policy specifies the minimum allowed permissions.
Additionally, the commit explains that the Firehose service is KMS
encrypted, and that the IAM role needs permission to the KMS key being
used to encrypt the data going into Firehose. Finally, the commit
explains that the code sets up a secure and controlled environment for
the Fleet application to perform its necessary actions on the Firehose
service within the AWS account.

refactor(byo-firehose-logging-destination): reformat table of resources
and inputs
feat(byo-firehose-logging-destination): add KMS key resource for
firehose encryption
feat(byo-firehose-logging-destination): add S3 bucket resource for
logging destination
feat(byo-firehose-logging-destination): add IAM policy and role
resources for firehose
feat(byo-firehose-logging-destination): add IAM policy attachment
resource for fleet-firehose policy
feat(byo-firehose-logging-destination): add data source for current AWS
region
feat(byo-firehose-logging-destination): add data source for KMS alias
feat(byo-firehose-logging-destination): add data source for IAM policy
documents
feat(byo-firehose-logging-destination): add outputs for firehose IAM
role, delivery streams, and S3 bucket

fix(iam.tf): change aws_iam_policy and aws_iam_policy_attachment
resource names to include fleet prefix

closes https://github.com/fleetdm/fleet/issues/11331
2023-04-26 12:00:42 -04:00
Benjamin Edwards
9c594fba21
feat(terraform): add zone_id variable to ses module (#11196)
The zone_id variable is added to the ses module to allow the module to
be used with different Route53 zones. The variable is used in the
aws_route53_record resource to set the zone_id attribute. The
aws_route53_zone data source is removed from the module and the zone_id
attribute is set directly. The count attribute is added to the
aws_route53_record resource to allow for multiple DKIM records to be
created.
2023-04-17 17:04:51 -04:00
Scott Blake
a6b6f77b08
Fix a typo (#11227) 2023-04-17 15:58:22 -05:00
Benjamin Edwards
6f836d60cb
add support for AWS SES email backend (#10847) 2023-04-06 13:21:07 -05:00
Benjamin Edwards
4161ee5679
create vuln processing addon (#10526)
two things here:

1. create addon for use in new modular terraform
2. create vuln processing terraform for legacy terraform, but by default
its disabled
2023-03-29 08:57:10 -04:00
Luke Heath
1265ff4b7d
Remove the MDM feature flags (#10825) 2023-03-28 17:12:16 -05:00
Robert Fairburn
def04c5833
Fix terraform logging addon-module and apply to dogfood (#10712) 2023-03-23 11:23:14 -05:00
Robert Fairburn
b857fee61f
Terraform MDM make DEP/ABM optional (#10462) 2023-03-16 01:09:57 -05:00
Zachary Winnerman
2933a7bdaa
Add ability to use sidecars (#10287)
# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [ ] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)
- [ ] Documented any permissions changes
- [ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.
- [ ] Added/updated tests
- [ ] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2023-03-03 13:50:48 -05:00
Robert Fairburn
e760ce4ac5
Separate monitoring notifications per alert (#10032) 2023-02-22 21:25:25 -06:00
Benjamin Edwards
c1a7b565f1
output arn & id for mdm secrets (#10046)
add outputs to mdm module to make it simple to utilize downstream
2023-02-22 21:37:46 -05:00