Skip to content

Commit

Permalink
merge master -> saml
Browse files Browse the repository at this point in the history
  • Loading branch information
sebferrer committed Apr 13, 2022
2 parents 90e6e86 + e505513 commit 77f6f5b
Show file tree
Hide file tree
Showing 2,596 changed files with 505 additions and 3,539 deletions.
2 changes: 1 addition & 1 deletion .docker/Dockerfile-build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax = docker/dockerfile:1-experimental
FROM golang:1.17-alpine3.15 AS base
FROM golang:1.18-alpine3.15 AS base

RUN apk --no-cache --update-cache --upgrade --latest add build-base git gcc bash

Expand Down
2 changes: 1 addition & 1 deletion .docker/Dockerfile-debug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.17.3-buster
FROM golang:1.18-buster
ENV CGO_ENABLED 1

RUN apt-get update && apt-get install -y --no-install-recommends inotify-tools psmisc
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
fetch-depth: 2
- uses: actions/setup-go@v2
with:
go-version: ^1.17
go-version: ^1.18
- run: go list -json > go.list
- name: Run nancy
uses: sonatype-nexus-community/[email protected]
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '^1.17'
go-version: '^1.18'
- name: Install selfservice-ui-react-native
uses: actions/checkout@v2
with:
Expand Down
85 changes: 60 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**

- [ (2022-03-29)](#2022-03-29)
- [ (2022-04-05)](#2022-04-05)
- [Breaking Changes](#breaking-changes)
- [Bug Fixes](#bug-fixes)
- [Code Refactoring](#code-refactoring)
- [Features](#features)
- [Tests](#tests)
- [0.9.0-alpha.3 (2022-03-25)](#090-alpha3-2022-03-25)
- [Breaking Changes](#breaking-changes)
- [Breaking Changes](#breaking-changes-1)
- [Bug Fixes](#bug-fixes-1)
- [Code Generation](#code-generation)
- [Documentation](#documentation)
- [0.9.0-alpha.2 (2022-03-22)](#090-alpha2-2022-03-22)
- [Bug Fixes](#bug-fixes-2)
- [Code Generation](#code-generation-1)
- [0.9.0-alpha.1 (2022-03-21)](#090-alpha1-2022-03-21)
- [Breaking Changes](#breaking-changes-1)
- [Breaking Changes](#breaking-changes-2)
- [Bug Fixes](#bug-fixes-3)
- [Code Generation](#code-generation-2)
- [Code Refactoring](#code-refactoring)
- [Code Refactoring](#code-refactoring-1)
- [Documentation](#documentation-1)
- [Features](#features-1)
- [Tests](#tests-1)
Expand All @@ -30,7 +32,7 @@
- [Code Generation](#code-generation-3)
- [Documentation](#documentation-2)
- [0.8.1-alpha.1 (2021-12-13)](#081-alpha1-2021-12-13)
- [Breaking Changes](#breaking-changes-2)
- [Breaking Changes](#breaking-changes-3)
- [Bug Fixes](#bug-fixes-5)
- [Code Generation](#code-generation-4)
- [Documentation](#documentation-3)
Expand All @@ -42,10 +44,10 @@
- [0.8.0-alpha.2 (2021-10-28)](#080-alpha2-2021-10-28)
- [Code Generation](#code-generation-6)
- [0.8.0-alpha.1 (2021-10-27)](#080-alpha1-2021-10-27)
- [Breaking Changes](#breaking-changes-3)
- [Breaking Changes](#breaking-changes-4)
- [Bug Fixes](#bug-fixes-7)
- [Code Generation](#code-generation-7)
- [Code Refactoring](#code-refactoring-1)
- [Code Refactoring](#code-refactoring-2)
- [Documentation](#documentation-4)
- [Features](#features-3)
- [Reverts](#reverts)
Expand All @@ -72,19 +74,19 @@
- [Documentation](#documentation-7)
- [Tests](#tests-5)
- [0.7.0-alpha.1 (2021-07-13)](#070-alpha1-2021-07-13)
- [Breaking Changes](#breaking-changes-4)
- [Breaking Changes](#breaking-changes-5)
- [Bug Fixes](#bug-fixes-11)
- [Code Generation](#code-generation-13)
- [Code Refactoring](#code-refactoring-2)
- [Code Refactoring](#code-refactoring-3)
- [Documentation](#documentation-8)
- [Features](#features-6)
- [Tests](#tests-6)
- [Unclassified](#unclassified-2)
- [0.6.3-alpha.1 (2021-05-17)](#063-alpha1-2021-05-17)
- [Breaking Changes](#breaking-changes-5)
- [Breaking Changes](#breaking-changes-6)
- [Bug Fixes](#bug-fixes-12)
- [Code Generation](#code-generation-14)
- [Code Refactoring](#code-refactoring-3)
- [Code Refactoring](#code-refactoring-4)
- [0.6.2-alpha.1 (2021-05-14)](#062-alpha1-2021-05-14)
- [Code Generation](#code-generation-15)
- [Documentation](#documentation-9)
Expand All @@ -96,10 +98,10 @@
- [Code Generation](#code-generation-17)
- [Features](#features-8)
- [0.6.0-alpha.1 (2021-05-05)](#060-alpha1-2021-05-05)
- [Breaking Changes](#breaking-changes-6)
- [Breaking Changes](#breaking-changes-7)
- [Bug Fixes](#bug-fixes-14)
- [Code Generation](#code-generation-18)
- [Code Refactoring](#code-refactoring-4)
- [Code Refactoring](#code-refactoring-5)
- [Documentation](#documentation-10)
- [Features](#features-9)
- [Tests](#tests-7)
Expand All @@ -114,7 +116,7 @@
- [0.5.4-alpha.1 (2020-11-11)](#054-alpha1-2020-11-11)
- [Bug Fixes](#bug-fixes-16)
- [Code Generation](#code-generation-20)
- [Code Refactoring](#code-refactoring-5)
- [Code Refactoring](#code-refactoring-6)
- [Documentation](#documentation-12)
- [Features](#features-11)
- [0.5.3-alpha.1 (2020-10-27)](#053-alpha1-2020-10-27)
Expand All @@ -136,10 +138,10 @@
- [Tests](#tests-11)
- [Unclassified](#unclassified-5)
- [0.5.0-alpha.1 (2020-10-15)](#050-alpha1-2020-10-15)
- [Breaking Changes](#breaking-changes-7)
- [Breaking Changes](#breaking-changes-8)
- [Bug Fixes](#bug-fixes-20)
- [Code Generation](#code-generation-24)
- [Code Refactoring](#code-refactoring-6)
- [Code Refactoring](#code-refactoring-7)
- [Documentation](#documentation-16)
- [Features](#features-14)
- [Tests](#tests-12)
Expand All @@ -161,39 +163,39 @@
- [Bug Fixes](#bug-fixes-25)
- [Code Generation](#code-generation-29)
- [0.4.0-alpha.1 (2020-07-08)](#040-alpha1-2020-07-08)
- [Breaking Changes](#breaking-changes-8)
- [Breaking Changes](#breaking-changes-9)
- [Bug Fixes](#bug-fixes-26)
- [Code Generation](#code-generation-30)
- [Code Refactoring](#code-refactoring-7)
- [Code Refactoring](#code-refactoring-8)
- [Documentation](#documentation-18)
- [Features](#features-15)
- [Unclassified](#unclassified-7)
- [0.3.0-alpha.1 (2020-05-15)](#030-alpha1-2020-05-15)
- [Breaking Changes](#breaking-changes-9)
- [Breaking Changes](#breaking-changes-10)
- [Bug Fixes](#bug-fixes-27)
- [Chores](#chores)
- [Code Refactoring](#code-refactoring-8)
- [Code Refactoring](#code-refactoring-9)
- [Documentation](#documentation-19)
- [Features](#features-16)
- [Unclassified](#unclassified-8)
- [0.2.1-alpha.1 (2020-05-05)](#021-alpha1-2020-05-05)
- [Chores](#chores-1)
- [Documentation](#documentation-20)
- [0.2.0-alpha.2 (2020-05-04)](#020-alpha2-2020-05-04)
- [Breaking Changes](#breaking-changes-10)
- [Breaking Changes](#breaking-changes-11)
- [Bug Fixes](#bug-fixes-28)
- [Chores](#chores-2)
- [Code Refactoring](#code-refactoring-9)
- [Code Refactoring](#code-refactoring-10)
- [Documentation](#documentation-21)
- [Features](#features-17)
- [Unclassified](#unclassified-9)
- [0.1.1-alpha.1 (2020-02-18)](#011-alpha1-2020-02-18)
- [Bug Fixes](#bug-fixes-29)
- [Code Refactoring](#code-refactoring-10)
- [Code Refactoring](#code-refactoring-11)
- [Documentation](#documentation-22)
- [0.1.0-alpha.6 (2020-02-16)](#010-alpha6-2020-02-16)
- [Bug Fixes](#bug-fixes-30)
- [Code Refactoring](#code-refactoring-11)
- [Code Refactoring](#code-refactoring-12)
- [Documentation](#documentation-23)
- [Features](#features-18)
- [0.1.0-alpha.5 (2020-02-06)](#010-alpha5-2020-02-06)
Expand Down Expand Up @@ -248,7 +250,34 @@

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# [](https://github.com/ory/kratos/compare/v0.9.0-alpha.3...v) (2022-03-29)
# [](https://github.com/ory/kratos/compare/v0.9.0-alpha.3...v) (2022-04-05)
## Breaking Changes

This patch moves several CLI command to comply with the Ory CLI command structure:

```patch
- ory identities get ...
+ ory get identity ...

- ory identities delete ...
+ ory delete identity ...

- ory identities import ...
+ ory import identity ...

- ory identities list ...
+ ory list identities ...

- ory identities validate ...
+ ory validate identity ...

- ory jsonnet format ...
+ ory format jsonnet ...

- ory jsonnet lint ...
+ ory lint jsonnet ...
```



### Bug Fixes
Expand All @@ -258,9 +287,14 @@
The default mode is 0644, which is allows broader access than necessary.

* **courier:** Add ability to specify backoff ([#2349](https://github.com/ory/kratos/issues/2349)) ([bf970f3](https://github.com/ory/kratos/commit/bf970f32f571164b8081f09f602a3473e079194e))
* Do not expose debug in a response when a schema is not found ([#2348](https://github.com/ory/kratos/issues/2348)) ([aee2b1e](https://github.com/ory/kratos/commit/aee2b1ed1189b57fcbb1aaa456444d5121be94b1))
* Load return_to and append to errors ([#2333](https://github.com/ory/kratos/issues/2333)) ([5efe4a3](https://github.com/ory/kratos/commit/5efe4a33e35e74d248d4eec43dc901b7b6334037)), closes [#2275](https://github.com/ory/kratos/issues/2275) [#2279](https://github.com/ory/kratos/issues/2279) [#2285](https://github.com/ory/kratos/issues/2285)
* Refresh is always false when session exists ([d3436d7](https://github.com/ory/kratos/commit/d3436d7fa17589d91e25c9f0bd66bc3bb5b150fa)), closes [#2341](https://github.com/ory/kratos/issues/2341)

### Code Refactoring

* Move CLI commands to match Ory CLI structure ([73910a3](https://github.com/ory/kratos/commit/73910a329b1ee46de2607c7ab1958ef2fb6de5f4))

### Features

* Add session renew capabilities ([#2146](https://github.com/ory/kratos/issues/2146)) ([4348b86](https://github.com/ory/kratos/commit/4348b8640a282cd61fe30961faba5753e2af8bb0)), closes [#615](https://github.com/ory/kratos/issues/615)
Expand All @@ -272,6 +306,7 @@



* Upgrade to Go 1.18 ([725d202](https://github.com/ory/kratos/commit/725d202e6ae15b3b5c3282e03c03a40480a2e310))

### Tests

Expand Down
24 changes: 17 additions & 7 deletions cmd/identities/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,27 @@ import (
"github.com/ory/x/cmdx"
)

func NewDeleteCmd() *cobra.Command {
func NewDeleteCmd(root *cobra.Command) *cobra.Command {
cmd := &cobra.Command{
Use: "delete",
Short: "Delete resources",
}
cmd.AddCommand(NewDeleteIdentityCmd(root))
cliclient.RegisterClientFlags(cmd.PersistentFlags())
cmdx.RegisterFormatFlags(cmd.PersistentFlags())
return cmd
}

func NewDeleteIdentityCmd(root *cobra.Command) *cobra.Command {
return &cobra.Command{
Use: "delete <id-0 [id-1 ...]>",
Short: "Delete identities by ID",
Use: "identity id-0 [id-1] [id-2] [id-n]",
Short: "Delete one or more identities by their ID(s)",
Long: fmt.Sprintf(`This command deletes one or more identities by ID. To delete an identity by some selector, e.g. the recovery email address, use the list command in combination with jq.
%s
`, clihelpers.WarningJQIsComplicated),
Example: `To delete the identity with the recovery email address "[email protected]", run:
%s`, clihelpers.WarningJQIsComplicated),
Example: fmt.Sprintf(`To delete the identity with the recovery email address "[email protected]", run:
$ kratos identities delete $(kratos identities list --format json | jq -r 'map(select(.recovery_addresses[].value == "[email protected]")) | .[].id')`,
%[1]s delete identity $(%[1]s list identities --format json | jq -r 'map(select(.recovery_addresses[].value == "[email protected]")) | .[].id')`, root.Use),
Args: cobra.MinimumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
c := cliclient.NewClient(cmd)
Expand Down
4 changes: 3 additions & 1 deletion cmd/identities/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"strings"
"testing"

"github.com/spf13/cobra"

"github.com/ory/kratos/cmd/identities"

"github.com/stretchr/testify/assert"
Expand All @@ -18,7 +20,7 @@ import (
)

func TestDeleteCmd(t *testing.T) {
c := identities.NewDeleteCmd()
c := identities.NewDeleteIdentityCmd(new(cobra.Command))
reg := setup(t, c)

t.Run("case=deletes successfully", func(t *testing.T) {
Expand Down
24 changes: 17 additions & 7 deletions cmd/identities/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,31 @@ const (
FlagIncludeCreds = "include-credentials"
)

func NewGetCmd() *cobra.Command {
func NewGetCmd(root *cobra.Command) *cobra.Command {
var cmd = &cobra.Command{
Use: "get",
Short: "Get resources",
}
cmd.AddCommand(NewGetIdentityCmd(root))
cliclient.RegisterClientFlags(cmd.PersistentFlags())
cmdx.RegisterFormatFlags(cmd.PersistentFlags())
return cmd
}

func NewGetIdentityCmd(root *cobra.Command) *cobra.Command {
var (
includeCreds []string
)

cmd := &cobra.Command{
Use: "get <id-0 [id-1 ...]>",
Short: "Get one or more identities by ID",
Use: "identity [id-1] [id-2] [id-n]",
Short: "Get one or more identities by their ID(s)",
Long: fmt.Sprintf(`This command gets all the details about an identity. To get an identity by some selector, e.g. the recovery email address, use the list command in combination with jq.
%s
`, clihelpers.WarningJQIsComplicated),
Example: `To get the identities with the recovery email address at the domain "ory.sh", run:
%s`, clihelpers.WarningJQIsComplicated),
Example: fmt.Sprintf(`To get the identities with the recovery email address at the domain "ory.sh", run:
$ kratos identities get $(kratos identities list --format json | jq -r 'map(select(.recovery_addresses[].value | endswith("@ory.sh"))) | .[].id')`,
%s get identity $(%[1]s ls identities --format json | jq -r 'map(select(.recovery_addresses[].value | endswith("@ory.sh"))) | .[].id')`, root.Use),
Args: cobra.MinimumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
c := cliclient.NewClient(cmd)
Expand Down
4 changes: 3 additions & 1 deletion cmd/identities/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"encoding/json"
"testing"

"github.com/spf13/cobra"

"github.com/ory/kratos/cmd/identities"
"github.com/ory/x/assertx"

Expand All @@ -19,7 +21,7 @@ import (
)

func TestGetCmd(t *testing.T) {
c := identities.NewGetCmd()
c := identities.NewGetIdentityCmd(new(cobra.Command))
reg := setup(t, c)

t.Run("case=gets a single identity", func(t *testing.T) {
Expand Down
Loading

0 comments on commit 77f6f5b

Please sign in to comment.