b4a7fe3221
fix: use expires_in
field for git device refresh ( #8411 )
...
This was causing git auth to never refresh after the token
became expired after 8hrs.
2023-07-11 09:28:52 +00:00
34467a3289
feat: add github device flow for authentication ( #8232 )
...
* feat: add github device flow for authentication
This will allow us to add a GitHub OAuth provider out-of-the-box
to reduce setup requirements.
* Improve askpass view
* Add routes to improve clarity of git auth
* Redesign the git auth page
* Refactor to add a page view
* Fix sideways layout
* Remove legacy notify
* Fix git auth redirects
* Add E2E tests
* Fix route documentation
* Fix imports
* Remove unused imports
* Fix E2E web test
* Fix friendly message appearance
* Fix layout shifting for full-screen sign-in
* Fix height going to 100%
* Fix comments
2023-06-29 18:58:01 +00:00
df31636e72
feat: pass access_token
to coder_git_auth
resource ( #6713 )
...
This allows template authors to leverage git auth to perform
custom actions, like clone repositories.
2023-03-22 19:37:08 +00:00
7f226d4f90
feat: add support for coder_git_auth
data source ( #6334 )
...
* Add git auth providers schema
* Pipe git auth providers to the schema
* Add git auth providers to the API
* Add gitauth endpoint to query authenticated state
* Add endpoint to query git state
* Use BroadcastChannel to automatically authenticate with Git
* Add error validation for submitting the create workspace form
* Fix panic on template dry-run
* Add tests for the template version Git auth endpoint
* Show error if no gitauth is configured
* Add gitauth to cliui
* Fix unused method receiver
* Fix linting errors
* Fix dbauthz querier test
* Fix make gen
* Add JavaScript test for git auth
* Fix bad error message
* Fix provisionerd test race
See https://github.com/coder/coder/actions/runs/4277960646/jobs/7447232814
* Fix requested changes
* Add comment to CreateWorkspacePageView
2023-02-27 10:18:19 -06:00
f05609b4da
chore: format Go more aggressively
2023-02-18 18:32:09 -06:00
1bc4eb5329
fix: fix security vulnerabilities reported by CodeQL ( #5467 )
2022-12-19 19:25:59 +00:00
f239ca7ee3
fix: add the "workflow" scope for managing GitHub Actions with gitauth ( #5461 )
...
Seen in Discord: https://discord.com/channels/747933592273027093/1054155742871031858/1054155742871031858
2022-12-19 15:17:17 +02:00
8bc247d0c9
fix: use proper validate url for gitauth ( #5426 )
...
This was preventing custom validation URLs from being
used to verify git tokens.
2022-12-14 21:02:35 +00:00
8b73844f69
feat: Validate Git tokens before consuming them ( #5167 )
...
* feat: Validate Git tokens before consuming them
This works the exact same way that the Git credential manager does. It ensures the user token is valid before returning it to the client.
It's been manually tested on GitHub, GitLab, and BitBucket.
* Fix requested changes
2022-11-29 12:08:27 -06:00
fc0a493b72
feat: Add no_refresh
option to Git auth configs ( #5097 )
...
This allows organizations to disable refreshing Git tokens
and instead prompt for authentication again.
2022-11-15 21:06:13 +00:00
2042b575dc
feat: Add template display name (backend) ( #4966 )
...
* Rename to nameValidator
* Refactor: NameValid
* Fix: comment
* Define new migration
* Include display_name
* Update typesGenerated.ts
* Update meta
* Adjust tests
* CLI tests
* Fix: audit
* Fix: omitempty
* site: display_name is optional
* unit: TestUsernameValid
* entities.ts: add display_name
* site: TemplateSettingsPage.test.tsx
* Fix: TemplateSettingsForm.tsx
* Adjust tests
* Add comment to display_name column
* Fix: rename
* Fix: make
* Loosen regexp
* Fix: err check
* Fix: template name length
* Allow for whitespaces
* Update migration number
2022-11-10 21:51:09 +01:00
b34a67e6cb
fix: Allow custom Git OAuth URLs ( #4758 )
...
Fixes an issue reported in Discord where custom endpoints
weren't working.
2022-10-27 10:38:05 -07:00
eec406b739
feat: Add Git auth for GitHub, GitLab, Azure DevOps, and BitBucket ( #4670 )
...
* Add scaffolding
* Move migration
* Add endpoints for gitauth
* Add configuration files and tests!
* Update typesgen
* Convert configuration format for git auth
* Fix unclosed database conn
* Add overriding VS Code configuration
* Fix Git screen
* Write VS Code special configuration if providers exist
* Enable automatic cloning from VS Code
* Add tests for gitaskpass
* Fix feature visibiliy
* Add banner for too many configurations
* Fix update loop for oauth token
* Jon comments
* Add deployment config page
2022-10-24 19:46:24 -05:00