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

fix: Issue DeviceWebToken during Github authn #44656

Merged
merged 6 commits into from
Jul 29, 2024

Conversation

codingllama
Copy link
Contributor

@codingllama codingllama commented Jul 25, 2024

Issue a device web token during GitHub authn.

I've taken the opportunity to also calculate the "trusted device requirement" when a new session is created via CreateWebSessionFromReq (which should address regular and SSO logins too).

Partly addresses GitHub for issue #44598 (missing the frontend hooks).

@codingllama codingllama added no-changelog Indicates that a PR does not require a changelog entry backport/branch/v16 labels Jul 25, 2024
@codingllama codingllama changed the title Issue DeviceWebToken during Github authn fix: Issue DeviceWebToken during Github authn Jul 25, 2024
@github-actions github-actions bot requested review from atburke and r0mant July 25, 2024 19:39
@codingllama codingllama requested a review from rosstimothy July 25, 2024 19:41
@codingllama
Copy link
Contributor Author

Requires https://github.com/gravitational/teleport.e/pull/4753 to work properly (otherwise web tokens are only issued to newly-enrolled devices).

@codingllama
Copy link
Contributor Author

FYI @avatus.

@codingllama
Copy link
Contributor Author

I've moved some of the logic around in a9f0fd7 so we create tokens as part of CreateWebSessionFromReq - this works much better with upcoming SAML/OIDC changes.

Commit 3f619a3 only moves some funcs around, no changes.

@codingllama codingllama force-pushed the codingllama/dtw-sso-gh branch from 3f619a3 to b34a2de Compare July 26, 2024 14:18
@codingllama
Copy link
Contributor Author

Rebased onto latest master and solved protogen conflicts.

@codingllama
Copy link
Contributor Author

Friendly ping @r0mant @rosstimothy @atburke ?

@codingllama codingllama requested a review from avatus July 29, 2024 13:32
@codingllama codingllama force-pushed the codingllama/dtw-sso-gh branch from b34a2de to f36f3d1 Compare July 29, 2024 20:29
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from avatus July 29, 2024 20:30
@codingllama codingllama enabled auto-merge July 29, 2024 20:30
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from atburke July 29, 2024 20:30
@codingllama codingllama added this pull request to the merge queue Jul 29, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 29, 2024
@codingllama codingllama added this pull request to the merge queue Jul 29, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jul 29, 2024
* Move trusted device mode calculation into CreateWebSessionFromReq

* Add the GithubAuthRequest.ClientUserAgent field

* Update generated protos

* Issue DeviceWebToken during Github authn

* Issue DeviceWebToken as part of CreateWebSessionFromReq

* nit: Move methods to sessions.go
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jul 29, 2024
@codingllama codingllama added this pull request to the merge queue Jul 29, 2024
Merged via the queue into master with commit 14dccc6 Jul 29, 2024
41 checks passed
@codingllama codingllama deleted the codingllama/dtw-sso-gh branch July 29, 2024 22:34
@public-teleport-github-review-bot

@codingllama See the table below for backport results.

Branch Result
branch/v16 Failed

codingllama added a commit that referenced this pull request Jul 30, 2024
* Move trusted device mode calculation into CreateWebSessionFromReq

* Add the GithubAuthRequest.ClientUserAgent field

* Update generated protos

* Issue DeviceWebToken during Github authn

* Issue DeviceWebToken as part of CreateWebSessionFromReq

* nit: Move methods to sessions.go
codingllama added a commit that referenced this pull request Jul 30, 2024
* Move trusted device mode calculation into CreateWebSessionFromReq

* Add the GithubAuthRequest.ClientUserAgent field

* Update generated protos

* Issue DeviceWebToken during Github authn

* Issue DeviceWebToken as part of CreateWebSessionFromReq

* nit: Move methods to sessions.go
github-merge-queue bot pushed a commit that referenced this pull request Jul 30, 2024
* fix: Issue DeviceWebToken during Github authn (#44656)

* Move trusted device mode calculation into CreateWebSessionFromReq

* Add the GithubAuthRequest.ClientUserAgent field

* Update generated protos

* Issue DeviceWebToken during Github authn

* Issue DeviceWebToken as part of CreateWebSessionFromReq

* nit: Move methods to sessions.go

* Fix imports and merged code

* Fix imports yet again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v16 no-changelog Indicates that a PR does not require a changelog entry size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants