From 4a6bf0d447a2080f994da1e2f36ce6d51db88109 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 20 Oct 2023 13:59:18 -0500 Subject: [PATCH] 2023-10-24 Website: Update /try-fleet (#14638) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://github.com/fleetdm/confidential/issues/4015 Changes: - Changed the url for `/fleetctl-preview` to `/try-fleet/fleetctl-preview` - Updated the controller for the `/fleetctl-preview` page to redirect non-logged-in users to `/try-fleet/login` - Removed the route for `/try-fleet/sandbox-expired`, and added a redirect going to `/try-fleet/fleetctl-preview`. - Updated the controller for `/try-fleet/sandbox` to redirect the users without a non-expired Sandbox instance to `/try-fleet/fleetctl-preview`. - Updated `signup.js` to not provision Fleet sandbox instances for users. - Updated the `User` model to support a third `signupReason`: "Try Fleet" - Updated `/try-fleet/register` to submit "Try Fleet" as a `signupReason` when users sign up. - Renamed the files for the `/fleetctl-preview` page (`get-started` » `fleetctl-preview`) - Updated/removed Fleet Sandbox related handbook sections. - Replaced the "Fleet vs Fleet Sandbox" section in the deploying documentation with a note about `fleetctl preview`. - Updated links to Fleet Sandbox in articles. --------- Co-authored-by: Mike Thomas <78363703+mike-j-thomas@users.noreply.github.com> --- articles/end-user-self-remediation.md | 2 +- ...ery-and-enroll-linux-devices-into-fleet.md | 4 +- ...ery-and-enroll-macos-devices-into-fleet.md | 4 +- ...y-and-enroll-windows-devices-into-fleet.md | 4 +- ...andbox-the-fastest-way-to-play-with-fleet} | 0 ...y-ask-questions-about-operating-systems.md | 2 +- .../osquery-as-a-threat-hunting-platform.md | 2 +- docs/Deploy/Introduction.md | 8 +- handbook/company/communications.md | 2 +- handbook/company/why-this-way.md | 2 +- handbook/customers/README.md | 15 +-- handbook/engineering/README.md | 7 +- website/api/controllers/download-sitemap.js | 1 - website/api/controllers/entrance/signup.js | 119 +++--------------- .../controllers/try-fleet/view-register.js | 1 + ...or-redirect-because-expired-or-waitlist.js | 25 ++-- .../api/controllers/view-fleetctl-preview.js | 36 ++++++ website/api/controllers/view-get-started.js | 27 ---- website/api/models/User.js | 5 +- ...arted.page.js => fleetctl-preview.page.js} | 2 +- .../js/pages/try-fleet/register.page.js | 6 +- .../js/pages/try-fleet/sandbox-login.page.js | 1 + website/assets/styles/importer.less | 2 +- ...get-started.less => fleetctl-preview.less} | 2 +- website/config/policies.js | 2 +- website/config/routes.js | 25 ++-- website/views/layouts/layout-customer.ejs | 2 +- website/views/layouts/layout-sandbox.ejs | 2 +- website/views/layouts/layout.ejs | 2 +- .../{get-started.ejs => fleetctl-preview.ejs} | 2 +- 30 files changed, 104 insertions(+), 210 deletions(-) rename articles/{introducing-sandbox-the-fastest-way-to-play-with-fleet.md => introducing-sandbox-the-fastest-way-to-play-with-fleet} (100%) create mode 100644 website/api/controllers/view-fleetctl-preview.js delete mode 100644 website/api/controllers/view-get-started.js rename website/assets/js/pages/{get-started.page.js => fleetctl-preview.page.js} (96%) rename website/assets/styles/pages/{get-started.less => fleetctl-preview.less} (97%) rename website/views/pages/{get-started.ejs => fleetctl-preview.ejs} (99%) diff --git a/articles/end-user-self-remediation.md b/articles/end-user-self-remediation.md index e436787e5..f2ea827b2 100644 --- a/articles/end-user-self-remediation.md +++ b/articles/end-user-self-remediation.md @@ -110,7 +110,7 @@ There’s no one-size-fits-all approach for successful end user self-remediation The benefits of self-remediation go beyond security. By making computer problems more approachable, you’ll empower employees to be more confident end users. So, they might be more inclined to troubleshoot issues before making a request. -See how easy implementing end user self-remediation can be. [Sign up for Sandbox](https://fleetdm.com/try-fleet/register) to try Fleet on your device for free. +See how easy implementing end user self-remediation can be. [Try `fleetctl preview`](https://fleetdm.com/try-fleet/register) to test Fleet on your device for free. diff --git a/articles/how-to-install-osquery-and-enroll-linux-devices-into-fleet.md b/articles/how-to-install-osquery-and-enroll-linux-devices-into-fleet.md index 856dd447a..3690cce64 100644 --- a/articles/how-to-install-osquery-and-enroll-linux-devices-into-fleet.md +++ b/articles/how-to-install-osquery-and-enroll-linux-devices-into-fleet.md @@ -1,9 +1,7 @@ # How to install osquery and enroll Linux devices into Fleet Here, we will cover enrolling Linux devices to an existing Fleet server. If you don’t have a Fleet -server configured already, check out [Deploying Fleet on Render](https://fleetdm.com/deploy/deploying-fleet-on-render). If you’re still getting to know -Fleet -and would like to skip the server setup process and try Fleet, you can [try Fleet in a temporary cloud instance](https://fleetdm.com/try-fleet/register). +server configured already, check out [Deploying Fleet on Render](https://fleetdm.com/deploy/deploying-fleet-on-render). If you’re still getting to know Fleet and would like to skip the server setup process and try Fleet, you can [run Fleet in a preview environment](https://fleetdm.com/try-fleet/register). ## Prerequisites diff --git a/articles/how-to-install-osquery-and-enroll-macos-devices-into-fleet.md b/articles/how-to-install-osquery-and-enroll-macos-devices-into-fleet.md index 20c7483bc..9c0ce165a 100644 --- a/articles/how-to-install-osquery-and-enroll-macos-devices-into-fleet.md +++ b/articles/how-to-install-osquery-and-enroll-macos-devices-into-fleet.md @@ -1,9 +1,7 @@ # How to install osquery and enroll macOS devices into Fleet Here, we will cover enrolling macOS devices to an existing Fleet server. If you don’t have a Fleet -server configured already, check out [Deploying Fleet on Render](https://fleetdm.com/deploy/deploying-fleet-on-render). If you’re still getting to know -Fleet -and would like to skip the server setup process and try Fleet, you can [try Fleet in a temporary cloud instance](https://fleetdm.com/try-fleet/register). +server configured already, check out [Deploying Fleet on Render](https://fleetdm.com/deploy/deploying-fleet-on-render). If you’re still getting to know Fleet and would like to skip the server setup process and try Fleet, you can [run Fleet in a preview environment](https://fleetdm.com/try-fleet/register). ## Prerequisites diff --git a/articles/how-to-install-osquery-and-enroll-windows-devices-into-fleet.md b/articles/how-to-install-osquery-and-enroll-windows-devices-into-fleet.md index de7aed4c6..e900fe528 100644 --- a/articles/how-to-install-osquery-and-enroll-windows-devices-into-fleet.md +++ b/articles/how-to-install-osquery-and-enroll-windows-devices-into-fleet.md @@ -1,9 +1,7 @@ # How to install osquery and enroll Windows devices into Fleet Here, we will cover enrolling Windows devices to an existing Fleet server. If you don’t have a Fleet -server configured already, check out [Deploying Fleet on Render](https://fleetdm.com/deploy/deploying-fleet-on-render). If you’re still getting to know -Fleet -and would like to skip the server setup process and try Fleet, you can [try Fleet in a temporary cloud instance](https://fleetdm.com/try-fleet/register). +server configured already, check out [Deploying Fleet on Render](https://fleetdm.com/deploy/deploying-fleet-on-render). If you’re still getting to know Fleet and would like to skip the server setup process and try Fleet, you can [run Fleet in a preview environment](https://fleetdm.com/try-fleet/register). ## Prerequisites diff --git a/articles/introducing-sandbox-the-fastest-way-to-play-with-fleet.md b/articles/introducing-sandbox-the-fastest-way-to-play-with-fleet similarity index 100% rename from articles/introducing-sandbox-the-fastest-way-to-play-with-fleet.md rename to articles/introducing-sandbox-the-fastest-way-to-play-with-fleet diff --git a/articles/osquery-a-tool-to-easily-ask-questions-about-operating-systems.md b/articles/osquery-a-tool-to-easily-ask-questions-about-operating-systems.md index e4ec521f7..3fb2742b4 100644 --- a/articles/osquery-a-tool-to-easily-ask-questions-about-operating-systems.md +++ b/articles/osquery-a-tool-to-easily-ask-questions-about-operating-systems.md @@ -57,7 +57,7 @@ To deploy osquery at scale across your organization’s devices, an osquery mana ![A screenshot of the Fleet UI](../website/assets/images/articles/osquery-a-tool-to-easily-ask-questions-about-operating-systems-1-800x450@2x.png) -Ready to give Fleet a try? Head over to our [get started page](https://fleetdm.com/try-fleet/register), and you can be up and running with a sandbox environment in less than 5 minutes. Or you can check out the [docs](https://fleetdm.com/docs) to learn how to deploy Fleet across your organization. +Ready to give Fleet a try? Head over to our [try Fleet page](https://fleetdm.com/try-fleet/register), and you can be up and running with a preview environment in less than 5 minutes. Or you can check out the [docs](https://fleetdm.com/docs) to learn how to deploy Fleet across your organization. diff --git a/articles/osquery-as-a-threat-hunting-platform.md b/articles/osquery-as-a-threat-hunting-platform.md index e1ccda617..ce12837d8 100644 --- a/articles/osquery-as-a-threat-hunting-platform.md +++ b/articles/osquery-as-a-threat-hunting-platform.md @@ -42,7 +42,7 @@ Companies need to rethink the fragmented, siloed approaches to cybersecurity. Mo Looking inside computers shouldn’t be this difficult. Your threat hunting platform should be a single source of truth. But osquery isn’t limited to endpoint security. It’s one solution that provides workstation and server visibility across IT, SRE, and even DevOps. -Osquery is a powerful platform. Like any new tool, it will take time and resources to make the most of it. Luckily, osquery managers simplify implementation and management for security teams. That’s where Fleet can help. Fleet makes it easy for companies to harness the power of osquery at scale. Fleet comes out of the box with a [query library](https://fleetdm.com/queries) that’s maintained by members of our community. So, you can start collecting accurate, actionable endpoint data right away. [Play in Fleet Sandbox](https://fleetdm.com/try-fleet/register) to try Fleet on your device. Happy hunting. +Osquery is a powerful platform. Like any new tool, it will take time and resources to make the most of it. Luckily, osquery managers simplify implementation and management for security teams. That’s where Fleet can help. Fleet makes it easy for companies to harness the power of osquery at scale. Fleet comes out of the box with a [query library](https://fleetdm.com/queries) that’s maintained by members of our community. So, you can start collecting accurate, actionable endpoint data right away. [Try `fleetctl preview`](https://fleetdm.com/try-fleet/register) to test Fleet on your device. Happy hunting. diff --git a/docs/Deploy/Introduction.md b/docs/Deploy/Introduction.md index 75a3b30ec..e987546db 100644 --- a/docs/Deploy/Introduction.md +++ b/docs/Deploy/Introduction.md @@ -16,11 +16,9 @@ The `fleetctl` binary is the CLI interface which allows management of your deplo Both binaries are available for download from our [repo](https://github.com/fleetdm/fleet/releases). -## Fleet vs Fleet Sandbox - -If you'd like to try Fleet on your laptop, we recommend [Fleet Sandbox](https://fleetdm.com/try-fleet/register). - -If you want to enroll real hosts or deploy to a more scalable environment, we recommend [deploying Fleet to a server](https://fleetdm.com/docs/deploy/deploy-fleet-on-centos). +> Note: You can try a preview environment of Fleet locally on your machine. [Get up and running in minutes](https://fleetdm.com/try-fleet/fleetctl-preview). +> +> If you want to enroll real hosts or deploy to a more scalable environment, we recommend [deploying Fleet to a server](https://fleetdm.com/docs/deploy/deploy-fleet-on-centos). ## Infrastructure dependencies diff --git a/handbook/company/communications.md b/handbook/company/communications.md index f39b40c94..da5645d38 100644 --- a/handbook/company/communications.md +++ b/handbook/company/communications.md @@ -1197,7 +1197,7 @@ Once you have the above follow these steps: - **With Sails.js installed globally:** start the server by running `sails lift`. 4. When the server has started, the Fleet website will be availible at [http://localhost:2024](http://localhost:2024) - > **Note:** Some features, such as Fleet Sandbox, Self-service license dispenser, and account creation are not availible when running the website locally. If you need help testing features on a local copy, reach out to `@eashaw` in the [#g-website](https://fleetdm.slack.com/archives/C058S8PFSK0) channel on Slack.. + > **Note:** Some features, such as self-service license dispenser and account creation, are not available when running the website locally. If you need help testing features on a local copy, reach out to `@eashaw` in the [#g-website](https://fleetdm.slack.com/archives/C058S8PFSK0) channel on Slack. #### The "Deploy Fleet Website" GitHub action failed diff --git a/handbook/company/why-this-way.md b/handbook/company/why-this-way.md index 1d59b99dd..32d5235e6 100644 --- a/handbook/company/why-this-way.md +++ b/handbook/company/why-this-way.md @@ -204,7 +204,7 @@ The Fleet product is released every three weeks. By syncing the whole company to ## Why spend so much energy responding to every potential production incident? At Fleet, every 5xx response, timed-out request, and failed scheduled job is a P1 outage. -As soon as the outage is detected in any production environment (including fleetdm.com, Fleet Sandbox, hosted customer environments, TUF, and others), we create an outage issue _immediately_: before we know for sure whether any real users are affected, and even before we know what the error message says. +As soon as the outage is detected in any production environment (including fleetdm.com, hosted customer environments, TUF, and others), we create an outage issue _immediately_: before we know for sure whether any real users are affected, and even before we know what the error message says. Then, we determine impact quickly. We take a close look right away, even if we think it might not matter. If there is any chance of it affecting even one user, we keep digging. We reach out to affected users to acknowledge their problem, provide them with a workaround or some other way to make their day less painful. diff --git a/handbook/customers/README.md b/handbook/customers/README.md index 7cb2f6290..d29edd7c1 100644 --- a/handbook/customers/README.md +++ b/handbook/customers/README.md @@ -127,7 +127,7 @@ What is it like to be a Solutions Consultant at Fleet? What do you do every day? ### Within 30 days -- assess and absorb information * Being new to the company, you have fresh eyes. Document everything that seems odd to you (process, product). * Begin working on domain and product knowledge acquisition. Complete guides found at https://fleetdm.com/guides. -* Be a prospect. Sign up for a sandbox trial. What makes sense? What doesn't? Document. +* Be a prospect. Sign up for a Fleet account and try [`fleetctl preview`](https://fleetdm.com/try-fleet/fleetctl-preview). What makes sense? What doesn't? Document. * Understand Fleet value drivers. Why do Fleet Community users want to give us money to upgrade to Premium? * Complete consensus training videos (see the "Description" field in the `#help-consensus-tool` slack channel. * Review [gong](https://gong.io) calls. @@ -444,15 +444,6 @@ I’ll let you know when your account is sorted and follow up with instructions Thanks for bearing with us, please don’t hesitate to reach out if you have any questions about this, Fleet, osquery, or anything else!" ``` -#### Error while running a live query in Fleet Sandbox -``` -"Hey there, the team and I just noticed you experienced a 500 error that may have affected your experience running a live query on https://fleetdm.com/. - -I wanted to personally apologize for our mistake and let you know we're looking into the problem. We’ll provide an update on the underlying fix and track an (anonymized) bug on https://github.com/fleetdm/fleet so you can follow the progress in the open. - -Thank you for trying Fleet!" -``` - ### Change customer credit card number You can help a Premium license dispenser customers change their credit card by directing them to their [account dashboard](https://fleetdm.com/customers/dashboard). On that page, the customer can update their billing card by clicking the pencil icon next to their billing information. @@ -474,10 +465,6 @@ No further action is needed if the crawler successfully reindexes the Fleet webs 2. Legacy method: [create an opportunity issue](https://github.com/fleetdm/confidential/issues/new/choose) for the customer and follow the instructions in the issue for generating a trial license key. -### Extend sandbox trial -If a Fleet user would like an extension on the 5 day sandbox trial, this can be accomplished by creating a new confidential issue with labels `g-infra` and `:release`. It is important to include the projected expiration date of the sandbox trial, as sandbox instances cannot be extended after they expire. Please note the user email address that is requesting the sandbox extension in the confidential issue. - - ## Rituals diff --git a/handbook/engineering/README.md b/handbook/engineering/README.md index a56ffec08..5cf47c076 100644 --- a/handbook/engineering/README.md +++ b/handbook/engineering/README.md @@ -616,7 +616,6 @@ The [infrastructure product group](https://fleetdm.com/handbook/company/developm ### Infrastructure links The following are quick links to infrastructure-related README files in both public and private repos that can be used as a quick reference for infrastructure-related code: -- [Sandbox](https://github.com/fleetdm/fleet/blob/main/infrastructure/sandbox/readme.md) - [Terraform Module](https://github.com/fleetdm/fleet/blob/main/terraform/README.md) - [Loadtesting](https://github.com/fleetdm/fleet/blob/main/infrastructure/loadtesting/terraform/readme.md) - [Cloud](https://github.com/fleetdm/confidential/blob/main/infrastructure/cloud/template/README.md) @@ -629,7 +628,7 @@ The infrastructure team follows industry best practices when designing and deplo Many of these practices must be implemented in Fleet directly, and engineering will work to ensure that feature implementation follows these practices. The infrastructure team will make itself available to provide guidance as needed. If a feature is not compatible with these practices, an issue will be created with a request to correct the implementation. ### 24/7 on-call -The 24/7 on-call (aka infrastructure on-call) is responsible for alarms related to fleetdm.com, Fleet sandbox, Fleet managed cloud, as well as delivering 24/7 support for Fleet Ultimate customers. The infrastructure (24/7) on-call responsibility happens in shifts of one week. The people involved in them will be: +The 24/7 on-call (aka infrastructure on-call) is responsible for alarms related to fleetdm.com and Fleet managed cloud, as well as delivering 24/7 support for Fleet Ultimate customers. The infrastructure (24/7) on-call responsibility happens in shifts of one week. The people involved in them will be: First responders: @@ -647,7 +646,7 @@ The first responder on-call will take ownership of the @infrastructure-oncall al Expected response times: during business hours, 1 hour. Outside of business hours <4 hours. -For fleetdm.com and sandbox alarms, if the issue is not user-facing (e.g. provisioner/deprovisioner/temporary errors in osquery/etc), the on-call engineer will proceed to address the issue. If the issue is user-facing (e.g. the user noticed this error first-hand through the Fleet UI), then the on-call engineer will proceed to identify the user and contact them letting them know that we are aware of the issue and working on a resolution. They may also request more information from the user if it is needed. They will cc the EM and PM of the #g-infra group on any user correspondence. +For fleetdm.com alarms, if the issue is not user-facing, the on-call engineer will proceed to address the issue. If the issue is user-facing (e.g. the user noticed this error first-hand through the Fleet UI), then the on-call engineer will proceed to identify the user and contact them letting them know that we are aware of the issue and working on a resolution. They may also request more information from the user if it is needed. They will cc the EM and PM of the #g-infra group on any user correspondence. For Fleet managed cloud alarms that are user-facing, the first responder should collect the email address of the customer and all available information on the error. If the error occurs during business hours, the first responder should make their best effort to understand where in the app the error might have occurred. Assistance can be requested in `#help-engineering` by including the data they know regarding the issue, and when available, a frontend or backend engineer can help identify what might be causing the problem. If the error occurs outside of business hours, the on-call engineer will contact the user letting them know that we are aware of the issue and working on a resolution. It’s more helpful to say something like “we saw that you received an error while trying to create a query” than to say “your POST /api/blah failed”. @@ -660,7 +659,7 @@ Escalation of issues will be done manually by the first responder according to t 5. What is the underlying reason or suspected reason for the outage? 6. What are the next steps Fleet will take to address the root cause? -All infrastructure alarms (fleetdm.com, Fleet managed cloud, and sandbox) will go to #help-p1. +All infrastructure alarms (fleetdm.com and Fleet managed cloud) will go to #help-p1. The information needed to evaluate and potentially fix any issues is documented in the [runbook](https://github.com/fleetdm/fleet/blob/main/infrastructure/sandbox/readme.md). diff --git a/website/api/controllers/download-sitemap.js b/website/api/controllers/download-sitemap.js index 483a90169..1488d4e62 100644 --- a/website/api/controllers/download-sitemap.js +++ b/website/api/controllers/download-sitemap.js @@ -44,7 +44,6 @@ module.exports = { // ╩ ╩╩ ╩╝╚╝═╩╝ ╚═╝╚═╝═╩╝╚═╝═╩╝ ╩ ╩ ╩╚═╝╚═╝╚═╝ let HAND_CODED_HTML_PAGES = [ '/', - '/fleetctl-preview', '/company/contact', '/queries', '/pricing', diff --git a/website/api/controllers/entrance/signup.js b/website/api/controllers/entrance/signup.js index a9c4801ec..ff50aabdd 100644 --- a/website/api/controllers/entrance/signup.js +++ b/website/api/controllers/entrance/signup.js @@ -59,7 +59,7 @@ the account verification message.)`, signupReason: { type: 'string', - isIn: ['Buy a license', 'Try Fleet Sandbox'], + isIn: ['Buy a license', 'Try Fleet'], defaultsTo: 'Buy a license', } @@ -79,11 +79,6 @@ the account verification message.)`, 'parameters should have been validated/coerced _before_ they were sent.' }, - requestToProvisionerTimedOut: { - statusCode: 408, - description: 'The request to the cloud provisioner exceeded the set timeout.', - }, - emailAlreadyInUse: { statusCode: 409, description: 'The provided email address is already in use.', @@ -93,14 +88,7 @@ the account verification message.)`, }, fn: async function ({emailAddress, password, firstName, lastName, organization, signupReason}) { - - if(!sails.config.custom.cloudProvisionerSecret){ - throw new Error('The authorization token for the cloud provisioner API (sails.config.custom.cloudProvisionerSecret) is missing! If you just want to test aspects of fleetdm.com locally, and are OK with the cloud provisioner failing if you try to use it, you can set a fake secret when starting a local server by lifting the server with "sails_custom__cloudProvisionerSecret=test sails lift"'); - } - - if(sails.config.custom.fleetSandboxWaitlistEnabled === undefined){ - throw new Error(`The Fleet Sandbox waitlist configuration variable (sails.config.custom.fleetSandboxWaitlistEnabled) is missing!`); - } + // Note: in Oct. 2023, the Fleet Sandbox related code was removed from this action. For more details, see https://github.com/fleetdm/fleet/pull/14638/files var newEmailAddress = emailAddress.toLowerCase(); @@ -109,7 +97,6 @@ the account verification message.)`, throw 'emailAlreadyInUse'; } - if (!sails.config.custom.enableBillingFeatures) { throw new Error('The Stripe configuration variables (sails.config.custom.stripePublishableKey and sails.config.custom.stripeSecret) are missing!'); } @@ -123,91 +110,23 @@ the account verification message.)`, .intercept((error)=>{ return new Error(`An error occurred when trying to create a Stripe Customer for a new user with the using the email address ${newEmailAddress}. The incomplete user record has not been saved in the database, and the user will be asked to try signing up again. Full error: ${error.raw}`); }); - - let newUserRecord; - - // If the sandbox waitlist is enabled, we'll create a record without fleetSandboxURL,fleetSandboxExpiresAt,fleetSandboxDemoKey values and with inSandboxWaitlist set to true. - if(sails.config.custom.fleetSandboxWaitlistEnabled === true) { - newUserRecord = await User.create(_.extend({ - firstName, - lastName, - organization, - emailAddress: newEmailAddress, - signupReason, - password: await sails.helpers.passwords.hashPassword(password), - stripeCustomerId, - inSandboxWaitlist: true, - tosAcceptedByIp: this.req.ip - }, sails.config.custom.verifyEmailAddresses? { - emailProofToken: await sails.helpers.strings.random('url-friendly'), - emailProofTokenExpiresAt: Date.now() + sails.config.custom.emailProofTokenTTL, - emailStatus: 'unconfirmed' - }:{})) - .intercept('E_UNIQUE', 'emailAlreadyInUse') - .intercept({name: 'UsageError'}, 'invalid') - .fetch(); - - } else { - // If the Fleet Sandbox waitlist is not enabled (sails.config.custom.fleetSandboxWaitlistEnabled) We'll provision a Sandbox instance BEFORE creating the new User record. - // This way, if this fails, we won't save the new record to the database, and the user will see an error on the signup form asking them to try again. - - let sandboxInstanceDetails = await sails.helpers.fleetSandboxCloudProvisioner.provisionNewFleetSandboxInstance.with({ - firstName: firstName, - lastName: lastName, - emailAddress: newEmailAddress, - }) - .intercept('requestToProvisionerTimedOut', (err)=>{ // If the request to the Fleet Sandbox provisioner fails, we'll log a warning an return a requestToSandboxTimedOut response. This will tell the frontend to display a message asking the user to retry signing up. - sails.log.warn(`When attempting to provision a new Fleet Sandbox instance for a new user signing up (email: ${newEmailAddress}). The Fleet Sandbox provisioner returned a non 200 response. The incomplete user record has not been saved in the database, and the user will be asked to try signing up again. Full error: ${err}`); - return 'requestToProvisionerTimedOut'; - }) - .intercept((err)=>{ // For any other errors, we'll throw a 500 error. - return new Error(`When attempting to provision a new Fleet Sandbox instance for a new user signing up (email: ${newEmailAddress}), an error occured. The incomplete user record has not been saved in the database, and the user will be asked to try signing up again. Full error: ${err}`); - }); - - // Build up data for the new user record and save it to the database. - // (Also use `fetch` to retrieve the new ID so that we can use it below.) - newUserRecord = await User.create(_.extend({ - firstName, - lastName, - organization, - emailAddress: newEmailAddress, - signupReason, - password: await sails.helpers.passwords.hashPassword(password), - fleetSandboxURL: sandboxInstanceDetails.fleetSandboxURL, - fleetSandboxExpiresAt: sandboxInstanceDetails.fleetSandboxExpiresAt, - fleetSandboxDemoKey: sandboxInstanceDetails.fleetSandboxDemoKey, - stripeCustomerId, - inSandboxWaitlist: false, - tosAcceptedByIp: this.req.ip - }, sails.config.custom.verifyEmailAddresses? { - emailProofToken: await sails.helpers.strings.random('url-friendly'), - emailProofTokenExpiresAt: Date.now() + sails.config.custom.emailProofTokenTTL, - emailStatus: 'unconfirmed' - }:{})) - .intercept('E_UNIQUE', 'emailAlreadyInUse') - .intercept({name: 'UsageError'}, 'invalid') - .fetch(); - - // Send a POST request to Zapier - await sails.helpers.http.post( - 'https://hooks.zapier.com/hooks/catch/3627242/bqsf4rj/', - { - 'emailAddress': newEmailAddress, - 'organization': organization, - 'firstName': firstName, - 'lastName': lastName, - 'signupReason': signupReason, - 'webhookSecret': sails.config.custom.zapierSandboxWebhookSecret - } - ) - .timeout(5000) - .tolerate(['non200Response', 'requestFailed', {name: 'TimeoutError'}], (err)=>{ - // Note that Zapier responds with a 2xx status code even if something goes wrong, so just because this message is not logged doesn't mean everything is hunky dory. More info: https://github.com/fleetdm/fleet/pull/6380#issuecomment-1204395762 - sails.log.warn(`When a new user signed up, a lead/contact could not be verified in the CRM for this email address: ${newEmailAddress}. Raw error: ${err}`); - return; - }); - - }//fi + let newUserRecord = await User.create(_.extend({ + firstName, + lastName, + organization, + emailAddress: newEmailAddress, + signupReason, + password: await sails.helpers.passwords.hashPassword(password), + stripeCustomerId, + tosAcceptedByIp: this.req.ip + }, sails.config.custom.verifyEmailAddresses? { + emailProofToken: await sails.helpers.strings.random('url-friendly'), + emailProofTokenExpiresAt: Date.now() + sails.config.custom.emailProofTokenTTL, + emailStatus: 'unconfirmed' + }:{})) + .intercept('E_UNIQUE', 'emailAlreadyInUse') + .intercept({name: 'UsageError'}, 'invalid') + .fetch(); // Store the user's new id in their session. this.req.session.userId = newUserRecord.id; diff --git a/website/api/controllers/try-fleet/view-register.js b/website/api/controllers/try-fleet/view-register.js index f6b4bede8..c64a52f75 100644 --- a/website/api/controllers/try-fleet/view-register.js +++ b/website/api/controllers/try-fleet/view-register.js @@ -24,6 +24,7 @@ module.exports = { fn: async function () { // If the user is logged in, redirect them to the Fleet sandbox page. + // FUTURE: once all Sandbox instances have expired, redirect users to the fleetctl-preview page. if (this.req.me) { throw {redirect: '/try-fleet/sandbox'}; } diff --git a/website/api/controllers/try-fleet/view-sandbox-teleporter-or-redirect-because-expired-or-waitlist.js b/website/api/controllers/try-fleet/view-sandbox-teleporter-or-redirect-because-expired-or-waitlist.js index 16d0a804e..047d3a0ec 100644 --- a/website/api/controllers/try-fleet/view-sandbox-teleporter-or-redirect-because-expired-or-waitlist.js +++ b/website/api/controllers/try-fleet/view-sandbox-teleporter-or-redirect-because-expired-or-waitlist.js @@ -28,33 +28,22 @@ module.exports = { fn: async function () { + // FUTURE: Remove the route for this controller when all active sandbox instances have expired. if(!this.req.me) { throw {redirect: '/try-fleet/login' }; } - if(this.req.me.inSandboxWaitlist){ - throw {redirect: '/try-fleet/waitlist' }; + // If the user does not have a Fleet sandbox instance, redirect them to the /fleetctl-preview page. + if(!this.req.me.fleetSandboxURL || !this.req.me.fleetSandboxExpiresAt || !this.req.me.fleetSandboxDemoKey) { + throw {redirect: '/try-fleet/fleetctl-preview' }; } - if(!this.req.me.fleetSandboxURL) { - throw new Error(`Consistency violation: The logged-in user's (${this.req.me.emailAddress}) fleetSandboxURL has somehow gone missing!`); - } - - if(!this.req.me.fleetSandboxExpiresAt) { - throw new Error(`Consistency violation: The logged-in user's (${this.req.me.emailAddress}) fleetSandboxExpiresAt has somehow gone missing!`); - } - - if(!this.req.me.fleetSandboxDemoKey) { - throw new Error(`Consistency violation: The logged-in user's (${this.req.me.emailAddress}) fleetSandboxDemoKey has somehow gone missing!`); - } - - // If this user's Fleet Sandbox instance is expired, we'll redirect them to the sandbox-expired page + // Redirect users with expired sandbox instances to the /fleetctl-preview page. if(this.req.me.fleetSandboxExpiresAt < Date.now()){ - throw {redirect: '/try-fleet/sandbox-expired' }; + throw {redirect: '/try-fleet/fleetctl-preview' }; } - - // Respond with view. + // IWMIH, the user has an unexpired Fleet sandbox instance, and will be taken to to the sandbox teleporter page. return { hideHeaderOnThisPage: true, }; diff --git a/website/api/controllers/view-fleetctl-preview.js b/website/api/controllers/view-fleetctl-preview.js new file mode 100644 index 000000000..17aeb0ea6 --- /dev/null +++ b/website/api/controllers/view-fleetctl-preview.js @@ -0,0 +1,36 @@ +module.exports = { + + + friendlyName: 'View fleetctl preview', + + + description: 'Display "fleetctl preview" page.', + + + exits: { + + success: { + viewTemplatePath: 'pages/fleetctl-preview' + }, + + redirect: { + description: 'The requesting user is not logged in.', + responseType: 'redirect' + }, + + }, + + + fn: async function () { + + // Note: This page bypasses the 'is-logged-in' policy so we can redirect not-logged-in users to the /try-fleet/login page, + if(!this.req.me){ + throw {redirect: '/try-fleet/login' }; + } + // Respond with view. + return {}; + + } + + +}; diff --git a/website/api/controllers/view-get-started.js b/website/api/controllers/view-get-started.js deleted file mode 100644 index 23b826b0d..000000000 --- a/website/api/controllers/view-get-started.js +++ /dev/null @@ -1,27 +0,0 @@ -module.exports = { - - - friendlyName: 'View get started', - - - description: 'Display "Get started" page.', - - - exits: { - - success: { - viewTemplatePath: 'pages/get-started' - } - - }, - - - fn: async function () { - - // Respond with view. - return {}; - - } - - -}; diff --git a/website/api/models/User.js b/website/api/models/User.js index 083132c25..0f90184da 100644 --- a/website/api/models/User.js +++ b/website/api/models/User.js @@ -174,23 +174,26 @@ without necessarily having a billing card.` type: 'string', description: 'The URL of the Fleet sandbox instance that was provisioned for this user', example: 'https://billybobcat.sandbox.fleetdm.com', + extendedDescription: 'As of Oct. 2023, new user records will not have this value set.' }, fleetSandboxExpiresAt: { type: 'number', description: 'An JS timestamp (epoch ms) representing when this user\'s fleet sandbox instance will expire', example: '1502844074211', + extendedDescription: 'As of Oct. 2023, new user records will not have this value set.' }, fleetSandboxDemoKey: { type: 'string', description: 'The UUID that is used as the password of this user\'s Fleet Sandbox instance that is generated when the user signs up. Only used to log the user into their Fleet Sandbox instance while it is still live.', + extendedDescription: 'As of Oct. 2023, new user records will not have this value set.' }, signupReason: { type: 'string', description: 'The reason this user signed up for a fleetdm.com account', - isIn: ['Try Fleet Sandbox', 'Buy a license'], + isIn: ['Try Fleet Sandbox', 'Buy a license', 'Try Fleet'], }, inSandboxWaitlist: { diff --git a/website/assets/js/pages/get-started.page.js b/website/assets/js/pages/fleetctl-preview.page.js similarity index 96% rename from website/assets/js/pages/get-started.page.js rename to website/assets/js/pages/fleetctl-preview.page.js index 96a8d5c3a..d8939a298 100644 --- a/website/assets/js/pages/get-started.page.js +++ b/website/assets/js/pages/fleetctl-preview.page.js @@ -1,4 +1,4 @@ -parasails.registerPage('get-started', { +parasails.registerPage('fleetctl-preview', { // ╦╔╗╔╦╔╦╗╦╔═╗╦ ╔═╗╔╦╗╔═╗╔╦╗╔═╗ // ║║║║║ ║ ║╠═╣║ ╚═╗ ║ ╠═╣ ║ ║╣ // ╩╝╚╝╩ ╩ ╩╩ ╩╩═╝ ╚═╝ ╩ ╩ ╩ ╩ ╚═╝ diff --git a/website/assets/js/pages/try-fleet/register.page.js b/website/assets/js/pages/try-fleet/register.page.js index 33f8885a8..2d81977ed 100644 --- a/website/assets/js/pages/try-fleet/register.page.js +++ b/website/assets/js/pages/try-fleet/register.page.js @@ -45,14 +45,14 @@ parasails.registerPage('register', { // Using handle-submitting to add firstName, and lastName values to our formData before sending it to signup.js handleSubmittingRegisterForm: async function(argins) { - argins.signupReason = 'Try Fleet Sandbox'; + argins.signupReason = 'Try Fleet'; return await Cloud.signup.with(argins); }, - // After the form is submitted, we'll redirect the user to their Fleet sandbox instance. + // After the form is submitted, we'll redirect the user to the fleetctl preview page. submittedRegisterForm: async function() { this.syncing = true; - window.location = '/try-fleet/sandbox'; + window.location = '/try-fleet/fleetctl-preview'; }, clickOpenVideoModal: function() { diff --git a/website/assets/js/pages/try-fleet/sandbox-login.page.js b/website/assets/js/pages/try-fleet/sandbox-login.page.js index f6c2f71dd..fb167e2a5 100644 --- a/website/assets/js/pages/try-fleet/sandbox-login.page.js +++ b/website/assets/js/pages/try-fleet/sandbox-login.page.js @@ -44,6 +44,7 @@ parasails.registerPage('sandbox-login', { submittedLoginForm: async function() { this.syncing = true; + // FUTURE: once all Sandbox instances have expired, redirect users to the fleetctl-preview page. window.location = '/try-fleet/sandbox'; }, diff --git a/website/assets/styles/importer.less b/website/assets/styles/importer.less index 5667e0548..b937ef0f3 100644 --- a/website/assets/styles/importer.less +++ b/website/assets/styles/importer.less @@ -28,7 +28,7 @@ // Per-page styles @import 'pages/homepage.less'; -@import 'pages/get-started.less'; +@import 'pages/fleetctl-preview.less'; @import 'pages/pricing.less'; @import 'pages/dashboard/welcome.less'; @import 'pages/entrance/signup.less'; diff --git a/website/assets/styles/pages/get-started.less b/website/assets/styles/pages/fleetctl-preview.less similarity index 97% rename from website/assets/styles/pages/get-started.less rename to website/assets/styles/pages/fleetctl-preview.less index 033793745..a44190cfd 100644 --- a/website/assets/styles/pages/get-started.less +++ b/website/assets/styles/pages/fleetctl-preview.less @@ -1,4 +1,4 @@ -#get-started { +#fleetctl-preview { a:not(.btn) { color: @core-vibrant-blue; diff --git a/website/config/policies.js b/website/config/policies.js index 586b354b8..306809bb7 100644 --- a/website/config/policies.js +++ b/website/config/policies.js @@ -23,7 +23,7 @@ module.exports.policies = { 'view-homepage-or-redirect': true, 'view-faq': true, 'view-contact': true, - 'view-get-started': true, + 'view-fleetctl-preview': true,// Redirects not-logged-in users to /try-fleet/login 'view-pricing': true, 'legal/view-terms': true, 'legal/view-privacy': true, diff --git a/website/config/routes.js b/website/config/routes.js index 37b96d265..1bcf13c2d 100644 --- a/website/config/routes.js +++ b/website/config/routes.js @@ -30,8 +30,8 @@ module.exports.routes = { } }, - 'GET /fleetctl-preview': { - action: 'view-get-started', + 'GET /try-fleet/fleetctl-preview': { + action: 'view-fleetctl-preview', locals: { pageTitleForMeta: 'fleetctl preview | Fleet for osquery', pageDescriptionForMeta: 'Learn about getting started with Fleet using fleetctl.' @@ -166,8 +166,8 @@ module.exports.routes = { action: 'try-fleet/view-register', locals: { layout: 'layouts/layout-sandbox', - pageTitleForMeta: 'Fleet Sandbox | Fleet for osquery', - pageDescriptionForMeta: 'Fleet Sandbox - The fastest way to test Fleet. Get up and running in minutes to try out Fleet.', + pageTitleForMeta: 'Try Fleet | Fleet for osquery', + pageDescriptionForMeta: 'Get up and running in minutes to try out Fleet.', } }, @@ -175,8 +175,8 @@ module.exports.routes = { action: 'try-fleet/view-sandbox-login', locals: { layout: 'layouts/layout-sandbox', - pageTitleForMeta: 'Log in to Fleet Sandbox | Fleet for osquery', - pageDescriptionForMeta: 'Log in to Fleet Sandbox.', + pageTitleForMeta: 'Sign in | Fleet for osquery', + pageDescriptionForMeta: 'Log in to Fleet.', } }, @@ -187,13 +187,6 @@ module.exports.routes = { }, }, - 'GET /try-fleet/sandbox-expired': { - action: 'try-fleet/view-sandbox-expired', - locals: { - layout: 'layouts/layout-sandbox', - }, - }, - 'GET /try-fleet/waitlist': { action: 'try-fleet/view-waitlist', locals: { @@ -496,13 +489,15 @@ module.exports.routes = { 'GET /docs/using-fleet/updating-fleet': '/docs/deploying/upgrading-fleet', 'GET /blog': '/articles', 'GET /brand': '/logos', - 'GET /get-started': '/try-fleet/register', + 'GET /get-started': '/try-fleet/fleetctl-preview', 'GET /g': (req,res)=> { let originalQueryStringWithAmp = req.url.match(/\?(.+)$/) ? '&'+req.url.match(/\?(.+)$/)[1] : ''; return res.redirect(301, sails.config.custom.baseUrl+'/?meet-fleet'+originalQueryStringWithAmp); }, 'GET /test-fleet-sandbox': '/try-fleet/register', 'GET /unsubscribe': (req,res)=> { let originalQueryString = req.url.match(/\?(.+)$/) ? req.url.match(/\?(.+)$/)[1] : ''; return res.redirect(301, sails.config.custom.baseUrl+'/api/v1/unsubscribe-from-all-newsletters?'+originalQueryString);}, 'GET /tables': '/tables/account_policy_data', - 'GET /imagine/launch-party': 'https://www.eventbrite.com/e/601763519887', + 'GET /imagine/launch-party': 'https://www.eventbrite.com/e/601763519887', 'GET /blackhat2023': 'https://github.com/fleetdm/fleet/tree/main/tools/blackhat-mdm', // Assets from @marcosd4h & @zwass Black Hat 2023 talk + 'GET /fleetctl-preview': '/try-fleet/fleetctl-preview', + 'GET /try-fleet/sandbox-expired': '/try-fleet/fleetctl-preview', // Fleet UI // ============================================================================================================= diff --git a/website/views/layouts/layout-customer.ejs b/website/views/layouts/layout-customer.ejs index 50e92cb7e..73ac5548a 100644 --- a/website/views/layouts/layout-customer.ejs +++ b/website/views/layouts/layout-customer.ejs @@ -245,7 +245,7 @@ - + diff --git a/website/views/layouts/layout-sandbox.ejs b/website/views/layouts/layout-sandbox.ejs index 684eb2ecc..c1a5642a8 100644 --- a/website/views/layouts/layout-sandbox.ejs +++ b/website/views/layouts/layout-sandbox.ejs @@ -352,7 +352,7 @@ - + diff --git a/website/views/layouts/layout.ejs b/website/views/layouts/layout.ejs index 3d3ef3b4a..cede24298 100644 --- a/website/views/layouts/layout.ejs +++ b/website/views/layouts/layout.ejs @@ -429,7 +429,7 @@ - + diff --git a/website/views/pages/get-started.ejs b/website/views/pages/fleetctl-preview.ejs similarity index 99% rename from website/views/pages/get-started.ejs rename to website/views/pages/fleetctl-preview.ejs index b2c22dd90..28d4b3700 100644 --- a/website/views/pages/get-started.ejs +++ b/website/views/pages/fleetctl-preview.ejs @@ -1,4 +1,4 @@ -
+

Get started

Try out a preview of Fleet and osquery on your laptop before deploying at scale by following the guide below.