Commit Graph

11 Commits

Author SHA1 Message Date
hackerman d27882faf1
feat: add migrate sql up|down|status (#3894)
This patch adds the ability to execute down migrations using:

```
hydra migrate sql down -e --steps {num_of_steps}
```

Please read `hydra migrate sql down --help` carefully.

Going forward, please use the following commands

```
hydra migrate sql up ...
hydra migrate sql status ...
```

instead of the previous, now deprecated

```
hydra migrate sql ...
hydra migrate status ...
```

commands.

See https://github.com/ory-corp/cloud/issues/7350
2024-11-27 14:14:13 +01:00
Arne Luenser f56e5fad74 fix: append /v2 to module path 2023-01-28 08:40:41 +01:00
Kevin Goslar d768cf6580
docs: standardize license headers (#3216) 2022-11-03 10:10:12 -05:00
Tom Papiernik 9fd2a47341
chore: fix CLI command description (#3248) 2022-09-08 15:41:39 +02:00
aeneasr 3a263854d8 fix: make servicelocator explicit 2022-09-07 08:10:31 +02:00
aeneasr 81e79f2a34 refactor: `hydra token client` command
BREAKING CHANGE: The `hydra token client` command has been renamed to `hydra perform client-credentials` and now supports structured output (JSON, tables, ...).
2022-09-07 08:10:31 +02:00
Vladimir Kalugin 858f2cf362
feat: support for urn:ietf:params:oauth:grant-type:jwt-bearer grant type RFC 7523 (#2384)
This change adds support for JSON Web Token (JWT) Profile for OAuth 2.0 Authorization Grants (RFC7523).
Users of Ory Hydra will be able to grant permission for OAuth 2.0 Client to act on behalf of some Resource Owner using JWT Bearer Assertions.

For more information about this feature, please head over to the documentation: https://www.ory.sh/hydra/docs/next/guides/oauth2-grant-type-jwt-bearer

Closes #2229

BREAKING CHANGES: Please notice that this change requires SQL migrations to be applied! As always, please make a backup before applying them!

Co-authored-by: aeneasr <3372410+aeneasr@users.noreply.github.com>
Co-authored-by: Jagoba Gascón <jagoba@arima.eu>
Co-authored-by: Gajewski Dmitriy <dmit8815@gmail.com>
2021-12-26 20:15:53 +02:00
Flavio Leggio 6ea0bf8f4d
feat: improve delete queries for janitor command (#2540)
This patch improves delete queries by separating the data extraction from actual delete. Extraction is made with a configurable limit, using the `--limit` CLI flag. Deletes use that list in batch mode with a configurable batch size (`--batch-size` CLI flag). Default value for limit is 100000 records and default value for batch size is 100 records.

To improve performance, `LEFT JOIN` is used to select also login and consent requests which did not result in a complete authentication, i.e. user requested login but timed out or user logged in and timed out at consent. Also, two independent `SELECT`s are used in the extraction of login and consent requests eligible for deletion. This solves a bug in the single `SELECT` causing deletion of consent requests where matching login requests were eligible for deletion and vice versa. With independent `SELECT`s we keep consent requests even if matching login request gets deleted.

Closes #2513
2021-08-04 17:46:14 +02:00
aeneasr 8257cb29c8
fix: resolve clidoc issues 2021-03-25 12:20:49 +01:00
aeneasr b7965c6fb4
fix: update janitor help 2021-03-25 10:21:01 +01:00
Alano Terblanche f039ebbdf3
feat: flush inactive/expired login and consent requests (#2381)
This patch resolves various table growth issues caused by expired/inactive login and consent flows never being purged from the database.

You may now use the new `hydra janitor` command to remove access & refresh tokens and login & consent requests which are no longer valid or used. The command follows the `notAfter` safe-guard approach to ensure records needed to be kept are not deleted.

To learn more, please use `hydra help janitor`.

This patch phases out the `/oauth2/flush` endpoint as the janitor is better suited for background tasks, is easier to run in a targeted fashion (e.g. as a singleton job), and does not cause HTTP timeouts.

Closes #1574
2021-03-24 20:58:44 +01:00