Commit Graph

32 Commits

Author SHA1 Message Date
dastein1 c72a31641e
feat: allow to disable claim mirroring (#3563)
This PR introduces another config option called `oauth2:mirror_top_level_claims` which may be used to disable the mirroring of custom claims into the `ext` claim of the jwt.
This new config option is an opt-in. If unused the behavior remains as-is to ensure backwards compatibility.

Example:

```yaml
oauth2:
  allowed_top_level_claims:
    - test_claim
  mirror_top_level_claims: false # -> this will prevent test_claim to be mirrored within ext
```

Closes https://github.com/ory/hydra/issues/3348
2023-08-11 12:04:07 +02:00
Henning Perl f29fe3af97
feat: stateless authorization code flow (#3515)
This patch optimizes the performance of authorization code grant flows by minimizing the number of database queries. We acheive this by storing the flow in an AEAD-encoded cookie and AEAD-encoded request parameters for the authentication and consent screens. 

BREAKING CHANGE:

* The client that is used as part of the authorization grant flow is stored in the AEAD-encoding. Therefore, running flows will not observe updates to the client after they were started.
* Because the login and consent challenge values now include the AEAD-encoded flow, their size increased to around 1kB for a flow without any metadata (and increases linearly with the amount of metadata). Please adjust your ingress / gateway accordingly.
2023-06-12 20:27:00 +02:00
Kevin Goslar d768cf6580
docs: standardize license headers (#3216) 2022-11-03 10:10:12 -05:00
aeneasr 925013e395 chore: remove unused OpenAPI specifications and update snapshots 2022-10-11 17:01:24 +02:00
Nicolas F cd2c252b4b
fix: `allowed_top_level_claims` set to nil (#3245) 2022-09-08 15:54:43 +02:00
aeneasr 468e27d0dd fix(sdk): make session uniquely named 2022-09-07 08:10:31 +02:00
aeneasr 3bb943a9ac fix: session unmarshalling 2022-08-25 13:38:45 +02:00
aeneasr 5c4321d8d6 fix: regression in session store 2022-08-25 13:38:45 +02:00
Serhii Halchenko 6d23859009
feat: add session and requester to refresh token webhook data (#3204)
Closes #3203
2022-08-01 13:27:25 +02:00
Flori 63402dee76
feat: add custom claims to top-level JWT payload (#2545)
Closes #1974

Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com>
2021-06-11 12:29:08 +02:00
lauri 666cd2580d
feat: enable "nbf" (not before) claim to be optional for Access Token (#2437)
Closes #1542
2021-04-04 12:50:59 +02:00
hackerman 11924bf5f7
sql: Resolve index/fk regression issues (#1178)
Closes #1177

Signed-off-by: aeneasr <aeneas@ory.sh>
2018-11-20 00:02:05 +01:00
hackerman 3a10df9bff
oauth2: Add OAuth2 audience claim and improve migrations (#1145)
This patch adds the ability to whitelist and request an audience
when performing any OAuth 2.0 Flow. The audience is useful in multi-
tenant environments where access tokens should be restricted to certain
resources.

Closes #883
Closes #1144

Signed-off-by: arekkas <aeneas@ory.am>
2018-11-02 16:46:01 +01:00
hackerman 80c9d3476b
oauth2: Fix missing session data in jwt at (#1113)
This patch fixes missing session data in OAuth2 Access Tokens formatted as JSON Web Tokens. It also improves e2e tests which now test if claims and data are set correctly, including after refreshes.

Related #1106

Signed-off-by: aeneasr <aeneas@ory.sh>
2018-10-24 15:21:38 +02:00
hackerman 65b7406abe
Move dependencies to ory/x (#1095)
Signed-off-by: aeneasr <aeneas@ory.sh>
2018-10-23 06:59:31 -07:00
arekkas e79014d33b oauth2: Add and enhance access/refresh token tests
This patch introduces more tests for code and refresh flows and the JWT
strategy.

Signed-off-by: arekkas <aeneas@ory.am>
2018-07-23 17:10:30 +02:00
arekkas a8b9b022d9 client: Deprecate field `id`, now only `client_id` is to be used
Signed-off-by: arekkas <aeneas@ory.am>
2018-07-23 17:10:30 +02:00
arekkas c932ab4571 oauth2: Adds JWT Access Token strategy
This patch adds the (experimental) ability to issue JSON Web Tokens instead of ORY Hydra's opaque access tokens. Please be aware that this feature has had little real-world and unit testing and may not be suitable for production.

Simple integration tests using the JWT strategy have been added to ensure functionality.

To use the new JWT strategy, set environment variable `OAUTH2_ACCESS_TOKEN_STRATEGY` to `jwt`. For example: `export OAUTH2_ACCESS_TOKEN_STRATEGY=jwt`.

Please be aware that we (ORY) do not recommend using the JWT strategy for various reasons. If you can, use the default and recommended "opaque" strategy instead.

Closes #248

Signed-off-by: arekkas <aeneas@ory.am>
2018-07-23 17:10:30 +02:00
arekkas a002e30577 oauth2: Improves the consent flow design
This patch makes significant changes to the consent flow. First,
the consent flow is being renamed to "User Login and Consent Flow"
and is split into two redirection flows, the "User Login Redirection Flow"
and the "User Consent Flow".

Conceptually, not a lot has changed but the APIs have been cleaned up
and the new flow is a huge step towards OpenID Connect Certification.

Besides easier implementation on the (previously known as) consent app,
this patch introduces a new set of features which lets ORY Hydra
detect previous logins and previously accepted consent requests. In turn,
the user does not need to login or consent on every OAuth2 Authorize Code
Flow.

This patch additionally lays the foundation for revoking tokens per
user or per user and client.

Awesome.

Closes #771
Closes #772
2018-05-04 14:07:36 +02:00
arekkas 73762c6f9d build: Updates to Go 1.10 2018-04-29 18:25:42 +02:00
arekkas d72efbf577 all: Removes unused code and updates go dep 2018-04-29 18:25:42 +02:00
Aeneas 366ed57d9c
all: Updates license headers (#793) 2018-03-08 10:27:18 +01:00
Aeneas dcbd6d8fcb
Add license header to all source files (#644)
Closes #643
2017-11-06 13:01:53 +01:00
Aeneas Rekkas (arekkas) a89a470b99 oauth2: resolve session issue with deep nested session
Closes #512
2017-06-17 20:24:22 +02:00
Aeneas Rekkas (arekkas) 9be2ff3164 all: goimports 2017-05-07 10:52:08 +02:00
Aeneas Rekkas (arekkas) e912acc3a1 all: move to new org 2017-05-07 10:52:08 +02:00
Aeneas Rekkas (arekkas) 17d243418c ci: gofmt 2016-11-22 12:38:36 +01:00
Aeneas 00bdd28ef4 oauth2: resolve issues with token introspection on user tokens (#309) 2016-11-17 17:34:07 +01:00
Aeneas 8256356b9b 0.6.0 (#293)
* oauth2: scopes should be separated by %20 and not +, to ensure javascript compatibility - closes #277
* oauth2/introspect: make endpoint rfc7662 compatible - closes #289
* warden: make it clear that ladon.Request.Subject is not required or break bc and remove it - closes #270
* travis: execute gox build only when new commit is a new tag - closes #285
* docs: improve introduction (#267)
* core: (health) monitoring endpoint - closes #216
* oauth2/introspect: make endpoint rfc7662 compatible - closes #289
* connections: remove connections API - closes #265
* oauth2: token revocation endpoint - closes #233
* vendor: update to fosite 0.5.0
* core: add sql support #292
* connections: remove connections API - closes #265
* all: coverage report is missing covered lines of nested packages - closes #296
* cmd: prettify the `hydra token user` output - closes #281
* travis: make it possible for travis-ci to build forked repos - closes #295
2016-10-25 12:01:26 +02:00
Aeneas a297f7e57b 🔥 0.2.0 (#165)
* warden: rename `assertion` to `token` - closes #158
* config: do not log database credentials - closes #147
* oauth2: upgrade fosite - close #160
* config: do not store database config in hydra config - closes #164
* oauth2: id_token at_hash / c_hash is null - closes #129
* jwk: improve error message of wrong system secrect - closes #104
* readme: improve images, add benchmarks - closes #161
* cmd: improve connect dialogue - closes #170
* cmd: fix --dry option - closes #157
* firewall: document warden interface sdk
* readme: link openid connect and oauth2 introduction
* cmd: introduce FORCE_ROOT_CLIENT_CREDENTIALS env var - closes #140
* readme: document error redirect to identity provider - closes #96
* internal: fosite store must be consistent to avoid errors - closes #176
* client: add GetConcreteClient to http manager
* cmd: host process now logs basic information on all http requests - closes #178
* all: add memory profiling - closes #179
* warden: resolve nil pointer issue - closes #181
* cmd: clean up env to struct mapping, add more controls
* cmd: bcrypt cost should be configurable - closes #184
* cmd: token lifespans should be configurable - closes #183
* cmd: resolve issues with envirnoment config - closes #182
* cmd: implement tls termination capability - closes #177
* cmd: resolve issues with redirect logic and TLS
* oauth2: implement default oauth2 consent endpoint - closes #185
* warden - closes #188 
* oauth2: id token claims should be set by using id_token - closes #188
* oauth2: oauth2 implicit flow should allow custom protocols - closes #180
* oauth2: core scope should not be mandatory - closes #189
* warden: warden sdk should not make distinction between token and request - closes #190
* warden: rename authorized / allowed endpoints to something more meaningful - closes #162
* ci: improve travis config
2016-08-09 14:05:18 +02:00
Aeneas 24d34b312e warden: resolve date and scope issues
* closes #126 
* closes #125 
* closes #124
2016-06-30 11:11:27 +02:00
Aeneas 00fd93cab2 🔥 0.1-beta 🔥 2016-05-29 11:50:57 +02:00