Skip to content

Commit

Permalink
Merge branch 'master' into mcbattirola/remove-team--use-new-flags
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbattirola authored Apr 30, 2024
2 parents f68ed2f + 472ff77 commit c49e8fd
Show file tree
Hide file tree
Showing 45 changed files with 2,168 additions and 392 deletions.
42 changes: 29 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 12 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@ codegen-units = 1
[workspace.dependencies]
# Note: To use a local IronRDP repository as a crate (for example, ironrdp-cliprdr), define the dependency as follows:
# ironrdp-cliprdr = { path = "/path/to/local/IronRDP/crates/ironrdp-cliprdr" }
# This rev hash corresponds to https://github.com/Devolutions/IronRDP/pull/436. It is being merged while that PR is
# still open in IronRDP in order to get these changes into a release, however it should be updated once that PR is
# merged. In the meantime, no other IronRDP hash's (without these changes) should be used.
ironrdp-cliprdr = { git = "https://github.com/Devolutions/IronRDP", rev = "49dab7d8df4bd785bf17fce97ac02beaba0b0275" }
ironrdp-connector = { git = "https://github.com/Devolutions/IronRDP", rev = "49dab7d8df4bd785bf17fce97ac02beaba0b0275" }
ironrdp-graphics = { git = "https://github.com/Devolutions/IronRDP", rev = "49dab7d8df4bd785bf17fce97ac02beaba0b0275" }
ironrdp-pdu = { git = "https://github.com/Devolutions/IronRDP", rev = "49dab7d8df4bd785bf17fce97ac02beaba0b0275" }
ironrdp-rdpdr = { git = "https://github.com/Devolutions/IronRDP", rev = "49dab7d8df4bd785bf17fce97ac02beaba0b0275" }
ironrdp-rdpsnd = { git = "https://github.com/Devolutions/IronRDP", rev = "49dab7d8df4bd785bf17fce97ac02beaba0b0275" }
ironrdp-session = { git = "https://github.com/Devolutions/IronRDP", rev = "49dab7d8df4bd785bf17fce97ac02beaba0b0275" }
ironrdp-svc = { git = "https://github.com/Devolutions/IronRDP", rev = "49dab7d8df4bd785bf17fce97ac02beaba0b0275" }
ironrdp-tls = { git = "https://github.com/Devolutions/IronRDP", rev = "49dab7d8df4bd785bf17fce97ac02beaba0b0275", features = ["rustls"]}
ironrdp-tokio = { git = "https://github.com/Devolutions/IronRDP", rev = "49dab7d8df4bd785bf17fce97ac02beaba0b0275" }
ironrdp-cliprdr = { git = "https://github.com/Devolutions/IronRDP", rev = "fd105e4b56647ab2f54aa23954aec4aaeef118e2" }
ironrdp-connector = { git = "https://github.com/Devolutions/IronRDP", rev = "fd105e4b56647ab2f54aa23954aec4aaeef118e2" }
ironrdp-displaycontrol = { git = "https://github.com/Devolutions/IronRDP", rev = "fd105e4b56647ab2f54aa23954aec4aaeef118e2" }
ironrdp-dvc = { git = "https://github.com/Devolutions/IronRDP", rev = "fd105e4b56647ab2f54aa23954aec4aaeef118e2" }
ironrdp-graphics = { git = "https://github.com/Devolutions/IronRDP", rev = "fd105e4b56647ab2f54aa23954aec4aaeef118e2" }
ironrdp-pdu = { git = "https://github.com/Devolutions/IronRDP", rev = "fd105e4b56647ab2f54aa23954aec4aaeef118e2" }
ironrdp-rdpdr = { git = "https://github.com/Devolutions/IronRDP", rev = "fd105e4b56647ab2f54aa23954aec4aaeef118e2" }
ironrdp-rdpsnd = { git = "https://github.com/Devolutions/IronRDP", rev = "fd105e4b56647ab2f54aa23954aec4aaeef118e2" }
ironrdp-session = { git = "https://github.com/Devolutions/IronRDP", rev = "fd105e4b56647ab2f54aa23954aec4aaeef118e2" }
ironrdp-svc = { git = "https://github.com/Devolutions/IronRDP", rev = "fd105e4b56647ab2f54aa23954aec4aaeef118e2" }
ironrdp-tls = { git = "https://github.com/Devolutions/IronRDP", rev = "fd105e4b56647ab2f54aa23954aec4aaeef118e2", features = ["rustls"]}
ironrdp-tokio = { git = "https://github.com/Devolutions/IronRDP", rev = "fd105e4b56647ab2f54aa23954aec4aaeef118e2" }
4 changes: 4 additions & 0 deletions docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,10 @@
"title": "Linux Server",
"slug": "/machine-id/deployment/linux/"
},
{
"title": "Linux Server (TPM)",
"slug": "/machine-id/deployment/linux-tpm/"
},
{
"title": "Kubernetes",
"slug": "/machine-id/deployment/kubernetes/"
Expand Down
2 changes: 2 additions & 0 deletions docs/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"CTAP",
"CXXXXXXXXX",
"Callouts",
"cryptoprocessor",
"Cgajq",
"DBSIZE",
"DEBU",
Expand Down Expand Up @@ -682,6 +683,7 @@
"pidof",
"pkill",
"pkinit",
"PKIX",
"plugindata",
"portforward",
"postgresqlselfhosted",
Expand Down
26 changes: 26 additions & 0 deletions docs/pages/includes/machine-id/create-a-bot.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Next, you need to create a Bot. A Bot is a Teleport identity for a machine or
group of machines. Like users, bots have a set of roles and traits which define
what they can access.

Create `bot.yaml`:

```yaml
kind: bot
version: v1
metadata:
# name is a unique identifier for the Bot in the cluster.
name: example
spec:
# roles is a list of roles to grant to the Bot. Don't worry if you don't know
# what roles you need to specify here, the Access Guides will walk you through
# creating and assigning roles to the already created Bot.
roles: []
```
Make sure you replace `example` with a unique, descriptive name for your Bot.

Use `tctl` to apply this file:

```code
$ tctl create bot.yaml
```
51 changes: 51 additions & 0 deletions docs/pages/includes/provision-token/tpm-spec.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
```yaml
kind: token
version: v2
metadata:
# name identifies the token. When configuring a bot or node to join using this
# token, this name should be specified.
name: tpm-token
spec:
# For Machine ID and TPM joining, roles will always be "Bot" and
# join_method will always be "tpm".
roles: [Bot]
join_method: tpm

# bot_name specifies the name of the bot that this token will grant access to
# when it is used.
bot_name: tpm-demo

# tpm specifies the TPM join method specific configuration for this token.
tpm:
# ekcert_allowed_cas is a list of CA certificates that will be used to
# validate TPM EKCerts. These should be PEM wrapped.
#
# When specified, joining TPMs must present an EKCert signed by one of the
# specified CAs. TPMs that do not present an EKCert will be not permitted to
# join.
#
# When unspecified, TPMs will be allowed to join with either an EKCert or an
# EKPubHash.
ekcert_allowed_cas:
- |
-----BEGIN CERTIFICATE-----
... CA Certificate Data ...
-----END CERTIFICATE-----
# allow is a list of Rules, the presented TPM must match one allow rule to
# be permitted to join using this token.
allow:
# description is a human-readable description of the rule. It has no
# bearing on whether a TPM is allowed to join, but can be used to
# associate a rule with a specific host (e.g the asset tag of the server
# in which the TPM resides).
- description: "example-build-server-100"
# ek_public_hash is the SHA256 hash of the EKPub marshaled in PKIX format
# and encoded in hexadecimal. This value will also be checked when a TPM
# has submitted an EKCert, and the public key in the EKCert will be used
# for this check.
ek_public_hash: "d4b4example6fabfc568d74f2example6c35a05337d7af9a6example6c891aa6"
# ek_certificate_serial is the serial number of the EKCert in hexadecimal
# with colon separated nibbles. This value will not be checked when a TPM
# does not have an EKCert configured.
ek_certificate_serial: "01:23:45:67:89:ex:am:pl:e0:23:45:67:89:ab:cd:ef"
```
30 changes: 30 additions & 0 deletions docs/pages/includes/tpm-joining-background.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
The `tpm` join method is a secure way for Bots and Agents to authenticate with
the Teleport Auth Service without using any shared secrets. Instead of using a
hared secret, the unique identity of the host's Trusted Platform Module (TPM)
and public key cryptography is used to authenticate the host.

In environments where there is no other form of identity available to machines,
e.g on-prem, this is the most secure method for joining. It avoids the need to
distribute a shared secret as is needed for the `token` join method.

A Trusted Platform Module (TPM) is a secure, physical cryptoprocessor that is
installed on a host. TPMs can store cryptographic material and perform a number
of cryptographic operations, without exposing the cryptographic material to the
operating system. Each TPM has a unique key pair burned-in known as the
Endorsement Key (EK).

Some TPMs also contain an X.509 certificate for this key pair that is signed by
the manufacturer's CA. This is known as the EK Certificate (EKCert). This
certificate can be used by the TPM to prove to a third-party (who trusts the
manufacturer's CA) that the TPM is genuine and abides by the TPM specification.

When using the `tpm` join method, you must first query the TPM's public key and
then create a join token that explicitly allows this public key. Even if the
host operating system is reinstalled, the EK public key will not change, meaning
that the TPM will still be usable to join your Teleport cluster. If you have a
large number of hosts, it may make sense to use automation tooling such as
ansible to query the TPMs across your fleet and then generate join tokens.

<Admonition type="warning">
The `tpm` join method is currently not compatible with FIPS 140-2.
</Admonition>
29 changes: 15 additions & 14 deletions docs/pages/machine-id/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,24 @@ and [Architecture](./architecture.mdx) to plan your deployment.
Read the following guides for how to deploy Machine ID on your cloud platform or
on-prem infrastructure.

|Platform|Installation method|Join method|
|---|---|---|
|[Linux](./deployment/linux.mdx)|Package manager or TAR archive|Static join token|
|[GCP](./deployment/gcp.mdx)|Package manager, TAR archive, or Kubernetes pod|Identity document signed by GCP|
|[AWS](./deployment/aws.mdx)|Package manager, TAR archive, or Kubernetes pod|Identity document signed by AWS|
|[Azure](./deployment/azure.mdx)|Package manager or TAR archive|Identity document signed by Azure|
|[Kubernetes](./deployment/kubernetes.mdx)|Kubernetes pod|Identity document signed by your Kubernetes cluster|
| Platform | Installation method | Join method |
|-------------------------------------------|-------------------------------------------------|-----------------------------------------------------|
| [Linux](./deployment/linux.mdx) | Package manager or TAR archive | Static join token |
| [Linux (TPM)](./deployment/linux-tpm.mdx) | Package manager or TAR archive | Attestation from TPM 2.0 |
| [GCP](./deployment/gcp.mdx) | Package manager, TAR archive, or Kubernetes pod | Identity document signed by GCP |
| [AWS](./deployment/aws.mdx) | Package manager, TAR archive, or Kubernetes pod | Identity document signed by AWS |
| [Azure](./deployment/azure.mdx) | Package manager or TAR archive | Identity document signed by Azure |
| [Kubernetes](./deployment/kubernetes.mdx) | Kubernetes pod | Identity document signed by your Kubernetes cluster |

### CI/CD

Read the following guides for how to deploy Machine ID on a continuous
integration and continuous deployment platform

|Platform|Installation method|Join method|
|---|---|---|
|[CircleCI](./deployment/circleci.mdx)|TAR archive|CircleCI-signed identity document|
|[GitLab](./deployment/gitlab.mdx)|TAR archive|GitLab-signed identity document|
|[GitHub Actions](./deployment/github-actions.mdx)|Teleport job available through the GitHub Actions marketplace|GitHub-signed identity document.|
|[Jenkins](./deployment/jenkins.mdx)|Package manager or TAR archive|Static join token|
|[Spacelift](./deployment/spacelift.mdx)|Docker Image|Spacelift-signed identity document|
| Platform | Installation method | Join method |
|---------------------------------------------------|---------------------------------------------------------------|------------------------------------|
| [CircleCI](./deployment/circleci.mdx) | TAR archive | CircleCI-signed identity document |
| [GitLab](./deployment/gitlab.mdx) | TAR archive | GitLab-signed identity document |
| [GitHub Actions](./deployment/github-actions.mdx) | Teleport job available through the GitHub Actions marketplace | GitHub-signed identity document. |
| [Jenkins](./deployment/jenkins.mdx) | Package manager or TAR archive | Static join token |
| [Spacelift](./deployment/spacelift.mdx) | Docker Image | Spacelift-signed identity document |
Loading

0 comments on commit c49e8fd

Please sign in to comment.