Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds zero quickstart draft #1326

Merged
merged 16 commits into from
Jun 20, 2024
Merged

Adds zero quickstart draft #1326

merged 16 commits into from
Jun 20, 2024

Conversation

ZPain8464
Copy link
Contributor

@ZPain8464 ZPain8464 commented Mar 25, 2024

This PR adds the Pomerium Zero official quickstart guide, and moves the Core Quickstart to the Core directory.

related to https://github.com/pomerium/internal/issues/1739

Copy link

netlify bot commented Mar 25, 2024

Deploy Preview for pomerium-docs ready!

Name Link
🔨 Latest commit b0251e9
🔍 Latest deploy log https://app.netlify.com/sites/pomerium-docs/deploys/66749277481fe70009780426
😎 Deploy Preview https://deploy-preview-1326--pomerium-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

## Run Docker Compose
Pomerium Zero will attempt to detect your **public IP** address to connect you to your cluster.

But, it won't be able to because you're running Pomerium Zero in an isolated container with its own private network and IP address.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think right after this we need to showcase what someone is seeing so it's spelled out for them

"You'll see an error like the following (see attached image), and that's completely normal!"


```bash
docker compose up
pomerium-cli tcp ssh.<YOUR_CLUSTER_DOMAIN_NAME>.app:22
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mild nit but it doesn't have the same highlight

## Next Steps
### Connect to Verify

In the Zero Console, select the **From** route for the Verify app.
Copy link
Contributor

@cmo-pomerium cmo-pomerium Mar 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In the Zero Console, select the **From** route for the Verify app.
Now, let's test one of the preconfigured routes to see if it works. In the Zero Console, select the **From** route for the Verify app.


:::caution
Because the Verify service uses a publically accessible URL, Pomerium Zero won't be able to connect to the `jwks.json` endpoint to fetch the signing key used to verify the user's JWT.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Because the Verify service uses a publically accessible URL, Pomerium Zero won't be able to connect to the `jwks.json` endpoint to fetch the signing key used to verify the user's JWT.
You will see the following error because the Verify service uses a publicly accessible URL. In the current setup, Pomerium Zero won't be able to connect to the `jwks.json` endpoint to fetch the signing key used to verify the user's JWT.


## Build your own policy

In the **Policy** tab, create a new policy that instructs Pomerim to grant access only if the user's email address ends the specified value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In the **Policy** tab, create a new policy that instructs Pomerim to grant access only if the user's email address ends the specified value.
In the **Policy** tab, create a new policy that instructs Pomerim to grant access only if the user's email address ends with the specified value.


Now that you've completed the Pomerium Zero Quickstart, build your first route:

- **Pomerium Zero Fundamentals: Build Routes**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't currently link to anything. Are we waiting on the fundamentals to be built too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we are.

Copy link
Contributor

@cmo-pomerium cmo-pomerium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finished my review. @ZPain8464 let me know if I can clarify anything.


## Get Pomerium Zero configuration

In the Zero onboarding screen, select the **Docker** tab and copy the Docker Compose configuration. (If you selected **Finish** before copying the Docker configuration, we've provided a copy below.)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably worth mentioning something here about how you get to the onboarding screen, maybe something like "after creating an account, you should see an onboarding page"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I'll add that in.


## Prerequisites
You can find your **Starter Domain** at the top of the Zero Console in the navigation bar.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't show the starter domain while on the onboarding page.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do, since Caleb implemented the change to make the hosted Verify service reachable for deployments running in Docker. Here's the current config in our onboarding flow:

services:
  pomerium:
    image: pomerium/pomerium:v0.26.0
    ports:
      - 443:443
    restart: always
    environment:
      POMERIUM_ZERO_TOKEN: AMf-vBy2rzctrTCXBgcAIpUfLKWSme0Bs_HtTcQYb5nbFe8idwaiIt4MjemObphF_L-Pdz_pqCggHHwszIziQU4bC2nGJklhgMTfGGEtpntqfmXRBT6D_m09maHqSJy_75DrLFL2SQOgw3pjuWELm4WhtjD1Rs8aCTl7acjPJe0CKJk5zfSMZcAeFajMhKFpEk-yq_c9G9MN
      XDG_CACHE_HOME: /var/cache
    volumes:
      - pomerium-cache:/var/cache
    networks:
      main:
        aliases:
        - verify.pro-cricket-4498.pomerium.app
  verify:
    image: cr.pomerium.com/pomerium/verify:latest
    networks:
      main:
        aliases:
        - verify

networks:
  main: {}

volumes:
  pomerium-cache:


## Prerequisites
You can find your **Starter Domain** at the top of the Zero Console in the navigation bar.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be nice to give some explanation here about what the verify app is and why it's included here? (Do we have a docs page about the verify app? Maybe we should add one if not?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. We do not have anything I can think of that discusses the Verify app. For now, it would be easiest to link to the GH repo and add an explanation about the service and it's intended use.


## Configure Docker
This command will deploy a local cluster running Pomerium in a Docker container. If your cluster deploys successfully, the Pomerium Zero cloud will attempt to secure a connection to your cluster.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could give some better explanation here. In particular "Pomerium Zero cloud will attempt to secure a connection to your cluster" doesn't make sense to me. Maybe we could say something about how this starts Pomerium in a mode where it connects to the cloud service?

We might also want to hold off on talking about a "cluster" just yet... this might be confusing to some folks if they assume "cluster" implies multiple replicas.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to start being more consistent with terminology, this might be a good time to mention "Zero-managed mode", and that that really means Pomerium connects to the Pomerium Zero cloud?

I see your point with the mention of a cluster. I'm in favor of removing it, we just need to agree on how we want to replace it.


![Viewing the two starter routes](./img/quickstart/pz-quickstart-routes.png)

### Connect to SSH
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend starting with the simpler example service first (i.e. swapping this section and the "Connect to Verify" section).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.


You should be redirected to the **verify** service. You'll see a page like this:
<Tabs>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it makes more sense to link out to a different page for the pomerium-cli installation instructions... it seems a hassle to keep duplicate copies of these instructions in sync.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can import Markdown in Docusaurus. This would make it so we have one source of truth that we can reuse and maintain.

## Next Steps
### Connect to Verify

In the Zero Console, select the **From** URL for the **Verify** app.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either above or here, I think this would definitely benefit from some explanation — what is the verify service? what does it demonstrate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes most sense to include it at the first mention of the Verify app, so earlier in the page. Will do.


If you want to [try Enterprise](https://www.pomerium.com/enterprise-sales/), check out the [Enterprise with Docker quickstart](/docs/deploy/enterprise/quickstart).
## Review authorization policy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before talking about policies and certificates, would it make sense to show how to create your own route? I think it might be good to explain how the starter domain is set up so you can add any sub-domain as a route, and the steps involved to set up a new route, i.e.

  • pick a sub-domain to use with the From URL
  • set up some upstream service to use with the To URL
  • attach the demo policy to grant access to the route

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well that was the original intention of the Fundamentals courses. This links to the Routes course first, so they can learn to build a route once they have Zero set up. The Zero Fundamentals course does not re-iterate the Quickstart; it instructs users to go back to the Quickstart and complete it first before continuing with Fundamentals.

@ZPain8464 ZPain8464 marked this pull request as ready for review June 18, 2024 23:48
@ZPain8464 ZPain8464 requested a review from a team as a code owner June 18, 2024 23:48
@ZPain8464 ZPain8464 requested review from cmo-pomerium and removed request for a team June 18, 2024 23:48
@ZPain8464 ZPain8464 merged commit e7829cc into main Jun 20, 2024
8 checks passed
@ZPain8464 ZPain8464 deleted the zpain/zero-quickstart branch June 20, 2024 20:37
@backport-actions-token
Copy link

The backport to 0-26-0 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-0-26-0 0-26-0
# Navigate to the new working tree
cd .worktrees/backport-0-26-0
# Create a new branch
git switch --create backport-1326-to-0-26-0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick --mainline 1 e7829ccb0ef622c46d331e3732e11d4f72095c48
# Push it to GitHub
git push --set-upstream origin backport-1326-to-0-26-0
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-0-26-0

Then, create a pull request where the base branch is 0-26-0 and the compare/head branch is backport-1326-to-0-26-0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants