-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Headless Authn: documentation #23272
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
dd5ef1a
Add docs.
Joerger 87ef754
Update docs/pages/access-controls/guides/headless-login.mdx
Joerger 9598d00
Fix lint error.
Joerger e02c412
Ellaborate on how headless login differs from standard login.
Joerger 52762af
Resolve comments; Fix capitalization.
Joerger f16c18e
Resolves comments.
Joerger 4bc2bc7
Add cli reference docs.
Joerger e01e50e
Restructure guide; Remove scoped blocks; Update descriptions; resolve…
Joerger 827b616
Make configuration options/alternatives collapsible; Fix typos.
Joerger 9e99c2d
Fix file names, titles, and make new config details begin as closed.
Joerger 4bcda8d
Fix hidden merge conflict.
Joerger 8960176
Add line breaks.
Joerger 3fbd91d
Merge branch 'master' into joerger/headless-authn-docs
Joerger 499bed6
Fix dead link.
Joerger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,154 @@ | ||
| --- | ||
| title: Headless WebAuthn (Preview) | ||
| description: Headless WebAuthn | ||
| --- | ||
|
|
||
| <Notice type="warning"> | ||
| Headless WebAuthn is currently in Preview mode. | ||
| </Notice> | ||
|
|
||
| Headless WebAuthn provides a secure way to authenticate with WebAuthn from a | ||
| machine without access to a WebAuthn device. This enables the use of WebAuthn | ||
| features which are usually not usable in WebAuthn-incompatible environments. | ||
| For example: | ||
|
|
||
| - Logging into Teleport with WebAuthn from a remote dev box | ||
| - Connecting to a Teleport SSH Service from a remote dev box with per-session MFA | ||
| - Performing `tsh scp` from one Teleport SSH Service to another with per-session MFA | ||
| - Logging into Teleport on a machine without a WebAuthn-compatible browser | ||
|
|
||
| <Admonition type="note" title="Headless WebAuthn Support"> | ||
| Headless WebAuthn only supports the following `tsh` commands: | ||
|
|
||
| - `tsh ls` | ||
| - `tsh ssh` | ||
| - `tsh scp` | ||
|
|
||
| In the future, Headless WebAuthn will be extended to other `tsh` commands. | ||
| </Admonition> | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - A v12.2+ Teleport cluster with WebAuthn configured. | ||
| See the [Second Factor: WebAuthn](./webauthn.mdx) guide. | ||
| - WebAuthn hardware device, such as YubiKey. | ||
| - A Web browser with [WebAuthn support]( | ||
| https://developers.yubico.com/WebAuthn/WebAuthn_Browser_Support/). | ||
|
|
||
|
|
||
| ## Step 1/3. Configuration | ||
|
|
||
| A v12.2+ Teleport cluster capable of WebAuthn is automatically capable of | ||
| Headless WebAuthn without any additional configuration. | ||
|
|
||
| <Details title="Optional: make Headless WebAuthn the default auth connector"> | ||
|
|
||
| To make Headless WebAuthn the default authentication method for your Teleport | ||
| Cluster, add `connector_name: headless` to your cluster configuration. | ||
|
|
||
| Create a `cap.yaml` file or get the existing configuration using | ||
| `tctl get cluster_auth_preference`: | ||
|
|
||
| ```yaml | ||
| kind: cluster_auth_preference | ||
| version: v2 | ||
| metadata: | ||
| name: cluster-auth-preference | ||
| spec: | ||
| type: local | ||
| second_factor: "on" | ||
| webauthn: | ||
| rp_id: example.com | ||
| connector_name: headless # headless by default | ||
| ``` | ||
|
|
||
| Update the configuration: | ||
|
|
||
| ```code | ||
| $ tctl create -f cap.yaml | ||
| # cluster auth preference has been updated | ||
| ``` | ||
| </Details> | ||
|
|
||
| <Details title="Alternative: disable Headless WebAuthn"> | ||
|
|
||
| Headless WebAuthn is enabled automatically when WebAuthn is configured. If you | ||
| want to forbid Headless WebAuthn in your cluster, add `headless: false` to your | ||
| configuration. | ||
|
|
||
| Create a `cap.yaml` file or get the existing configuration using | ||
| `tctl get cluster_auth_preference`: | ||
|
|
||
| ```yaml | ||
| kind: cluster_auth_preference | ||
| version: v2 | ||
| metadata: | ||
| name: cluster-auth-preference | ||
| spec: | ||
| type: local | ||
| second_factor: "on" | ||
| webauthn: | ||
| rp_id: example.com | ||
| headless: false # disable Headless WebAuthn | ||
| ``` | ||
|
|
||
| Update the configuration: | ||
|
|
||
| ```code | ||
| $ tctl create -f cap.yaml | ||
| # cluster auth preference has been updated | ||
| ``` | ||
|
|
||
| </Details> | ||
|
|
||
| ## Step 2/3. Initiate Headless WebAuthn | ||
|
|
||
| Run a headless `tsh` command with the `--headless` flag. This will initiate | ||
| headless authentication, printing a URL and `tsh` command. | ||
|
|
||
| ```code | ||
| $ tsh ls --headless --proxy=proxy.example.com --user=alice | ||
| # Complete headless authentication in your local web browser: | ||
| # | ||
| # https://proxy.example.com:3080/web/headless/86172f78-af7c-5935-a7c1-ed06b94f17dc | ||
| # | ||
| # or execute this command in your local terminal: | ||
| # | ||
| # tsh headless approve --user=alice --proxy=proxy.example.com 86172f78-af7c-5935-a7c1-ed06b94f17dc | ||
| ``` | ||
|
|
||
| ## Step 3/3. Approve Headless WebAuthn | ||
|
|
||
| To approve the headless authentication, click or copy+paste the URL printed by | ||
| `tsh` in your local web browser. You will be prompted to approve the log in with | ||
| WebAuthn verification. Once approved, your initial `tsh --headless <command>` | ||
| should continue as if you had logged in locally. | ||
|
|
||
| Unlike a standard login session, headless sessions are only available for the | ||
| lifetime of a single `tsh` request. This means that for each `tsh --headless` | ||
| command, you will need to go through the Headless WebAuthn flow: | ||
|
|
||
| ```code | ||
| $ tsh ls --headless --proxy=proxy.example.com --user=alice | ||
| # Complete headless authentication in your local web browser: | ||
| # | ||
| # https://proxy.example.com:3080/web/headless/86172f78-af7c-5935-a7c1-ed06b94f17dc | ||
| # | ||
| # or execute this command in your local terminal: | ||
| # | ||
| # tsh headless approve --user=alice --proxy=proxy.example.com 86172f78-af7c-5935-a7c1-ed06b94f17dc | ||
| # # User approves through link | ||
| # Node Name Address Labels | ||
| # --------- -------------- ----------- | ||
| # server01 127.0.0.1:3022 arch=x86_64 | ||
| # | ||
| $ tsh ssh --headless --proxy=proxy.example.com --user=alice server01 | ||
| # Complete headless authentication in your local web browser: | ||
| # | ||
| # https://proxy.example.com:3080/web/headless/864cccd9-2425-46d9-a9f2-636387e66ebf | ||
| # | ||
| # or execute this command in your local terminal: | ||
| # | ||
| # tsh headless approve --user=alice --proxy=proxy.example.com 864cccd9-2425-46d9-a9f2-636387e66ebf | ||
| # # User approves through link | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.