Commit Graph

75 Commits

Author SHA1 Message Date
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
Luke Heath
8dbe690026
Prepare v4.40.0 (#14940) 2023-11-06 16:49:21 -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
Benjamin Edwards
7e85292d67
introduce variables to restrict ipv6 access by cidr block for alb config (#14836)
# Checklist for submitter
- [X] Documented any API changes (docs/REST API/rest-api.md or
docs/Contributing/API-for-contributors.md)
- [X] Manual QA for all new/changed functionality
2023-10-31 15:21:22 -04:00
Benjamin Edwards
d76c9bf3c9
terraform module -- replace redis cidr (#14768)
🔧 refactor(byo-vpc/main.tf): replace hardcoded cidr_blocks value with
dynamic data from aws_subnet.redis to ensure the CIDR blocks are always
up-to-date and accurate
2023-10-30 16:27:14 -04:00
Robert Fairburn
aa843e7725
Initial windows-only mdm option in terraform addon module (#14639) 2023-10-27 07:09:20 -05:00
Luke Heath
653aeceb06
Prepare v4.39.0 (#14647) 2023-10-26 15:07:58 -05:00
Benjamin Edwards
4416393d57
Fix vuln scans terraform addon (#14357) 2023-10-11 11:03:47 -04:00
Roberto Dip
6702e3ddb8
prepare v4.38.1 (#14303) 2023-10-05 11:13:24 -05: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
Luke Heath
6807cfe897
Prepare v4.38.0 (#14123) 2023-09-25 16:43:52 -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
Luke Heath
a745c3a8a8
Prepare Fleet v4.37.0 (#13821) 2023-09-08 13:35:44 -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
Robert Fairburn
4017696ed6
terraform module examples to use example.com per style guide (#13709) 2023-09-05 11:18:44 -05:00
Robert Fairburn
1d0aa1f318
terraform module: some fixes for byo-vpc and below (#13553)
# 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 (docs/Using
Fleet/manage-access.md)
- [ ] 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-09-01 16:06:45 -05:00
Zachary Winnerman
ec0ecf2915
Adjust vuln scans (#13214) 2023-08-22 16:01:57 -07:00
Benjamin Edwards
14be5a0938
add helper command to terraform docs to discover module versions (#13359) 2023-08-17 19:30:34 -04: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
Zachary Winnerman
ac797c8f81
Fix variable consistency for optional in fleet_config (#12874)
# 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-20 14:33:15 -04:00
Benjamin Edwards
97a705af5d
fleet tf module config (#12304) 2023-06-22 21:06:59 -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
af8ea1eb2f
Use tags for our code (#11854)
# 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)).

See #11583
2023-05-22 14:07:09 -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
Robert Fairburn
9c8797eef2
Terraform module to use mysql reader endpoint by default (#11315) 2023-04-25 12:47:42 -05: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
Zachary Winnerman
0a3df86138
Add terraform version constraints (#11146)
# 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 #11144
2023-04-11 12:39:56 -04:00
Benjamin Edwards
6f836d60cb
add support for AWS SES email backend (#10847) 2023-04-06 13:21:07 -05:00
Zach Wasserman
70a429327f
Use proper name for ALB policy (#10889)
Fixes issue from #10887.
2023-03-30 11:15:30 -07:00
Zach Wasserman
24533da337
Require TLS 1.2 in Terraform ALB listener (#10887)
This should fix tfsec
https://aquasecurity.github.io/tfsec/v1.0.8/checks/aws/elb/use-secure-tls-policy/
by configuring
https://registry.terraform.io/modules/terraform-aws-modules/alb/aws/6.4.0#input_listener_ssl_policy_default.
2023-03-30 10:52:42 -07: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
Zachary Winnerman
e78554540f
Add ability to tag data containing resources (#10534)
# 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-16 14:10:42 -04:00
Robert Fairburn
b857fee61f
Terraform MDM make DEP/ABM optional (#10462) 2023-03-16 01:09:57 -05:00