-
Notifications
You must be signed in to change notification settings - Fork 4
Comparing changes
Open a pull request
base repository: coder/coder-jetbrains-toolbox
base: main
head repository: coder/coder-jetbrains-toolbox
compare: impl-support-for-oauth
- 13 commits
- 17 files changed
- 1 contributor
Commits on Oct 9, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 8bfee5e - Browse repository at this point
Copy the full SHA 8bfee5eView commit details -
impl: setup auth manager with auth and token endpoints
Toolbox API comes with a basic oauth2 client. This commit sets-up details about two important oauth flows: - authorization flow, in which the user is sent to web page where an authorization code is generated which is exchanged for an access token. - details about token refresh endpoint where users can obtain a new access token and a new refresh token. A couple of important aspects: - the client app id is resolved in upstream - as well as the actual endpoints for authorization and token refresh - S256 is the only code challenge supported
Configuration menu - View commit details
-
Copy full SHA for 1a3415b - Browse repository at this point
Copy the full SHA 1a3415bView commit details
Commits on Oct 13, 2025
-
impl: retrieve supported response type and the dynamic client registr…
…ation url OAuth endpoint `.well-known/oauth-authorization-server` provides metadata about the endpoint for dynamic client registration and supported response types. This commit adds support for deserializing these values.
Configuration menu - View commit details
-
Copy full SHA for 7685feb - Browse repository at this point
Copy the full SHA 7685febView commit details -
impl: models for dynamic client registration
OAuth allows programatic client registration for apps like Coder Toolbox via the DCR endpoint which requires a name for the client app, the requested scopes, redirect URI, etc... DCR replies back with a similar structure but in addition it returs two very important properties: client_id - a unique client identifier string and also a client_secret - a secret string value used by clients to authenticate to the token endpoint.
Configuration menu - View commit details
-
Copy full SHA for 52648a0 - Browse repository at this point
Copy the full SHA 52648a0View commit details -
impl: pixy secure code generator
Code Toolbox plugin should protect against authorization code interception attacks by making use of the PKCE security extension which involves a cryptographically random string (128 characters) known as code verifier and a code challenge - derived from code verifier using the S256 challenge method.
Configuration menu - View commit details
-
Copy full SHA for 72a902f - Browse repository at this point
Copy the full SHA 72a902fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e03b03 - Browse repository at this point
Copy the full SHA 0e03b03View commit details -
impl: factory method for the auth manager
The OAuth2-compatible authentication manager provided by Toolbox
Configuration menu - View commit details
-
Copy full SHA for 79ba4cb - Browse repository at this point
Copy the full SHA 79ba4cbView commit details -
impl: improve auth manager config
- authentication and token endpoints are now passed via the login configuration object - similar for client_id and client_secret - PCKE is now enabled
Configuration menu - View commit details
-
Copy full SHA for 59d2abd - Browse repository at this point
Copy the full SHA 59d2abdView commit details
Commits on Oct 14, 2025
-
refactor: simplify OAuth manager architecture and improve dependency …
…injection - remove ServiceLocator dependency from CoderToolboxContext - move OAuth manager creation to CoderToolboxExtension for cleaner separation - Refactor CoderOAuthManager to use configuration-based approach instead of constructor injection The idea behind these changes is that createRefreshConfig API does not receive a configuration object that can provide the client id and secret and even the refresh url. So initially we worked around the issue by passing the necessary data via the constructor. However this approach means a couple of things: - the actual auth manager can be created only at a very late stage, when a URL is provided by users - can't easily pass arround the auth manager without coupling the components - have to recreate a new auth manager instance if the user logs out and logs in to a different URL - service locator needs to be passed around because this is the actual factory of oauth managers in Toolbox Instead, we went with a differet approach, COderOAuthManager will derive and store the refresh configs once the authorization config is received. If the user logs out and logs in to a different URL the refresh data is also guaranteed to be updated. And on top of that - this approach allows us to get rid of all of the issues mentioned above.
Configuration menu - View commit details
-
Copy full SHA for decb082 - Browse repository at this point
Copy the full SHA decb082View commit details -
Configuration menu - View commit details
-
Copy full SHA for d432a76 - Browse repository at this point
Copy the full SHA d432a76View commit details -
Toolbox can handle automatically the exchange of an authorization code with a token by handling the custom URI for oauth. This commit calls the necessary API in the Coder Toolbox URI handling.
Configuration menu - View commit details
-
Copy full SHA for 2a28cee - Browse repository at this point
Copy the full SHA 2a28ceeView commit details
Commits on Oct 16, 2025
-
fix: wrong client app registration endpoint
POST /api/v2/oauth2-provider/apps is actually for manual admin registration for admin created apps. Programmatic Dynamic Client Registration is done via `POST /oauth2/register`. At the same time I included `registration_access_token` and `registration_client_uri` to use it later in order to refresh the client secret without re-registering the client app.
Configuration menu - View commit details
-
Copy full SHA for 6462f14 - Browse repository at this point
Copy the full SHA 6462f14View commit details -
impl: simple way of triggering the OAuth flow.
A bunch of code thrown around to launch the OAuth flow. Still needs a couple of things: - persist the client id and registration uri and token - re-use client id instead of re-register every time - properly handle scenarios where OAuth is not available - the OAuth right now can be enabled if we log out and then hit next in the deployment screen
Configuration menu - View commit details
-
Copy full SHA for 0e46da0 - Browse repository at this point
Copy the full SHA 0e46da0View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...impl-support-for-oauth