Commit graph

408 commits

Author SHA1 Message Date
Eric
1fac823fa9
Website: Update Salesforce helepr to set an an Owner ID on all new records. (#19609)
Changes:
- Updated the update-or-create-contact-and-account helper to always set
the integrations admin user as the owner of new accounts and contact
records created.
2024-06-09 15:00:55 -05:00
Eric
da0268eec8
Website: Update Markdown headings (#19608)
Closes: #19606

Changes:
- Updated the `to-html` helper to add optional linebreaks to all
Markdown headings that contain an underscore.
2024-06-07 17:48:44 -05:00
Eric
d25c257db3
Website: update salesforce leads created by website (#19498)
Changes:
- Removed unused/unneeded values that are set on new lead records
created by the website
2024-06-05 17:00:27 -05:00
Eric
80a9ffeb69
Website: add step to the /start questionnaire for users who don't want to use Fleet (#19514)
Closes: https://github.com/fleetdm/confidential/issues/6287

Changes:
- Added a new page to the /start questionnaire where users can let us
know they're not interested in using Fleet.
2024-06-05 10:52:25 +09:00
Eric
9ea69df576
Website: add new usage statistics (#19315)
Closes: https://github.com/fleetdm/fleet/issues/19308

Changes:
- Added six new attributes to the `HistoricalUsageSnapshot` model (
`numSoftwareVersions`, `numHostSoftwares`, `numSoftwareTitles`,
`numHostSoftwareInstalledPaths`, `numSoftwareCPEs` and
`numSoftwareCVEs`)
- Added inputs to the receive-usage-analytics webhook for the new usage
statistics.


When this PR is merged, we will need to migrate the Fleet website's
database to add the new columns, to do this:
- [x] Make an announcement in Slack to let people know the website will
be offline for ~8 minutes
- [ ] Merge this PR
- [ ] As the deploy action runs, put the website into maintenance mode
- [ ] Add the new columns for the added attributes
- [ ] Set the default value for the new attributes on existing database
records
- [ ] After the deploy workflow is complete, take the website out of
maintenance mode.
2024-06-04 18:36:25 -05:00
Eric
f546ebe102
Website: uncomment MergeFreeze requests in GitHub webhook (#19449)
Closes: #19369

Changes:
- Re-enabled the requests to MergeFreeze in the receive-from-github
webhook
2024-06-03 10:44:02 -05:00
Eric
bf239ecc78
Website: Add site-wide CTA to bring users back to the /start questionnaire (#19393)
Closes: #18530

Changes: 
- Added a collapsable sitewide CTA to bring users who have not completed
the get started questionnaire back to the /start page.
- Added a new action (`account/updateStartCtaVisibility`) to set a
timestamp of when the CTA will be visible (not collapsed) in a user's
session when they close the CTA

---------

Co-authored-by: Mike Thomas <78363703+mike-j-thomas@users.noreply.github.com>
2024-05-31 18:44:13 -05:00
Mike McNeil
3df7a9232a
Website: Remove utm parameter stripping for now (#19425) 2024-05-31 14:31:21 -05:00
Eric
a28f0a9422
Website: disable MergeFreeze requests in receive-from-github webhook. (#19371)
Related to: https://github.com/fleetdm/fleet/issues/19369

Changes:
- Disabled the requests to MergeFreeze that unfreeze auto-approved PRs
when the main branch of the Fleet repo is frozen.
2024-05-30 11:19:55 -05:00
Roberto Dip
d98e1ecf27
allow to customize the signed CSR return type (#19213)
for #19027, this modifies the website to accept an `deliveryMethod` parameter to
respond with the signed CSR instead of delivering an email.

The current approach also maintains backwards compatibility:

**Response without `deliveryMethod` (unchanged except for custom headers)**

```
$ curl --insecure -v -H 'content-type: application/json' http://localhost:2024/api/v1/deliver-apple-csr -d '{"unsignedCsrData": "foo"}'
*   Trying [::1]:2024...
* Connected to localhost (::1) port 2024
> POST /api/v1/deliver-apple-csr HTTP/1.1
> Host: localhost:2024
> User-Agent: curl/8.4.0
> Accept: */*
> content-type: application/json
> Content-Length: 26
>
< HTTP/1.1 200 OK
< X-Powered-By: Sails <sailsjs.com>
< Cache-Control: no-cache, no-store
< X-Exit: success
< X-Exit-Description: Delivered email to specified email address with certificate signing request attached.
< Content-Type: text/plain; charset=utf-8
< Content-Length: 2
< ETag: W/"2-nOO9QiTIwXgNtWtBJezz8kv3SLc"
< Set-Cookie: sails.sid=s%3AqOZoNKY2CCZ6PFb9fIKaAjtiTKjB7Gum.9jodWIUG6DCNnXu%2Bn%2BF8cJmI%2Fn19Tk%2FdIkDPBl%2BILbI; Path=/; HttpOnly
< Date: Wed, 22 May 2024 18:23:16 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
<
* Connection #0 to host localhost left intact
OK
```

**Response with `deliveryMethod=json`**

```
$ curl --insecure -v -H 'content-type: application/json' http://localhost:2024/api/v1/deliver-apple-csr?deliveryMethod=json -d '{"unsignedCsrData": "foo"}'
*   Trying [::1]:2024...
* Connected to localhost (::1) port 2024
> POST /api/v1/deliver-apple-csr?alt=json HTTP/1.1
> Host: localhost:2024
> User-Agent: curl/8.4.0
> Accept: */*
> content-type: application/json
> Content-Length: 26
>
< HTTP/1.1 200 OK
< X-Powered-By: Sails <sailsjs.com>
< Cache-Control: no-cache, no-store
< Content-Type: application/json; charset=utf-8
< X-Exit: success
< X-Exit-Description: Delivered email to specified email address with certificate signing request attached.
< X-Exit-Output-Friendly-Name: RSS feed XML
< Content-Length: 26
< ETag: W/"1a-NnuclRv86ZEKA9WB967iUGlz84s"
< Set-Cookie: sails.sid=s%3AbpaKOTbNe4E911qH4z1-12ABGd_z2d2I.mAimDARoZgnq8zpJHcF95y8qFJXX0iky4Suj0HUKjpI; Path=/; HttpOnly
< Date: Wed, 22 May 2024 18:22:07 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
<
* Connection #0 to host localhost left intact
{"csr":"UEQ5NGJXdy4uLg=="}
```

# Checklist for submitter

- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Eric <eashaw@sailsjs.com>
2024-05-28 10:08:03 -03:00
Eric
02437a098e
Schema: change default block scalar used in schema override files (#19296)
Closes: #19271
Closes: #19286

Changes:
- Updated the example in the schema folder readme
- Updated the block scalar used in Fleet's osquery override
documentation (`>-` » `|-`) and removed extra newlines
- Updated the block scalar used in URLs used to create new yaml override
files
- Regenerated osqeury_fleet_schema.json
2024-05-27 18:18:56 -05:00
Eric
2af2c41572
Website: Update round robin in salesforce helpers & move lead creation to save-questionnaire-progress. (#19209)
Closes: #18932

Changes:
- Updated `update-or-create-contact-and-account.js` to not round robin
new account records created.
- Updated create-lead to reassign accounts owned by the integrations
admin user when a new lead is created.
- Updated logged warnings in signup, deliver-contact-form-message and
deliver-talk-to-us-form-submission.
- Updated signup.js to not create salesforce leads (only account and
contact records)
- Updated save-questionnaire-progress to create Salesforce leads when we
know the user has a use case for Fleet.
2024-05-27 16:43:40 -05:00
Nathanael Holliday
b1a18bc4a5
Remove former employee from receive-from-github.js (#19189)
Removed departed employee

---------

Co-authored-by: Sam Pfluger <108141731+Sampfluger88@users.noreply.github.com>
Co-authored-by: Sampfluger88 <sampfluger88@gmail.com>
2024-05-24 19:29:00 -05:00
Dale Ribeiro
21a6f3bfdb
Updated to include Dale (#19202)
Co-authored-by: Isabell Reedy <113355639+ireedy@users.noreply.github.com>
2024-05-22 12:41:58 -04:00
Eric
5261faaa11
Website: Update round robin in Salesforce helper (#19131)
Changes:
- Updated the update-or-create-contact-and-account helper to round-robin
existing accounts owned by an inactive Salesforce user
2024-05-17 18:14:22 -05:00
Eric
31f8c7e548
Website: Create new Salesforce helper, update contact form actions and signup action. (#19082)
Changes:
- Added a new helper:
`salesforce/update-or-create-contact-and-account-and-create-lead`, a
wrapper for the `update-or-create-contact-and-account` and `create-lead`
helpers that is intended to be run in the background.
- Updated the `signup`, `deliver-contact-form-message`, and
`deliver-talk-to-us-form-submission` actions to use the new helper
2024-05-16 15:38:09 -05:00
Savannah Friend
997d9c60b8
Added Username to receive-from-github.js (#18956)
.
2024-05-14 17:01:14 -05:00
Eric
cde4a61bd3
Website: requested changes from website review (#18923)
Changes:
- Moved the logic for redirecting users to the license dispenser after
they login/sign up into the page scripts for the login and register
pages.
- Updated error messages in the create lead helper
2024-05-10 16:33:45 -05:00
Eric
4ee1d0b736
Website: update receive-usage-analytics webhook (#18864)
Related to: https://github.com/fleetdm/fleet/issues/18863

Changes:
- Updated the receive-usage-analytics webhook to set a default value for
organization if a Fleet instance reports an empty string as its
organization.
2024-05-09 08:39:49 -05:00
Eric
6e1bb1b85b
Website: Fix assertion error in save-questionnaire-progress (#18818)
Related to: https://github.com/fleetdm/fleet/issues/18817

Changes:
- Updated a conditional statement in save-questionnaire-progress to
check the correct variable for a user's previous answer to the "Have you
ever used Fleet?" question
2024-05-07 16:46:00 -05:00
Eric
2990d09cb4
Website: update salesforce helper (#18789)
Changes:

- Updated the `update-or-create-contact-and-account` helper to actually
check the OwnerID of the returned account record (if one was found).
2024-05-06 20:51:03 -05:00
Eric
9e988cb216
Website: Fix round robin in update-or-create-contact-and-account.js. (#18788)
Changes:
- Fixed a conditional that was determining if existing account records
should be round-robined or not.
2024-05-06 19:51:21 -05:00
Eric
607ddbe8b1
Website: Update update-or-create-contact-and-account helper to round robin existing account records. (#18778)
Changes:
- Updated the `update-or-create-contact-and-account` helper to round
robin existing Account records assigned to the "Integrations admin"
user.
2024-05-06 15:17:49 -05:00
Mike McNeil
507ac65f8b
Website: Add missing pages to sitemap (#18762) 2024-05-06 07:16:36 -05:00
Eric
1cd0c6566c
Website: Create protocol and subdomain regex custom config & normalize LinkedIn urls (#18756)
Changes:
- Updated the regex used to match HTTP protocol and common subdomains in
the `get-enriched` helper to include more subdomains and changed it to a
custom config variable
(`sails.config.custom.RX_PROTOCOL_AND_COMMON_SUBDOMAINS`)
- Updated the update-or-create-contact-and-account helper to remove HTTP
protocol and subdomains from provided linkedIn URLs.
2024-05-03 18:51:31 -05:00
Mike McNeil
57b52204a9
Website: Update view-device-management.js (#18752)
Prioritize quotes that are directly about MDM on the MDM page.
2024-05-03 17:31:30 -05:00
Eric
b8793ee776
Website: Update save-questionnaire-progress (#18753)
Follow up PR to https://github.com/fleetdm/fleet/pull/18721.
2024-05-03 17:29:56 -05:00
Eric
7c3f029f78
Website: reduce time to submit steps of the /start questionnaire. (#18721)
Related to: https://github.com/fleetdm/confidential/issues/6357

Changes:
- wrapped the `updateOrCreateContactAndAccount` helper call in
`save-questionnaire-progress` in `setImmediate()` to allow users to
progress through the form without waiting for CRM updates.
2024-05-03 17:23:05 -05:00
Eric
3a15802944
Website: Update organization matching in get-enriched helper. (#18749)
Closes: https://github.com/fleetdm/confidential/issues/6381

Changes:
- Updated the get-enriched helper to improve enrichment results for
users whose provided organization is not the top experience listed on
their LinkedIn profile.
2024-05-03 16:09:05 -05:00
Rachael Shaw
5f442a8002
Tiny tweak to a comment (#18709)
Just making it a touch clearer why we're changing a key name/deleting a
key from the Open API response.
2024-05-02 17:39:39 -05:00
Mike McNeil
671ad9bf6a
Website: Update save-questionnaire-progress.js (#18697)
Eric, I did not test this (coded live w/ mike T). Relying on your eyes.
Also, remember remember the old legacy data that might need to be
migrated, especially since I added some assertions? (whuh ohhh)
2024-05-02 11:25:48 -05:00
Eric
ba229a153c
Website: Update save-billing-info-and-subscribe.js (#18708)
Closes: #18702

Changes:
- Removed the request to Zapier in save-billing-info-and-subscribe
2024-05-02 10:55:36 -05:00
Rachael Shaw
81a98ec54b
Update prompt for API endpoint to get human interpretation of osquery SQL (#18695)
When using this API many times in a row to try and populate real policy
descriptions/resolutions, I discovered a problem: the inferred
resolution (“What we’ll do”) almost never used decisive language, so
you'd get a lot of “probably”, etc., when we really want it to sound
more confident about what will happen during the maintenance window.
(The calendar events say what WILL happen to your device, not what
should probably happen.)

After several attempts to tweak the prompt, I ended up getting the best
results by just removing "probably" from
`whatWillProbablyHappenDuringMaintenance`. I made this change to the
prompt without changing the data that this API returns.

---------

Co-authored-by: Eric <eashaw@sailsjs.com>
2024-05-01 19:18:12 -05:00
Eric
f486abdf56
Website: Update /start questionnaire to add additional steps for users who don't want to self-host Fleet. (#18580)
Closes: https://github.com/fleetdm/confidential/issues/6268


Changes:
- Updated the questionnaire on the /start page to take users who answer
"I'd like you to host Fleet for me" on the "What did you think?" step to
the host count question.
- Updated the /start page script to handle this new behavior.
- Updated how psychologicalStage is set for users who answer the host
count question in `save-questionnaire-progress`.
- Updated `save-questionnaire-progress` to only call the salesforce
helper if the user's `psychologicalStage` changes.
2024-05-01 19:01:56 -05:00
Eric
806c88f006
Website: Add steps for users who deploy Fleet to /start questionnaire (#18661)
Changes:
- Added two steps to the /start questionnaire for users who select "I
want to deploy Fleet in my environment" on the "What did you think"
question.
- Updated save-questionnaire-progress to set psychologicalStage based on
selected answers to the new questions
2024-05-02 08:22:47 +09:00
Eric
63f8850877
Website: replace zapier request in signup.js with createLead() (#18688)
Closes: https://github.com/fleetdm/confidential/issues/6355

Changes:
- Replaced the reqeust to zapier in `signup.js` with
`sails.helpers.salesforce.createLead()`.
- Updated signup.js to only call the salesforce helpers when the website
is running in a production environment.
- Updated the `createLead` to handle errors when retrieving or creating
salesforce records, and to set a provided `numberOfHosts` and
`primaryBuyingSituation` on created lead records.
2024-05-01 16:25:12 -05:00
Gabe Lopez
d2ceb980fe
Update receive-from-github.js to add Gabe Lopez (PezHub) (#18685)
New hire!
2024-05-01 14:42:29 -04:00
Mike McNeil
c3f77aa116
Website: Clear personalization on logout (#18630) 2024-05-01 12:10:27 -05:00
Eric
8be31c263c
Website: update domain parsing and logged warnings in get-enriched helper. (#18644)
Changes:
- Changed the warnings in the get-enriched helper to use
`sails.log.info`.
- Updated the email domain parsing to handle protocol-less URLs returned
from Coresignal
2024-04-30 13:47:23 -05:00
Eric
a9f79eacd4
Website: Update zapier webhook request in signup action. (#18648)
Closes: #18643

Changes:
- Updated the response from the `updateOrCreateAccountAndContact` helper
when running the website in a development environment.
- Updated the Zapier webhook request in the signup action to send the
contact and account IDs returned from the
`updateOrCreateAccountAndContact` helper.
2024-04-30 13:38:38 -05:00
Eric
47362020ed
Website: reduce number of helper calls in save-questionnaire-progress (#18647)
Changes:
- Updated the conditional that decides whether or not to create/update
Salesforce records to check if a psychological stage changes.
2024-04-30 13:27:42 -05:00
Mike McNeil
c01d0ff82a
Website: If org name + email specified but no matches, try again (#18629) 2024-04-30 01:40:06 -05:00
Mike McNeil
8252320c3b
Fix 500 errors by ensuring organization exists (#18628) 2024-04-30 01:12:53 -05:00
Mike McNeil
cdbe6055d1
Website: Improve enrichment (#18627) 2024-04-30 01:03:59 -05:00
Eric
31c67130d4
Website: Update searchBy criteria in get-enriched helper (#18626)
Changes:
- Removed the organization name search in the get-enriched helper to
improve organization enrichment.
2024-04-29 23:37:09 -05:00
Eric
7259ec6473
Website: Update save-questionnaire-progress (#18625)
Related to https://github.com/fleetdm/confidential/issues/6357

Changes:
- Updated `save-questionnaire-progress` to only call
`sails.helpers.salesforce.updateOrCreateContactAndAccount` is called
when a user's `psychologicalStage` changes.
2024-04-29 19:20:00 -05:00
Mike McNeil
b09d34fa4b
Website: Quick and dirty fix for signups (#18622)
Eric, please test fully before merging, this is just the quick and dirty
cut.
2024-04-29 19:01:47 -05:00
Eric
2ba0f01502
Website: update personalization on homepage and endpoint ops (#18616)
Closes: https://github.com/fleetdm/confidential/issues/6336

Changes:
- Updated personalization on the homepage and the endpoint ops page
2024-04-29 16:40:57 -05:00
Eric
bde910a827
Website: Update get-enriched to return undefined. (#18614)
Changes:
- Updated the `iq/get-enriched` helper to return enrichment data as
undefined.
2024-04-29 16:29:23 -05:00
Eric
d74f5cd6ea
Website: Update psychologicalStage changes in save-questionnaire-progress.js (#18498)
Closes: https://github.com/fleetdm/confidential/issues/6215

Changes:
- Updated how psychological stages are set when a user completes a step
of the get started questionnaire

> Note: I'm creating this as a draft PR until I review these changes to
make sure this is what we want to do.
2024-04-26 12:42:48 -05:00