Commit graph

269 commits

Author SHA1 Message Date
Eric
4fd1efe98a
Website: Add API to send signed CSR emails (#8408)
This pull request relies on the `mdm-gen-cert` command from
https://github.com/fleetdm/fleet/pull/8884.
Closes: https://github.com/fleetdm/fleet/issues/8223

Changes:
- Updated the deploy Fleet website workflow to:
   - Add Go as a dependency
   - Build the mdm-gen-cert binary in `/website/.tools/`
   - add the `/.tools/` folder to the Heroku app
- Added `deliver-apple-csr.js` -  an API that:
- can be called by making a `POST` request to
`/api/v1/deliver-apple-csr`
   - accepts `csr` as an input
- runs the `mdm-gen-cert` command with the `csr` set as an environment
variable
- returns an `invalidEmailDomain` response if the user's email domain is
in the array of banned email domains.
- saves the users organization and email address to the website's
database
- Sends an email to the requesting user's email address with the signed
CSR attached as a text file named `apple-apns-request.txt`
   - Posts a message to a channel in the Fleet Slack.
- Added a new model: `CertificateSigningRequests` that contains two
required attributes: `emailAddress` and `organization`
- Added a new email template `email-signed-csr-for-apns`
- Updated routes, policies, eslintrc, and rebuilt cloud-sdk


Before this can be merged, we will need to:
- [x] Add new config variables in Heroku
   - [x] `sails.config.custom.mdmVendorCertPem` 
   - [x] `sails.config.custom.mdmVendorKeyPem`
   - [x] `sails.config.custom.mdmVendorKeyPassphrase`
   - [x] `sails.config.custom.slackWebhookUrlForMDMSignups`
- [x] Add the `CertificateSigningRequests` model to the website's
database
2023-01-19 14:43:14 -06:00
Luke Heath
b6a6ac454f
Prepare for 4.26.0 (#9326) 2023-01-13 16:26:22 -08:00
Eric
47d43d5307
Website: fix failing GitHub workflows (#9285)
Changes:
- Updated the `build-static-content` script to use a GitHub API token
for requests if one is provided e.g., `sails run build-static-content
--githubAccessToken="foo"`
- Updated the `build-for-prod` npm script to run the
`build-static-content` script with a variable named `BUILD_SCRIPT_ARGS`.
- Updated the "Deploy Fleet website" and "Test Fleet website" workflows
to run the `build-for-prod` script with a GitHub API token
. .

Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2023-01-11 13:31:20 -06:00
Lucas Manuel Rodriguez
ac22aadc13
Fleet server and tooling to use NETWORK_TEST_GITHUB_TOKEN when environment variable is set. (#9143)
* WIP

* Add more logging

* Check rate limit at end of action

* Add github client in more places

* Add new published firefox 93 vulnerabilities to tests

* Remove fmt printfs

* Restore CI check settings

* Readd newline
2023-01-03 14:56:11 -03:00
Zach Wasserman
33c0cb990d
Test larger runner for E2E test action (#9066) 2022-12-23 09:37:03 -08:00
Luke Heath
54e8b3e250
Prepare for 4.25.0 (#9113) 2022-12-22 15:13:24 -08:00
Zach Wasserman
e941adfaaa
Use ubuntu-20.04 runner for Fleet build (#9114)
A customer had a seccomp profile that seemed to be incompatible with the
changes in glibc in ubuntu-22.04. Setting the builder back to 20.04
explicitly to resolve this issue.
2022-12-22 14:48:41 -08:00
Eric
98c2ef98f7
Update test-website.yml (#9042) 2022-12-21 10:29:56 -06:00
Marcos Oviedo
605ae861c9
Windows installer now ensures that legacy osquery installations gets removed during clean install (#9048)
This relates to #8891.

This PR introduces Wix custom actions usage.
2022-12-19 16:06:44 -08:00
Tomas Touceda
45e0a14700
Add quay push (#8967)
* Add quay push to the snapshot pusher to start

* Tags need to be just the tag part in this one

* Put the tag in a variable

* Fix typos

* Switch up how we define registry to see if it finds the image like this

* Add quay push everywhere else
2022-12-12 14:15:06 -03:00
Tomas Touceda
71dbb71df4
Update go to 1.19.4 (#8945)
* Update go to 1.19.4

* Comment out failing package test

* Comment out ALL the packaging tests for windows for the moment

* Update go to 1.19.4

* Comment out failing package test

* Comment out ALL the packaging tests for windows for the moment

* Update changelog

* Bump versions

* Update changelog to reflect this being a security release
2022-12-09 11:47:17 -03:00
Robert Fairburn
41feacad4d
Fix confusion with tags on dogfood deploy workflow (#8964)
* Fix confusion with tags on dogfood deploy workflow

* Update .github/workflows/dogfood-deploy.yml

Co-authored-by: Michal Nicpon <39177923+michalnicp@users.noreply.github.com>

Co-authored-by: Michal Nicpon <39177923+michalnicp@users.noreply.github.com>
2022-12-08 12:11:33 -06:00
Michal Nicpon
10b3179b63
Add fleetctl generate mdm-apple (#8812) 2022-12-07 18:24:42 +01:00
Roberto Dip
743ac46a09
disable fleetctl preview tests on macos (#8911) 2022-12-02 11:29:38 -03:00
Marcos Oviedo
ff9206655a
Fixing UninstallString to properly include msiexec /x call (#8857)
* Fixing UninstallString to properly include msiexec /x call
2022-11-28 20:18:28 -03:00
Zach Wasserman
efbe4c0777
Update Go to 1.19.3 (#8525) (#8614)
Co-authored-by: Tomas Touceda <chiiph@gmail.com>
2022-11-08 13:03:23 -03:00
Zach Wasserman
875df496b1
Generate targets for osqueryd 5.6.0 (#8355) 2022-11-07 15:15:52 -08:00
Zach Wasserman
1920e64b93
Update Desktop version to 1.3.1 (#8397) 2022-11-07 15:15:21 -08:00
Luke Heath
8fb57d365b
Remove cypress dashboard (#8518) 2022-11-01 10:32:30 -05:00
Roberto Dip
e5f38f0015
fix integration.yml CI workflow by setting a Go version (#8516)
We don't have a `matrix.go-version` defined, so the task was using
`go1.17.13` as the default.

This explicitly sets the version to `go1.19.1`, I didn't use a `matrix`
definition because at least for now, we only want to run this test using a
single Go version.

Since I was there, I also updated test-native-tooling-packaging.yml to
use `go1.19.1` too.
2022-11-01 09:34:52 -03:00
Eric
a5ba469e41
update build-storybook step (#8503) 2022-10-31 14:02:29 -05:00
Guillaume Ross
75a9419412
8241 trivy ignore file action (#8345)
* Create .trivyignore

Adding original trivy ignore file. Working to resolve/document more of the findings, especially around go.mod. Will add a github action as well.

* Adding default trivy scan for testing

* Update trivy_scan.yml

Making it manual + daily for now

* Update trivy_scan.yml

updating name

* Renamed + configured Trivy scan
2022-10-31 10:50:29 -04:00
Eric
149a908b82
move build-storybook step (#8492) 2022-10-31 09:19:20 -05:00
Roberto Dip
96014148a8
run apt update before installing packages in golangci-lint (#8487) 2022-10-31 09:43:26 -03:00
Eric
c6698e242f
Website: Add storybook to Fleet website (#8203)
* Add build storybook to deploy website workflow

* add assets/storybook folder to .gitignore & .eslintIgnore

* Revert changes to website/.gitignore

* revert whitespace change

* Update deploy-fleet-website.yml
2022-10-28 19:48:14 -05:00
Marcos Oviedo
131cc7eeec
Orbit MSI installer now includes the necessary manifest file to use windows_event_log as a logger_plugin. (#8343)
* Orbit MSI installer now includes the necessary manifest file to use windows_event_log as a logger_plugin
2022-10-27 10:19:30 -03:00
Marcos Oviedo
8b77939494
Fixed an Orbit MSI installer bug that caused Orbit files not to be removed during uninstallation (#8333) 2022-10-25 09:00:37 -03:00
Michal Nicpon
56f3cb62ef
add concurrency to ci (#8271)
* add concurrency to ci

* add readme for workflows
2022-10-24 14:01:00 -06:00
Lucas Manuel Rodriguez
2bb7661b91
Update Fleet Desktop version to 1.3.0 (#8202) 2022-10-21 09:58:03 -07:00
Marcos Oviedo
ec3f49881f
8009 fleet desktop icon duplication (#8017)
* Adding a new synchronization mechanism between fleet-desktop app and Orbit service. Improved windows service teardown to ensure that fleet-desktop does not get force killed without getting signaled. Improved windows process enumeration to avoid unnecessary delays during windows service start and windows service teardown. Updating windows service to reflect service teardown extra time due to synchronization.
2022-10-13 10:58:37 -03:00
Lucas Manuel Rodriguez
bec3824ddb
Update mk-ca-bundle.pl tool in repository (#8184)
* Update mk-ca-bundle.pl in repository

* Update certs.pem with new version of mk-ca-bundle.pl

* Add extra check against curl.se site
2022-10-12 12:01:18 -03:00
Roberto Dip
174f894b53
fix migration order check by only checking additions (#8172)
this modifies the migration order CI check to only check for added files
by:

1. Escaping the blob we give to git, so bash doesn't perform expansion,
   this lets git handle the blob matching, which for reasons I don't
   fully understand allows to find file renames.
2. Applying `--diff-filter=A`, which makes git only list file additions.
2022-10-11 16:31:40 -03:00
Roberto Dip
2bb4ec2e6d
add script to check for migration order (#7803)
Related to #6142, this adds a CI check for the order of migrations.

As I noted in a comment on the workflow file, it's important to keep in mind that some migrations might still go unnoticed even with this check, example:

1. PR1 adds a migration, CI check pass
2. PR2 adds a migration, CI pass, gets merged
3. PR1 can still be merged because the CI checks aren't run again

The check will fail in `main` however, so if we find the current script to be reliable, we could setup a Slack ping or something similar, to make sure somebody takes a look
2022-10-11 15:36:15 -03:00
dependabot[bot]
35ae71502f
Bump actions/setup-go from 3.2.1 to 3.3.0 (#7470)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3.2.1 to 3.3.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](84cbf80943...268d8c0ca0)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-10 18:55:13 -03:00
Michal Nicpon
9056b22874
set default shell in workflows (#8108)
* wait for mysql in workflows
2022-10-07 09:43:56 -06:00
Lucas Manuel Rodriguez
127d18642d
Run TUF CI checks on ubuntu-latest (#8088)
* Run TUF CI checks on ubuntu-latest

* Add itself to path
2022-10-05 19:59:11 -03:00
Martin Angers
ec75fb10b2
Fix CI tests for Go (#8079) 2022-10-04 15:48:14 -04:00
Eric
fba863f1e1
Update test-website.yml (#8076) 2022-10-04 12:52:00 -05:00
Zach Wasserman
44dc5ab175
Add handling for Apple Team ID in Notarization (#7991)
Fleet's Notarization workflows no longer work without this argument, so this is added as an optional argument for Notarization.
2022-10-04 09:48:21 -07:00
Guillaume Ross
e48fbad3ac
Adding the schema path to the fleet website deployment workflow (#8063) 2022-10-03 12:20:30 -04:00
Zachary Winnerman
7e69a34f51
Make the github action fail if used on the main branch (#7967) 2022-09-29 17:30:47 +00:00
Martin Angers
7356378d0f
Update hashicorp/aws provider version for loadtesting and add CI validation (#7937)
* Update hashicorp/aws provider version for loadtesting and add CI validation

* Update name of the new workflow
2022-09-28 09:38:56 -05:00
Zach Wasserman
a106e1af83
Update Fleet Desktop version (#7961) 2022-09-27 19:22:40 -07:00
Zach Wasserman
855cca9368
Update notarization to use notarytool (#7962)
Updating from github.com/mitchellh/gon (old API) to the newer xcrun notarytool.

See https://github.com/fleetdm/fleet/actions/runs/3132173324/jobs/5084249006 for example run.
2022-09-27 08:25:42 -07:00
Marcos Oviedo
381f628be7
Bug 7874: Adding SCM calls to register Orbit as a windows service (#7934)
* Bug 7874: Adding SCM calls to register Orbit as a windows service
2022-09-27 11:52:41 -03:00
Martin Angers
84903deffb
Remove gotestfmt formatting on CI (#7939) 2022-09-26 11:37:21 -04:00
Gabriel Hernandez
fca5ad3158
add edit agent options activity text (#7695) 2022-09-23 12:05:07 -04:00
Luke Heath
a6dd4c3d0c
Add Cypress dashboard to CI (#7899) 2022-09-22 13:52:22 -05:00
Lucas Manuel Rodriguez
1a6380d590
Fix deprecated virtual runner and golangci-lint deprecated checkers (#7716) 2022-09-13 10:48:21 -03:00
Tomas Touceda
8457e55b53
Bump go to 1.19.1 (#7690)
* Bump go to 1.19.1

* Bump remaining go-version to the 1.19.1

* Add extra paths for test-go

* Oops, putting the right path in the right place

* gofmt file

* gofmt ALL THE THINGS

* Moar changes

* Actually, go.mod doesn't like minor versions
2022-09-12 20:32:43 -03:00