Commit graph

50 commits

Author SHA1 Message Date
Edoardo Spadolini 851cb6598e
Fix package names for v1 protos, misc proto changes (#24183)
* Delete teleterm's ptyHost/v1, added by mistake

* Add package name to protos conforming to PACKAGE_VERSION_SUFFIX

* use go run in buf-connect-go.gen.yaml directly

* Run protogen in place

* Run the buf-go generation off of go run

This also adds protoc-gen-go-grpc to go.mod
2023-04-06 22:53:31 +00:00
Ryan Clark 471a82bd6f
Move teleport over to Vite (#21168) 2023-03-21 18:01:53 +00:00
Rafał Cieślak 6e1a59bc25
Remove web/package.json, move scripts to package.json (#21134)
* Remove web/package.json, move scripts to package.json

Removed scripts:

Leftovers from webapps Dockerfile and CI on GCB:
- package-term-ci
- build-and-package-term-ci
- build-and-package-term
- nop

Leftovers from webapps Makefile, presumably:
- build-oss
- build-e

* Add back nop script

* Remove build-teleport* scripts
2023-02-03 15:34:57 +00:00
Rafał Cieślak 408ea7b881
Remove web/packages/build from ignored files (#20400) 2023-01-20 10:04:31 +00:00
Jeff Pihach 34f102bdeb
Enable building teleport with the new UI location (#20361)
* Changes for merging webapps into teleport.
2023-01-18 22:22:25 +00:00
Alan Parra d218fd2625
Implement macOS device enrollment methods (#19079)
Implement native macOS methods required by device enrollment, namely methods to
Create/Get the device key, Sign challenges with it, and to collect device data
(aka serial number).

The implementation is rather similar to lib/auth/touchid, but simpler in a few
aspects:

1. Device keys don't require user interaction (as in they don't cause a touch ID
   prompt); and
2. There exists, at most, a single device key at all times.

I've added a tiny refactor to reuse Apple public key parsing from touchid, plus
some changes so touchid doesn't break in the face of unexpected keys (which the
device key didn't cause, per se, but my experiments getting to it did).

gravitational/teleport.e#514
2022-12-07 18:11:21 +00:00
Alan Parra d5e57f8cd1
Apply linters to legacy protos (#15879)
Applies linters to legacy protos and adds a few additional Makefile targets to
make it easier to manage protos locally.

Proto linters now run in CI.

#15187

* Apply linters to legacy protos
* Handle new folders in genproto.sh, reset gen/proto if exists
* Lint and format lib/teleterm as part of protos/all
2022-08-29 20:54:32 +00:00
Jakub Nyckowski a72c0b8c73
Add go.work to .gitignore (#12098)
* Add go.work to .gitignore

* Add go.work.sum to .gitignore

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2022-04-21 16:31:18 +00:00
Alan Parra 9c89c00806
Build tsh with static libfido2 in buildbox and Centos7 (#11849)
Build `tsh` with static `libfido2`, `libcbor`,`libcrypto` and `libudev-zero`.

Dockerfiles for buildbox and Centos7 changed. FIPS and macOS to be addressed at
a later date.

Add the `tsh fido2 diag` hidden command for ease of testing.

#9160

* Update go-libfido2 and tidy modules
* Add a fido2 diagnostic command to tsh
* Add a few build artifacts to .gitignore
* Build tsh with static libfido2 in buildbox
* Build tsh with static libfido2 in centos7
* Add a few relevant cmake flags
* Use illiliti/libudev-zero
* Do multi-stage build on centos7, image tweaks
* Add `make enter/centos7`
* s/OFf/OFF/g
2022-04-18 14:07:10 +00:00
Trent Clarke 21caa7cbd8
Save unit test logs (#10076)
In order to make it easier to do post-analysis in test logs, this patch makes the CI build save the JSON-formatted logs into a Google Cloud Storage bucket.

GCB has a built-in artifact storage system, but unfortunately it only stores artifacts on successful builds. Given that we're interested on doing post-analysis on failed builds, this is unhelpful. The build scripts instead use the GCP API to explicitly upload the test logs to a bucket.

This patch
 * Adds an artifact uploader using the GCP Storage API
 * Updates the build yaml files to point to the appropriate artifacts & bucket
 * Updates the makefile to save JSON logs to $TELEPORT/test-logs when running tests
 * Adds entries to .gitignore to not automatically commit test reports

The existing test rendering filter formats the JSON outut for human consumption, meaning that we can both save the JSON logs and that humans manually running tests with via make will still get an intelligible report.

In addition to the above, this patch also:
 * standardizes the build scripts on `logrus` for logging, as this was used by some dependencies.
 * adds a self-test to the CI code, run as part of `make test`
2022-02-15 12:19:33 +11:00
Zac Bergquist 0f61458864
Add a Cargo workspace (#9960)
The workspace includes both parts of the project that use Rust.
(The roletester and RDP client).

This has several advantages:
- Rust Analyzer will work on the codebase as a whole, so we get
  nice development features without needing to open the Rust
  projects separately
- Dependencies are resolved at the project level, ensuring that
  role tester and RDP client use the same version of common
  dependencies.
2022-01-26 14:07:42 -07:00
Trent Clarke ea176c2b3c
Attempts to make CI integration test logs more useful (#9626)
Actually tracking down the cause of a failure in the integration tests can 
be hard:

* It's hard to get an overall summary of what failed
* The tests sometimes emit no output before timing out, meaning any 
  diagnostic info is lost
* The emitted logs are too voluminous for a human to parse
* The emitted logs can present information out of order
* It's often hard to tell where the output from one test ends 
  and the next one begins

This patch attempts to address these concerns without attempting to rewrite 
any of the underlying teleport logging.

 * It improves the render-tests script to (optionally) report progress per-
   test, rather than on a per-package basis. My working hypothesis on the
   tests that time out with no output is that go test ./integration is
   waiting for the entire set of integration tests tests to be complete
   before reporting success or failure. Reporting on a per-test cycle gives
   faster feedback and means that any timed-out builds should give at least
   some idea of where they are stuck.

 * Adds the render-tests filter to the integration and integration-root make
   targets. This will show an overall summary of test results, as well as
    - Discarding log output from passing tests to increase signal-to-noise 
      ratio, and
    - Strongly delimiting the output from each failed test, making failures 
      easier to find.

 * Removes the notion of a failure-only logger in favour of post-processing
   the log events with render-tests. The failure-only logger catches log
   output from the tests and only forwards it to the console if the test 
   fails. Unfortunately, not all log output is guaranteed to pass through
   this logger (some teleport packages do not honour the configured logger,
   and reports from the go race detector certainly don't), meaning some 
   output is presented at the time it happens, and other output is batched
   and displayed at the end of the test. This makes working out what 
   happened where harder than it need be.

In addition, this patch also promotes the render-tests script into a fully-
fledged program, with appropriate makefile targets, make clean support, etc. 
It is now also more robust in the face on non-JSON output from go test 
(which happens if a package fails to compile).
2022-01-05 10:42:07 +11:00
Joel 4220720826
add .idea to .gitignore for jetbrains (#8311) 2021-09-18 00:51:49 +02:00
Tim Buckley c821ec5f2f
Sign tsh.exe on tag builds (#7897)
* Sign tsh.exe on tag builds

This adds a Makefile step to sign tsh.exe when the
`$WINDOWS_SIGNING_CERTIFICATE` env var is set to a base64-encoded
pkcs12 code signing certificate. The certificate must not be password
protected.

This includes a sample cert (`cert-dummy.pfx`) for CI pipeline
testing. It should be removed in any eventual PR, along with the
other modifications to the drone pipeline. The cert is imported into
the environment in the `Makefile` for testing purposes; in practice
it will be imported from a secure secret store (drone secrets, etc).

* Improve Windows code signing

 - Split signing into a separate step; `release-windows-unsigned` now
   performs the build, `release-windows` signs the binary.
 - Require `release-windows` to successfully generate a signed
   binary.
 - Clearly mark unsigned binaries and archives as such.
 - Guard against stdout secret leakage in Makefiles.
 - Move temporary cert data from Makefile into dronegen to test
   full pipeline.

* Use an invalid cert string for testing purposes.

* Pass certs to the build process via a statically named file

Signed Windows builds now depend on a `.gitignore`'d
`windows-signing-cert.pfx` at the root of the source directory. This
should ease testing and help avoid accidental secret leakage.

* Use production secret

* Remove windows-signing-cert.pfx before continuing to the next step

Additionally, fix variable reference as the bracket syntax does not
seem to play nice with Drone.

* Update .gitignore

Co-authored-by: Andrew Lytvynov <andrew@goteleport.com>

Co-authored-by: Andrew Lytvynov <andrew@goteleport.com>
2021-09-02 16:34:57 -06:00
a-palchikov d301da5a39
Embed webassets natively into teleport instead of attaching to the binary (#5935)
Switch to go1.16. Use embed package to embed webassets instead of ad-hoc attaching to binary
2021-03-26 17:37:52 -07:00
a-palchikov 679941fc17
lib/web: add package-level logger (#4645)
* lib/web: update logging to go through a package-level logger.
Updates https://github.com/gravitational/teleport/issues/4110.
* Unify uses of package-level logger. Update e
* Fix linter warning and tests
* Address review comments
2020-11-05 20:46:54 +01:00
Andrew Lytvynov 78c2a31e44
pam: trigger pam_authenticate on login (#3966)
* pam: trigger pam_authenticate on login

This will trigger any "auth" PAM modules configured on the system for
teleport. For example, Duo 2FA prompt on each connection.
The module will be able to interact with the user (e.g. print prompts).

Also, make PAM env var propagation consistent for port forwarding
sessions.

Fixes https://github.com/gravitational/teleport/issues/3929

* Revamp PAM testing stack

- update PAM policies and module for "auth" step
- use pam_teleport.so from the repo directory instead of guessing
  OS-specific global path
- add tests covering all failure scenarios and generally refactor PAM
  tests

* Build pam_teleport.so during buildbox build inside docker

This removes the need for libpam-devel on the host and reliably compiles
pam_teleport.so in our CI pipeline.
As part of this, combine build.assets/pam/ and modules/pam_teleport to
avoid the need to sync them.
2020-07-10 20:28:33 +00:00
Alexey Kontsevoy 3c670d5d58
Merge Teleport V4.3 UI branch to master (#3583)
* Add monorepo

* Add reset/passwd capability for local users (#3287)

* Add UserTokens to allow password resets

* Pass context down through ChangePasswordWithToken

* Rename UserToken to ResetPasswordToken

* Add auto formatting for proto files

* Add common Marshaller interfaces to reset password token

* Allow enterprise "tctl" reuse OSS user methods (#3344)

* Pass localAuthEnabled flag to UI (#3412)

* Added LocalAuthEnabled prop to WebConfigAuthSetting struct in webconfig.go
* Added LocalAuthEnabled state as part of webCfg in  apiserver.go

* update e-refs

* Fix a regression bug after merge

* Update tctl CLI output msgs (#3442)

* Use local user client when resolving user roles

* Update webapps ref

* Add and retrieve fields from Cluster struct (#3476)

* Set Teleport versions for node, auth, proxy init heartbeat
* Add and retrieve fields NodeCount, PublicURL, AuthVersion from Clusters
* Remove debug logging to avoid log pollution when getting public_addr of proxy
* Create helper func GuessProxyHost to get the public_addr of a proxy host
* Refactor newResetPasswordToken to use GuessProxyHost and remove publicUrl func

* Remove webapps submodule

* Add webassets submodule

* Replace webapps sub-module reference with webassets

* Update webassets path in Makefile

* Update webassets

1b11b26 Simplify and clean up Makefile (#62) https://github.com/gravitational/webapps/commit/1b11b26

* Retrieve cluster details for user context (#3515)

* Let GuessProxyHost also return proxy's version
* Unit test GuessProxyHostAndVersion & GetClusterDetails

* Update webassets

4dfef4e Fix build pipeline (#66) https://github.com/gravitational/webapps/commit/4dfef4e

* Update e-ref

* Update webassets

0647568 Fix OSS redirects https://github.com/gravitational/webapps/commit/0647568

* update e-ref

* Update webassets

e0f4189 Address security audit warnings Updates  "minimist" package which is used by 7y old "optimist". https://github.com/gravitational/webapps/commit/e0f4189

* Add new attr to Session struct (#3574)

* Add fields ServerHostname and ServerAddr
* Set these fields on newSession

* Ensure webassets submodule during build

* Update e-ref

* Ensure webassets before running unit-tests

* Update E-ref

Co-authored-by: Lisa Kim <lisa@gravitational.com>
Co-authored-by: Pierre Beaucamp <pierre@gravitational.com>
Co-authored-by: Jenkins <jenkins@gravitational.io>
2020-04-15 15:35:26 -04:00
Gus Luxton 4aeb9e07b1 Update .gitignore
Add latest docs symlink to main .gitignore
2020-04-15 00:30:33 +00:00
Alexander Klizhentas b2ce1220e9
Updates AWS SDK to 1.28.11 (#3330)
This commit updates AWS Go SDK and fixes #3210

Co-authored-by: Russell Jones <russjones@users.noreply.github.com>
2020-02-06 17:13:20 -08:00
Russell Jones 7cdbd6af5e Update .gitignore to ignore .zip files (Windows build artifact). 2018-10-30 17:01:30 -07:00
Ev Kontsevoy d4cf0bb124 Changes to RBAC chapter 2018-04-06 16:34:31 -07:00
Ev Kontsevoy 0301232124 Updated all versions with the new diagram 2018-03-11 19:09:57 -07:00
Sasha Klizhentas a180d405ab Add sample teleport upgrade procedure 2018-02-06 15:11:02 -08:00
Ev Kontsevoy f9375f359f Added .DS_Store to gitignore 2018-01-17 11:59:55 -08:00
Sasha Klizhentas cd2d2726de Update SDK 2017-11-10 12:22:47 -08:00
Ev Kontsevoy eac2fe7522 Improved documentation-building scripts 2017-08-17 17:03:53 -07:00
Ev Kontsevoy 14cf48d707 Switching to 1.8.3
- Updated Dockerfile to use 1.8.3
- Updated Makefile to stop generating garbage
- Improved one test which failed under Docker
2017-06-01 14:08:31 -07:00
Ev Kontsevoy c52ca519db Found the reason for tsh ls issue
... it requres 'host login' even though you're not loggin into any host
2017-01-27 23:03:09 -08:00
Ev Kontsevoy 5e952e2cf2 Merge branch 'master' into ev/688 2017-01-16 00:59:28 -08:00
Alexey Kontsevoy 6d9348e900 (web) adding multiple clusters support 2016-12-24 14:54:23 -05:00
Ev Kontsevoy 95aa7f1e1c Better timeout handling
ObeyTimeouts() facility was handling errors more arggessively than
needed.

So if you pass net.Conn implementation which does not support timeouts,
it would simply fail on every read() and write() instead of ignoring
them.

Now it ignores them.
2016-12-14 18:08:40 -08:00
Ev Kontsevoy 2f9c669d26 Merge branch 'master' into ev/standalone 2016-10-14 00:11:41 -07:00
Ev Kontsevoy 81c0560553 Version bump 2016-10-10 16:28:04 -07:00
Ev Kontsevoy 263ec1ca1e Added "samples" directory with sample configurations
Also some minor changes around error reporting...
2016-10-09 16:33:18 -07:00
Ev Kontsevoy 020a5404ae Zero-config Vagrant environment with trusted clusters 2016-06-21 12:09:55 -07:00
Ev Kontsevoy 828e6a77aa Simpler version implementation 2016-06-14 18:03:06 -07:00
klizhentas ab302215cf update releases according to comments 2016-03-22 18:22:48 -07:00
Ev Kontsevoy 7dda940b45 Updated .gitignore 2016-03-19 10:41:54 -07:00
Ev Kontsevoy 952c1d6bc3 Clode / structure cleanup 2016-03-15 20:45:04 -07:00
Ev Kontsevoy f87478943c WTF... 2016-03-03 18:06:54 -08:00
Ev Kontsevoy a29c11f1dc Updated .gitignore 2016-03-03 18:03:57 -08:00
Ev Kontsevoy 408ce7483f Removed build artifact (added it to .gitignore) 2016-03-01 18:30:35 -08:00
Ev Kontsevoy 68badf4bc2 Moved the default build output from ./ to out/
Otherwise tctl, teleport and tsh binaries were causing issues with
.gitignore conflicts (we have directories with these names in tool)
2016-02-09 15:05:02 -08:00
Ev Kontsevoy 7592e974cf Merge branch 'ev/105' into ev/105-tctl
Conflicts:
	tool/tctl/main.go
2016-02-09 14:47:59 -08:00
Ev Kontsevoy 5b5dd5b306 Intermediate commit:
- Reverse tunnel service is now configurable
- Separated logging output from the console UI output
2016-02-08 15:02:20 -08:00
Ev Kontsevoy 5a59704e13 Ansible delpoyment script for teleport 2016-01-17 14:50:00 -08:00
Alex Lyulkov 1b71e6b51c Added 2 factor hotp authentication, everyting works 2015-10-23 13:34:09 -07:00
Alexander Klizhentas 0c425d32d5 Initial working prototype 2015-03-14 14:35:43 -07:00
Alexander Klizhentas 1aff702c2a Initial commit 2015-03-02 11:36:00 -08:00