-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Hosted plugins onboarding prerequisites #23234
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
19 commits
Select commit
Hold shift + click to select a range
4dd9b21
Respect route exactness in TopNav
ca06a75
Allow submitting CSRF token via form
eed9315
Skip "safe" methods in CSRF checks
4953448
Export getXCSRFToken
6a92b0a
Add WithAuth2
86a8029
Passthrough "name" of FieldInput
625fbf0
icomoon: add hashtag icon
9d4abbb
Add GetAvailablePluginTypes to PluginService proto
331d57e
Expose ProxyPublicAddr
a32a7e3
Run prettier
5327469
Merge remote-tracking branch 'origin/master' into justinas/plugin-onb…
261f348
Merge remote-tracking branch 'origin/master' into justinas/plugin-onb…
1a4178e
Merge remote-tracking branch 'origin/master' into justinas/plugin-onb…
7c50fbb
Factor out app.MetaRedirect
bd7871b
Rename: WithAuth2 -> WithAuthCookieAndCSRF
79fefd8
Merge remote-tracking branch 'origin/master' into justinas/plugin-onb…
d9e18da
Run GCI
1599163
Merge remote-tracking branch 'origin/master' into justinas/plugin-onb…
eb8b105
Renegerate protos
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
492 changes: 353 additions & 139 deletions
492
api/gen/proto/go/teleport/plugins/v1/plugin_service.pb.go
Large diffs are not rendered by default.
Oops, something went wrong.
53 changes: 47 additions & 6 deletions
53
api/gen/proto/go/teleport/plugins/v1/plugin_service_grpc.pb.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm slightly unsure about this, but it shouldn't have any security consequences as long as these methods don't change state, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is common practice to exclude "safe" methods for CSRF checks, see e.g.
gorilla/csrf's implementation https://github.com/gorilla/csrf/blob/93379db1992f1b2fbdd4ba1b55a1bf0414b0535e/csrf.go#L242-L244 .OAuth2 flow operates strictly through
GET(although it is doing mutable stuff), which is not quite REST-y. However OAuth uses its ownstateparameter (which we generate/verify, see the Enterprise counterpart) for those requests, which is really more or less just a CSRF token as well. https://stackoverflow.com/questions/26132066/what-is-the-purpose-of-the-state-parameter-in-oauth-authorization-requestThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I also thought about the current usages of
WithCSRFProtection, but I see it was used only for POST/PUT requests.Thanks for the detailed explanation :)