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

Allow public clients created with API to have no client_secret #1871

Merged
merged 1 commit into from
Feb 19, 2021

Conversation

spohner
Copy link
Contributor

@spohner spohner commented Nov 24, 2020

Overview:
Allows public clients created with the API to have no client_secret to support the PKCE flow.

What problem does it solve?:
Closes: #1870. Now all clients with no client_secret created by the API gets a random secret. This adds a check if the client is public and allows for empty client_secret if that is the case.

Signed-off-by: Steffen Pøhner Henriksen <str3sses@gmail.com>
Copy link

@cyrilzh cyrilzh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code requires public client has no "secret" value (req.Client.Secret == "" && !req.Client.Public). This is inconsistent with the document in which the public client has secret value.
https://dexidp.io/docs/custom-scopes-claims-clients/#public-clients

Copy link
Member

@bonifaido bonifaido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bonifaido bonifaido merged commit 0f68fad into dexidp:master Feb 19, 2021
xtremerui pushed a commit to concourse/dex that referenced this pull request Mar 16, 2021
The official docker release for this release can be pulled from

```
ghcr.io/dexidp/dex:v2.28.0
```

**Features:**

- Add c_hash to id_token, issued on /auth endpoint, when in hybrid flow (dexidp#1773, @HEllRZA)
- Allow configuration of returned auth proxy header (dexidp#1839, @seuf)
- Allow to disable os.ExpandEnv for storage + connector configs by env variable DEX_EXPAND_ENV = false (dexidp#1902, @heidemn-faro)
- Added the possibility to activate lowercase for UPN-Strings (dexidp#1888, @VF-mbrauer)
- Add "Cache-control: no-store" and "Pragma: no-cache" headers to token responses (dexidp#1948, @nabokihms)
- Add gomplate to the docker image (dexidp#1893, @nabokihms)
- Graceful shutdown (dexidp#1963, @nabokihms)
- Allow public clients created with API to have no client_secret (dexidp#1871, @spohner)

**Bugfixes:**

- Fix the etcd PKCE AuthCode deserialization (dexidp#1908, @bnu0)
- Fix garbage collection logging of device codes and device request (dexidp#1918, @nabokihms)
- Discovery endpoint contains updated claims and auth methods (dexidp#1951, @nabokihms)
- Return invalid_grant error if auth code is invalid or expired (dexidp#1952, @nabokihms)
- Return an error to auth requests with the "request" parameter (dexidp#1956, @nabokihms)

**Minor changes:**

- Change default themes to light/dark (dexidp#1858, @nabokihms)
- Various developer experience improvements
- Dependency upgrades
- Tons of small fixes and changes
elffjs pushed a commit to DIMO-Network/dex that referenced this pull request Jun 27, 2022
…p#1871)

Signed-off-by: Steffen Pøhner Henriksen <str3sses@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding public clients without secret through API not possible
5 participants