Commit Graph
1740 Commits
Author SHA1 Message Date
Lisa Kim ad4575553e Web: create list db_server endpoint (#53780)
* Web: add list db_server endpoint

* Web: process list db_server responses
2025-04-09 21:58:12 +00:00
Michelle Bergquist 6bbeb1dab6 Omit unresolved tasks on resource if empty (#53834) 2025-04-09 15:16:45 +00:00
Bartosz Leper 71fe1adb1c An endpoint that returns a single role (#53770) 2025-04-09 08:18:06 +00:00
Andrew Burkeandjoerger b4b79e3928 Enable SSO MFA for headless (#53741)
This change adds support for SSO MFA in headless mode.

Co-authored-by: joerger <bjoerger@goteleport.com>
2025-04-07 19:26:21 +00:00
Lisa Kim a2e401650b Partial revert of CSRF auth related removals (#53367)
* Partial revert of CSRF auth related removals

Required to support backwards compatibility of the enterprise
plugin endpoint.

* Remove CSRF checking in header

* Address CR

* Inline helper funcs
2025-04-01 20:32:04 +00:00
STeve (Xin) Huang 93962e1c1c fix an issue expired app session won't redirect to login on DynamoDB backend (#53238)
* Fix an issue expired app session won't redirect to login on DynamoDB backend

* fix ut

* convert all usages from access point
2025-03-31 13:31:24 +00:00
rosstimothy d002d1e43a Require that FnCache keys are comparable (#53565)
Adds an additional type constraint go FnCacheGet and FnCacheGetWithTTL
to enforce that all keys are comparable. This should allow the
removal of various compile time hashability checks that are in
place for existing keys of custom types.
2025-03-29 14:40:32 +00:00
Edoardo Spadolini ccffd6b5be Allow unknown fields when unmarshaling protojson resources (#53469)
* Prohibit implicitly strict protojson unmarshaling

* Avoid jsonpb.Unmarshal

* Define marshal option to disallow unknown fields

* Avoid protojson.Unmarshal

* Disallow unknown fields in tctl create

* Disallow unknown fields in the web UI
2025-03-27 14:35:37 +00:00
rosstimothy be8fe5c76d Join Kubernetes sessions in the web ui (#52993)
Adds the ability to join existing Kubernetes sessions in the web ui
as peers, observers, or modertators.

Closes #52315.
2025-03-25 14:14:48 +00:00
Steven Martin 6200145432 Update tar install to include enterprise suffix (#53323) 2025-03-24 11:31:47 +00:00
Marco Dinis 85f92c3154 Improve error message for invalid application names (#53269)
* Improve error message for invalid application names

* fix tests
2025-03-24 09:44:45 +00:00
Steven Martin 2c170c65cc Update install instrs on package name removal (#53266) 2025-03-21 14:58:00 +00:00
STeve (Xin) Huang 46a528fe11 Avoid Postgres Web Access to dial proxy public address (#52724)
* prototype

* add server name and fix ut

* reduce scope

* fix ut and check client ip

* minor refactor

* remove extra check

* fix GetClusterName after merge

* fix lint
2025-03-20 18:50:27 +00:00
Sakshyam Shah 593ccca057 Web UI: support SAML app launch URLs (#52877)
* feat: MenuLoginWithActionMenu component

* update MenuLogin to accomodate changes for MenuLoginWithActionMenu

* handle samlAppLaunchUrls in makeapp.ts

* update saml app login button

* update app.go to return SAMLAppLaunchURLs

* resource action button:
- added test and story
- handles both action and non-action buttons

* launchExternalUrl props for MenuLogin to open url with <a> tag

* handle memu login onClick to apply onClose callback

* use same comment over be and fe, app_test.go

* add isExternalUrl to LoginItem type instead of MenuLoginProps

* use text-align:left, update story

* proper js comment tag

* extend MenuInputType with NONE value

* update resourceActionButton story

* address review comments

* remove unused waitfor
2025-03-20 18:47:33 +00:00
Noah StrideandMarco Dinis 0586278cde Migrate GetClusterName to gRPC (#53164)
* Adjust GetClusterName method signature to include context.Context

* Start hacking on gRPC GetClusterName impl

* Fix test mocks to match signature

* Fix integration tests

* Fix integrations tests

* Missing ctx

* New GetClusterName RPC implementatin

* Add fallback cluster name

* Correct godoc comment

* Remove unused method

* Remove unused import

* Fix E2E test

* Fix tests

* Fix deferred context cancel in test conflicting with parallel subtests

* Fix import

* Fix imports

* Update lib/auth/auth_with_roles.go

Co-authored-by: Marco Dinis <marco.dinis@goteleport.com>

---------

Co-authored-by: Marco Dinis <marco.dinis@goteleport.com>
2025-03-20 10:07:02 +00:00
Hugo Shaka c20095e9d6 Align semver libs (#52795)
* Convert autoupdate version handling to coreos/go-semver

* get the right version in installer endpoint + get rid of x/mod/semver

* depguard x/mod/semver

* Add nolint rules for existing x/mod/semver usages

* Add depguard explanation
2025-03-19 18:03:35 +00:00
Grzegorz Zdunek 522bd4e984 Improve per-session MFA in a desktop session (#52790)
* Do not try to send an empty MFA challenge in a desktop session

* Prevent a runtime error when neither a challenge nor a request is present

* Do not overwrite MFA errors with a custom message, show an error when the MFA dialog is closed

* Fix a test so that either a request or a challenge is passed

* Desktop Access -> Desktop access

* Reduce nesting
2025-03-06 19:07:32 +00:00
e41c6a347c ListUserTasks WebAPI: include issue type title (#52692)
* ListUserTasks WebAPI: include issue type title

* Update lib/web/ui/usertask.go

Co-authored-by: STeve (Xin) Huang <xin.huang@goteleport.com>

* Update lib/web/ui/usertask.go

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

---------

Co-authored-by: STeve (Xin) Huang <xin.huang@goteleport.com>
Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2025-03-05 10:49:16 +00:00
Marco Dinis 0bf6bfcb73 Escape labels on Node Join scripts (#52350) 2025-03-03 15:24:08 +00:00
Marco Dinis 1fde581ae0 Integration Stats: return open user tasks per task type (#52550)
* Integration Stats: return open user tasks per task type

* remove omitempty from json tags
2025-03-03 10:17:01 +00:00
Hugo Shaka 569cb3cb26 Modulate install script when managed updates v2 are off (#52603)
* Modulate install script when managed updates v2 are off

* fixup! Modulate install script when managed updates v2 are off

* Address Stephen's feedback
2025-02-28 01:59:12 +00:00
Andrew Burke abf9f948ca Add Oracle join method to web ui (#52406) 2025-02-27 21:57:59 +00:00
Gavin Frazar 7bdd9d412b Fix web terminal ssh session creation race (#52408)
* Fix web terminal ssh session creation race

* Encapsulate references to terminal ssh session

This makes it easier to verify that the sshSession is only accessed
after it is ready.

* Closing a stream multiple times is now a no-op
2025-02-26 22:19:30 +00:00
rosstimothy 967053bb94 Use b.Loop in benchmark tests (#52520)
Prefer using b.Loop instead of b.N style benchmarks now that we are
using Go 1.24.

See https://pkg.go.dev/testing#B.Loop for more details.
2025-02-26 19:08:05 +00:00
Hugo ShakaandEdoardo Spadolini 0239d3481b Make node install scripts install Teleport via teleport-update (#52226)
* Make the node install script use teleport-update

* Apply suggestions from code review

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Fix curl args + address bash exec comments

---------

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2025-02-26 17:26:39 +00:00
Lisa Kim 25f9c72eed Create v2 web api endpoint for deleting integration with cleanup (#52286)
* Create v2 endpoint that deletes integration with cleanup support

* Use v2 endpoint with unsupported check

* Option to pass around cleanup resource flag

* Add proxy version custom error if exist

* Address CRs
2025-02-25 18:30:07 +00:00
Marco Dinis ba656766c9 UserTasks: add title per issue type (#52435)
This PR changes the API to return the issue type title.
2025-02-25 17:25:35 +00:00
Hugo Shaka 2ae8e3c1db Allow prerelease Teleport to install official artifacts (#52444) 2025-02-25 16:02:52 +00:00
Hugo Shaka eadbe2d8a1 Refactor node-join script to take safer options and reuse install option logic (#52196)
* Add install script using teleport-update and oneoff.sh

* Refactor node-join script to take safer options and reuse install option logic

* GoDoc + make functions private

* Address edoardo's feedback
2025-02-21 18:44:03 +00:00
Hugo Shaka 59ded01eb3 Add install script using teleport-update and oneoff.sh (#52155) 2025-02-21 15:22:43 +00:00
STeve (Xin) Huang eab298042b GitHub proxy: cleanup git servers when deleting the integration (#52333)
* GitHub proxy: cleanup git servers when deleting the integration

* use DeleteIntegrationRequest
2025-02-21 15:04:01 +00:00
Marco Dinis 4fc9727324 WebAPI: Add state as filter for UserTasks listing endpoint (#52191)
* WebAPI: Add state as filter for UserTasks listing endpoint

* fix pagination bug

* Add filters param to ListUserTasks
2025-02-20 09:24:06 +00:00
fheinecke e3615114b6 Add support for JSON format to '/webapi/auth/export' endpoint (#50193)
* Add support for HTTP 'Accept' header to '/webapi/auth/export' endpoint

Signed-off-by: Fred Heinecke <fred.heinecke@goteleport.com>

* Switch PR to use new `format` parameter

---------

Signed-off-by: Fred Heinecke <fred.heinecke@goteleport.com>
2025-02-19 21:41:35 +00:00
Brian Joerger 3d50f1278b Log obfuscated login error. (#52281) 2025-02-19 18:00:13 +00:00
Lisa Kim 221c3168cc Web: Fixes handling native fetch response that can result in unexpected errors (#52154)
* Web: fix reading JSON from an empty response

* Revert api.fetch to native fetch return type
2025-02-18 21:06:03 +00:00
Maxim Dietz 6152a2edf3 feat: Backend/type changes for Okta Integration enrolment improvements (#51731) 2025-02-17 14:35:53 +00:00
Andrew LeFevre eecd072cc0 verify cluster name of TLS peer certificates (#52128) 2025-02-13 21:25:52 +00:00
Lisa Kim a2688cf6f4 Wrap discover guide preference "pinned" field inside a proto message (#52017)
This allows us to use "nil" value to mean no discover
guide preferences set (which is used to set default
values in the web UI).
2025-02-12 08:43:43 +00:00
Michelle Bergquist 309e54b847 Confirm regions filter isnt empty (#51978) 2025-02-10 16:12:28 +00:00
Michelle Bergquist cb07b42743 Fetch relevant regions for agents endpoint (#51814) 2025-02-07 21:42:29 +00:00
Michael 801bd8fc76 Add env var to disable Role Visualizer (#51880)
This is a temporary escape hatch to disable the role diff visualizer.
2025-02-07 15:21:43 +00:00
Marco Dinis f186fb451f Prevent creation of invalid App for AWS OIDC Integration (#51287)
* Prevent creation of invalid App for AWS OIDC Integration

When enabling AWS Access using an integration, the final address will be
a concatenation of the integration name and the proxy's public address.

The proxy must present a certificate valid for that address.
However, when the integration name has a dot, it will usually not work
with the proxy's certificate.
We know it won't work for Teleport Cloud, where the certificates only
allow for `<app>.<tenant>.teleport.sh`.

So, for Teleport Cloud enabling AWS Access is not possible.
For self-hosted, a warning is emitted.

* prevent new aws oidc integrations with invalid DNS labels

* add integration name to error message

* improve readability of validation.IsDNS1035Label call
2025-02-07 08:16:19 +00:00
Hugo ShakaandTiago Silva f2ff06af10 Use new autoupdate APIs in discovery service (#51758)
* Remove name parameter from proxy version getter

* Use autoupdate_agent_rollout as a source of version in scripts and integrations

* Fix tests

* Handle gracefully absence of a proxy in kube discovery sevrice

* Update lib/srv/discovery/kube_integration_watcher.go

Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>

* Address marco's feedback

* Address marco's feedback pt.2

* Gracefully handle if we can't get autoupdate version

* fixup! Update lib/srv/discovery/kube_integration_watcher.go

---------

Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
2025-02-06 23:59:21 +00:00
Michael 9eac1cfe69 Fetch RequiredApps when resolving app with fqdnHint only (#51800)
If an app is accessed via a bookmark or other means _without_ clicking
the "Launch" button in the web UI, we only have access to the fqdn and
try to resolve the app that way.

After resolution we then try to resolve the app names stored in the
required apps spec. This however relied on the clusterName in the
params.

If that isn't supplied, we can fallback to the cluster name in resolved
app spec instead.

Fixes https://github.com/gravitational/teleport/issues/51140
2025-02-05 15:13:23 +00:00
Lisa Kim 4312c5f00f Web: define discover resource guide ids and add discover user preference field (#51672)
* Add discover resource preferences to user preferences

* Define hard coded guide id consts

* Set guide ids for resources

* Add test

* Address CRs

* Define a new type just for SelectResource.tsx which requires id field
2025-02-04 23:11:02 +00:00
Brian Joerger 0dde594b28 Fix Per-session MFA for leaf apps (#51394)
* Check whether mfa is required for an app session through the correct cluster.

* Add clusterId param for isMfaRequired check in the web api.

* Fix connecting to leaf app directly with MFA.

* Add integration test.

* Add integration test.

* Remove redundant lib.SetInsecureDevMode calls when using testserver.SetupTrustedCluster.

* Reuse new test helpers.

* Focus fix down for apps.
2025-02-04 22:04:54 +00:00
Forrest b9232c3013 transition ssh enforcement to sshca.Identity (#51468) 2025-02-04 18:01:53 +00:00
Marco Dinis 39e9765641 Integration Status endpoint: include pending UserTasks (#51702)
This PR changes the Integration Status endpoint to include the pending
UserTasks for the integration.
This will be used by the frontend to show the number of pending tasks.
2025-02-04 17:47:40 +00:00
rosstimothy 2cced62805 Fix violations of non-constant format strings linter (#51812)
Depends on https://github.com/gravitational/teleport.e/pull/6006.
Now that we are compliant, the ignore rule was removed from the
golangci-lint config to prevent future regressions.
2025-02-04 16:43:35 +00:00
3c07d85b0d [buddy] fix superfluous response call for WS request (#51762)
* fix superfluous response call for WS request

when there is a wrong configured proxy before Teleport
it fails to return a proper error during WebSocket connect operation
because of response.WriteHeader duplicate call

first call is happened in the websocket.Upgrader's `returnError` function after WS headers mismatch
and it only sets status to 400 Bad Request without any text
https://github.com/gorilla/websocket/blob/v1.5.3/server.go#L77

Teleport tries to set the response status but fails to do that:
http: superfluous response.WriteHeader call
and the main reason of the error (missing WS headers) is lost

* add explanation for disabling default WS error handler

Co-authored-by: Tiago Silva <tfsantossilva93@gmail.com>
Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>

* fix gci

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: Artem Nistratov <nistratov.artem@gmail.com>
2025-02-04 15:48:07 +00:00