diff --git a/.goreleaser.yml b/.goreleaser.yml index 17a88268b31..044714615b7 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -19,7 +19,7 @@ builds: - -tags - sqlite ldflags: - - -s -w -X github.com/ory/kratos/cmd.BuildVersion={{.Tag}} -X github.com/ory/kratos/cmd.BuildGitHash={{.FullCommit}} -X github.com/ory/kratos/cmd.BuildTime={{.Date}} + - -s -w -X github.com/ory/kratos/internal/clihelpers.BuildVersion={{.Tag}} -X github.com/ory/kratos/internal/clihelpers.BuildGitHash={{.FullCommit}} -X github.com/ory/kratos/internal/clihelpers.BuildTime={{.Date}} # - "-extldflags '-static'" binary: kratos env: @@ -37,7 +37,7 @@ builds: - -tags - sqlite ldflags: - - -s -w -X github.com/ory/kratos/cmd.BuildVersion={{.Tag}} -X github.com/ory/kratos/cmd.BuildGitHash={{.FullCommit}} -X github.com/ory/kratos/cmd.BuildTime={{.Date}} + - -s -w -X github.com/ory/kratos/internal/clihelpers.BuildVersion={{.Tag}} -X github.com/ory/kratos/internal/clihelpers.BuildGitHash={{.FullCommit}} -X github.com/ory/kratos/internal/clihelpers.BuildTime={{.Date}} binary: kratos env: - CGO_ENABLED=1 @@ -51,7 +51,7 @@ builds: - -tags - sqlite ldflags: - - -s -w -X github.com/ory/kratos/cmd.BuildVersion={{.Tag}} -X github.com/ory/kratos/cmd.BuildGitHash={{.FullCommit}} -X github.com/ory/kratos/cmd.BuildTime={{.Date}} + - -s -w -X github.com/ory/kratos/internal/clihelpers.BuildVersion={{.Tag}} -X github.com/ory/kratos/internal/clihelpers.BuildGitHash={{.FullCommit}} -X github.com/ory/kratos/internal/clihelpers.BuildTime={{.Date}} binary: kratos env: - CGO_ENABLED=1 @@ -66,7 +66,7 @@ builds: - -tags - sqlite ldflags: - - -s -w -X github.com/ory/kratos/cmd.BuildVersion={{.Tag}} -X github.com/ory/kratos/cmd.BuildGitHash={{.FullCommit}} -X github.com/ory/kratos/cmd.BuildTime={{.Date}} + - -s -w -X github.com/ory/kratos/internal/clihelpers.BuildVersion={{.Tag}} -X github.com/ory/kratos/internal/clihelpers.BuildGitHash={{.FullCommit}} -X github.com/ory/kratos/internal/clihelpers.BuildTime={{.Date}} - "-extldflags '-static'" binary: kratos env: @@ -81,7 +81,7 @@ builds: - id: kratos ldflags: - - -s -w -X github.com/ory/kratos/cmd.BuildVersion={{.Tag}} -X github.com/ory/kratos/cmd.BuildGitHash={{.FullCommit}} -X github.com/ory/kratos/cmd.BuildTime={{.Date}} + - -s -w -X github.com/ory/kratos/internal/clihelpers.BuildVersion={{.Tag}} -X github.com/ory/kratos/internal/clihelpers.BuildGitHash={{.FullCommit}} -X github.com/ory/kratos/internal/clihelpers.BuildTime={{.Date}} binary: kratos env: - CGO_ENABLED=0 diff --git a/cmd/identities.go b/cmd/identities.go deleted file mode 100644 index 04210944977..00000000000 --- a/cmd/identities.go +++ /dev/null @@ -1,26 +0,0 @@ -package cmd - -import ( - "github.com/spf13/cobra" -) - -// identitiesCmd represents the identity command -var identitiesCmd = &cobra.Command{ - Use: "identities", -} - -func init() { - rootCmd.AddCommand(identitiesCmd) - - identitiesCmd.PersistentFlags().String("endpoint", "", "Specifies the Ory Kratos Admin URL. Defaults to KRATOS_URLS_ADMIN") - - // Here you will define your flags and configuration settings. - - // Cobra supports Persistent Flags which will work for this command - // and all subcommands, e.g.: - // identitiesCmd.PersistentFlags().String("foo", "", "A help for foo") - - // Cobra supports local flags which will only run when this command - // is called directly, e.g.: - // identitiesCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") -} diff --git a/cmd/identities/identities.go b/cmd/identities/identities.go new file mode 100644 index 00000000000..5f7c960a885 --- /dev/null +++ b/cmd/identities/identities.go @@ -0,0 +1,22 @@ +package identities + +import ( + "github.com/spf13/cobra" + + "github.com/ory/kratos/cmd/identities/port" +) + +// identitiesCmd represents the identity command +var identitiesCmd = &cobra.Command{ + Use: "identities", +} + +func RegisterCommandRecursive(parent *cobra.Command) { + parent.AddCommand(identitiesCmd) + + port.RegisterCommandRecursive(identitiesCmd) +} + +func init() { + identitiesCmd.PersistentFlags().String("endpoint", "", "Specifies the Ory Kratos Admin URL. Defaults to KRATOS_URLS_ADMIN") +} diff --git a/cmd/identities/port/import.go b/cmd/identities/port/import.go new file mode 100644 index 00000000000..2ac870c9773 --- /dev/null +++ b/cmd/identities/port/import.go @@ -0,0 +1,17 @@ +package port + +import ( + "github.com/spf13/cobra" + + "github.com/ory/kratos/cmd/client" +) + +// importCmd represents the import command +var importCmd = &cobra.Command{ + Use: "import ", + Run: client.NewIdentityClient().Import, +} + +func RegisterCommandRecursive(parent *cobra.Command) { + parent.AddCommand(importCmd) +} diff --git a/cmd/identities_import.go b/cmd/identities_import.go deleted file mode 100644 index 58dd07fd97d..00000000000 --- a/cmd/identities_import.go +++ /dev/null @@ -1,27 +0,0 @@ -package cmd - -import ( - "github.com/ory/kratos/cmd/client" - - "github.com/spf13/cobra" -) - -// importCmd represents the import command -var importCmd = &cobra.Command{ - Use: "import ", - Run: client.NewIdentityClient().Import, -} - -func init() { - identitiesCmd.AddCommand(importCmd) - - // Here you will define your flags and configuration settings. - - // Cobra supports Persistent Flags which will work for this command - // and all subcommands, e.g.: - // importCmd.PersistentFlags().String("foo", "", "A help for foo") - - // Cobra supports local flags which will only run when this command - // is called directly, e.g.: - // importCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") -} diff --git a/cmd/jsonnet_format.go b/cmd/jsonnet/format/format.go similarity index 91% rename from cmd/jsonnet_format.go rename to cmd/jsonnet/format/format.go index 06cff83970c..e08f8ef33f2 100644 --- a/cmd/jsonnet_format.go +++ b/cmd/jsonnet/format/format.go @@ -13,13 +13,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -package cmd +package format import ( "fmt" "io/ioutil" "path/filepath" + "github.com/ory/kratos/internal/clihelpers" + "github.com/google/go-jsonnet/formatter" "github.com/spf13/cobra" @@ -34,7 +36,7 @@ var jsonnetFormatCmd = &cobra.Command{ Use -w or --write to write output back to files instead of stdout. -` + globHelp, +` + clihelpers.JsonnetGlobHelp, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { for _, pattern := range args { @@ -60,7 +62,10 @@ Use -w or --write to write output back to files instead of stdout. }, } +func RegisterCommandRecursive(parent *cobra.Command) { + parent.AddCommand(jsonnetFormatCmd) +} + func init() { - jsonnetCmd.AddCommand(jsonnetFormatCmd) jsonnetFormatCmd.Flags().BoolP("write", "w", false, "Write formatted output back to file.") } diff --git a/cmd/jsonnet/jsonnet.go b/cmd/jsonnet/jsonnet.go new file mode 100644 index 00000000000..5a1c513bade --- /dev/null +++ b/cmd/jsonnet/jsonnet.go @@ -0,0 +1,21 @@ +package jsonnet + +import ( + "github.com/spf13/cobra" + + "github.com/ory/kratos/cmd/jsonnet/format" + "github.com/ory/kratos/cmd/jsonnet/lint" +) + +// jsonnetCmd represents the jsonnet command +var jsonnetCmd = &cobra.Command{ + Use: "jsonnet", + Short: "Helpers for linting and formatting JSONNet code", +} + +func RegisterCommandRecursive(parent *cobra.Command) { + parent.AddCommand(jsonnetCmd) + + format.RegisterCommandRecursive(jsonnetCmd) + lint.RegisterCommandRecursive(jsonnetCmd) +} diff --git a/cmd/jsonnet_lint.go b/cmd/jsonnet/lint/lint.go similarity index 86% rename from cmd/jsonnet_lint.go rename to cmd/jsonnet/lint/lint.go index 165b3610762..9c88a72f791 100644 --- a/cmd/jsonnet_lint.go +++ b/cmd/jsonnet/lint/lint.go @@ -1,4 +1,4 @@ -package cmd +package lint import ( "fmt" @@ -6,6 +6,8 @@ import ( "os" "path/filepath" + "github.com/ory/kratos/internal/clihelpers" + "github.com/google/go-jsonnet" "github.com/google/go-jsonnet/linter" "github.com/spf13/cobra" @@ -18,7 +20,7 @@ var jsonnetLintCmd = &cobra.Command{ Use: "lint path/to/files/*.jsonnet [more/files.jsonnet, [supports/**/{foo,bar}.jsonnet]]", Long: `Lints JSONNet files using the official JSONNet linter and exits with a status code of 1 when issues are detected. -` + globHelp, +` + clihelpers.JsonnetGlobHelp, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { for _, pattern := range args { @@ -43,6 +45,6 @@ var jsonnetLintCmd = &cobra.Command{ }, } -func init() { - jsonnetCmd.AddCommand(jsonnetLintCmd) +func RegisterCommandRecursive(parent *cobra.Command) { + parent.AddCommand(jsonnetLintCmd) } diff --git a/cmd/migrate.go b/cmd/migrate.go deleted file mode 100644 index df43db3bc81..00000000000 --- a/cmd/migrate.go +++ /dev/null @@ -1,15 +0,0 @@ -package cmd - -import ( - "github.com/spf13/cobra" -) - -// migrateCmd represents the migrate command -var migrateCmd = &cobra.Command{ - Use: "migrate", - Short: "Various migration helpers", -} - -func init() { - rootCmd.AddCommand(migrateCmd) -} diff --git a/cmd/migrate/migrate.go b/cmd/migrate/migrate.go new file mode 100644 index 00000000000..54c4ca873d9 --- /dev/null +++ b/cmd/migrate/migrate.go @@ -0,0 +1,19 @@ +package migrate + +import ( + "github.com/spf13/cobra" + + "github.com/ory/kratos/cmd/migrate/sql" +) + +// migrateCmd represents the migrate command +var migrateCmd = &cobra.Command{ + Use: "migrate", + Short: "Various migration helpers", +} + +func RegisterCommandRecursive(parent *cobra.Command) { + parent.AddCommand(migrateCmd) + + sql.RegisterCommandRecursive(migrateCmd) +} diff --git a/cmd/migrate_sql.go b/cmd/migrate/sql/migrate_sql.go similarity index 92% rename from cmd/migrate_sql.go rename to cmd/migrate/sql/migrate_sql.go index 9bf31ac096b..3f35717969f 100644 --- a/cmd/migrate_sql.go +++ b/cmd/migrate/sql/migrate_sql.go @@ -13,16 +13,20 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -package cmd +package sql import ( "github.com/spf13/cobra" + "github.com/ory/x/logrusx" + "github.com/ory/x/viperx" "github.com/ory/kratos/cmd/client" ) +var logger *logrusx.Logger + // migrateSqlCmd represents the sql command var migrateSqlCmd = &cobra.Command{ Use: "sql ", @@ -48,9 +52,11 @@ Before running this command on an existing database, create a back up! }, } -func init() { - migrateCmd.AddCommand(migrateSqlCmd) +func RegisterCommandRecursive(parent *cobra.Command) { + parent.AddCommand(migrateSqlCmd) +} +func init() { migrateSqlCmd.Flags().BoolP("read-from-env", "e", false, "If set, reads the database connection string from the environment variable DSN or config file key dsn.") migrateSqlCmd.Flags().BoolP("yes", "y", false, "If set all confirmation requests are accepted without user interaction.") } diff --git a/cmd/root.go b/cmd/root.go index 97f14cec0cc..3e56c2541a0 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -4,14 +4,18 @@ import ( "fmt" "os" - "github.com/ory/x/logrusx" + "github.com/ory/kratos/cmd/identities" + "github.com/ory/kratos/cmd/jsonnet" + "github.com/ory/kratos/cmd/migrate" + "github.com/ory/kratos/cmd/serve" + "github.com/ory/kratos/internal/clihelpers" + "github.com/ory/x/cmdx" + "github.com/ory/x/viperx" "github.com/spf13/cobra" ) -var logger *logrusx.Logger - // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ Use: "kratos", @@ -28,4 +32,11 @@ func Execute() { func init() { viperx.RegisterConfigFlag(rootCmd, "kratos") + + identities.RegisterCommandRecursive(rootCmd) + jsonnet.RegisterCommandRecursive(rootCmd) + serve.RegisterCommandRecursive(rootCmd) + migrate.RegisterCommandRecursive(rootCmd) + + rootCmd.AddCommand(cmdx.Version(&clihelpers.BuildVersion, &clihelpers.BuildGitHash, &clihelpers.BuildTime)) } diff --git a/cmd/serve.go b/cmd/serve/serve.go similarity index 81% rename from cmd/serve.go rename to cmd/serve/serve.go index 7d08c1aba14..acfe07edf2b 100644 --- a/cmd/serve.go +++ b/cmd/serve/serve.go @@ -12,12 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -package cmd +package serve import ( "os" "strconv" + "github.com/ory/kratos/internal/clihelpers" + "github.com/ory/x/logrusx" + "github.com/ory/kratos/driver/configuration" "github.com/ory/x/viperx" @@ -31,6 +34,8 @@ import ( "github.com/ory/kratos/x" ) +var logger *logrusx.Logger + // serveCmd represents the serve command var serveCmd = &cobra.Command{ Use: "serve", @@ -50,23 +55,25 @@ DON'T DO THIS IN PRODUCTION! } x.WatchAndValidateViper(logger) - d := driver.MustNewDefaultDriver(logger, BuildVersion, BuildTime, BuildGitHash, dev) + d := driver.MustNewDefaultDriver(logger, clihelpers.BuildVersion, clihelpers.BuildTime, clihelpers.BuildGitHash, dev) configVersion := d.Configuration().ConfigVersion() if configVersion == configuration.UnknownVersion { d.Logger().Warn("The config has no version specified. Add the version to improve your development experience.") - } else if BuildVersion != "" && - configVersion != BuildVersion { - d.Logger().Warnf("Config version is '%s' but kratos runs on version '%s'", configVersion, BuildVersion) + } else if clihelpers.BuildVersion != "" && + configVersion != clihelpers.BuildVersion { + d.Logger().Warnf("Config version is '%s' but kratos runs on version '%s'", configVersion, clihelpers.BuildVersion) } daemon.ServeAll(d)(cmd, args) }, } -func init() { - rootCmd.AddCommand(serveCmd) +func RegisterCommandRecursive(parent *cobra.Command) { + parent.AddCommand(serveCmd) +} +func init() { disableTelemetryEnv, _ := strconv.ParseBool(os.Getenv("DISABLE_TELEMETRY")) serveCmd.PersistentFlags().Bool("disable-telemetry", disableTelemetryEnv, "Disable anonymized telemetry reports - for more information please visit https://www.ory.sh/docs/ecosystem/sqa") serveCmd.PersistentFlags().Bool("dev", false, "Disables critical security features to make development easier") diff --git a/cmd/version.go b/cmd/version.go deleted file mode 100644 index 77474e33749..00000000000 --- a/cmd/version.go +++ /dev/null @@ -1,15 +0,0 @@ -package cmd - -import ( - "github.com/ory/x/cmdx" -) - -var ( - BuildVersion = "" - BuildTime = "" - BuildGitHash = "" -) - -func init() { - rootCmd.AddCommand(cmdx.Version(&BuildVersion, &BuildGitHash, &BuildTime)) -} diff --git a/docs/config.js b/docs/config.js index 4857a172c3f..bd506676eca 100644 --- a/docs/config.js +++ b/docs/config.js @@ -1,29 +1,35 @@ module.exports = { projectName: 'ORY Kratos', projectSlug: 'kratos', - projectTagLine: 'Never build user login, user registration, 2fa, profile management ever again! Works on any operating system, cloud, with any programming language, user interface, and user experience! Written in Go.', + projectTagLine: + 'Never build user login, user registration, 2fa, profile management ever again! Works on any operating system, cloud, with any programming language, user interface, and user experience! Written in Go.', updateTags: [ { image: 'oryd/kratos', files: ['docs/docs/quickstart.mdx'] }, { - replacer: ({content, next}) => content.replace(/git checkout (v[0-9a-zA-Z\\.\\-]+)/gi, `git checkout ${next}`), + replacer: ({ content, next }) => + content.replace( + /git checkout (v[0-9a-zA-Z\\.\\-]+)/gi, + `git checkout ${next}` + ), files: [ 'docs/docs/guides/zero-trust-iap-proxy-identity-access-proxy.mdx', - 'docs/docs/quickstart.mdx', + 'docs/docs/quickstart.mdx' ] }, { - replacer: ({content, next}) => content.replace(/v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/gi, `${next}`), - files: [ - 'docs/docs/install.md', - 'docs/docs/quickstart.mdx', - ] + replacer: ({ content, next }) => + content.replace( + /v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/gi, + `${next}` + ), + files: ['docs/docs/install.md', 'docs/docs/quickstart.mdx'] } ], updateConfig: { src: '.schema/config.schema.json', dst: './docs/docs/reference/configuration.md' } -}; +} diff --git a/docs/docs/further-reading/kratos-video-tutorials.mdx b/docs/docs/further-reading/kratos-video-tutorials.mdx index c4b4ff4ef52..596901bcae7 100644 --- a/docs/docs/further-reading/kratos-video-tutorials.mdx +++ b/docs/docs/further-reading/kratos-video-tutorials.mdx @@ -88,51 +88,69 @@ tutorials. - +
Transcript Kratos Sign in with Github -Welcome to the Sign in with Github Tutorial for ORY Kratos. +Welcome to the Sign in with Github Tutorial for ORY Kratos. -This continues where we left off with the Quickstart Tutorial for Kratos, so if you haven’t done the Quickstart already, check that out. +This continues where we left off with the Quickstart Tutorial for Kratos, so if +you haven’t done the Quickstart already, check that out. -To be able to offer “Sign in with github” you have to create a GitHub OAuth2 Client. +To be able to offer “Sign in with github” you have to create a GitHub OAuth2 +Client. -So you go to your settings page on your github profile, then developer settings, then OAuth apps, then register a new application. +So you go to your settings page on your github profile, then developer settings, +then OAuth apps, then register a new application. -You can pick any name that suits you, then put the Kratos login in the homepage url, that is the port 4455 on your localhost. +You can pick any name that suits you, then put the Kratos login in the homepage +url, that is the port 4455 on your localhost. -You use this port in the quickstart for our SecureApp. - If you are not familiar with this self service app, check the links in the description. +You use this port in the quickstart for our SecureApp. If you are not familiar +with this self service app, check the links in the description. -Next you put in the Authorization callback URL. -This URL is built really simple, so first you have the kratos domain and the port and just at the end you put in the OIDC provider ID, in this case github. +Next you put in the Authorization callback URL. This URL is built really simple, +so first you have the kratos domain and the port and just at the end you put in +the OIDC provider ID, in this case github. -This provider ID must point to the provider's ID set in the ORY Kratos configuration file. +This provider ID must point to the provider's ID set in the ORY Kratos +configuration file. -I’ll link a document in the description, that explains this in more detail, also how you can implement any other OIDC provider. +I’ll link a document in the description, that explains this in more detail, also +how you can implement any other OIDC provider. Now navigate to the Kratos directory and create a new file. -If you are unsure where your kratos directory is (in my case it is my Git folder) you can look it up on docker. +If you are unsure where your kratos directory is (in my case it is my Git +folder) you can look it up on docker. -Now you have to create a JSONNNET code for the provider in this case github. -so you just copy this code, create a new file called O ID C dot github dot jsonnet and save +Now you have to create a JSONNNET code for the provider in this case github. so +you just copy this code, create a new file called O ID C dot github dot jsonnet +and save -Next you enable the OIDC provider in the Kratos configuration located in the same directory. -Just copy this part of the code, this is basically what Kratos needs to understand your OIDC provider. -Just copy it in your configuration file and save. +Next you enable the OIDC provider in the Kratos configuration located in the +same directory. Just copy this part of the code, this is basically what Kratos +needs to understand your OIDC provider. Just copy it in your configuration file +and save. -The final step to get this working is to get the client id and the client secret . -Those are provided to you by the Github oauth app. -You input those into your kratos yaml and now it should be ready to go! +The final step to get this working is to get the client id and the client secret +. Those are provided to you by the Github oauth app. You input those into your +kratos yaml and now it should be ready to go! -Now navigate to the login of your selfservice app and you should see “login with github”. +Now navigate to the login of your selfservice app and you should see “login with +github”. -Once your account is authorized you will be redirected to the login page and you can login with github now. +Once your account is authorized you will be redirected to the login page and you +can login with github now. -That was it for this tutorial, if you like to know more check the links in the description, -if you have any feedback leave me a message in the comment section. +That was it for this tutorial, if you like to know more check the links in the +description, if you have any feedback leave me a message in the comment section. and I'm looking forward to seeing you in the next one!
diff --git a/docs/docs/index.md b/docs/docs/index.md index 4c6384b18d2..a6d57efb54f 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -32,9 +32,9 @@ Kubernetes) most: - ORY Kratos does not ship an HTML Rendering Engine. You can build your own UI (or use our example UIs) in the language and framework you feel most comfortable with. -- The workflow engine allows you to fully customize your user experience. Whether - your users need to activate their account after registration, or have a - multi-step (progressive) registration - it's all possible! +- The workflow engine allows you to fully customize your user experience. + Whether your users need to activate their account after registration, or have + a multi-step (progressive) registration - it's all possible! - One Identity Data Model does not fit all - you may have customers that need a billing address, internal support staff that is assigned to a cost center, and that smart fridge on floor 4. You can express the different data models using diff --git a/docs/docs/milestones.md b/docs/docs/milestones.md index 200e4cf1747..56b09fa7087 100644 --- a/docs/docs/milestones.md +++ b/docs/docs/milestones.md @@ -5,7 +5,7 @@ title: Milestones and Roadmap ## [v0.7.0-alpha.1](https://github.com/ory/kratos/milestone/9) -*This milestone does not have a description.* +_This milestone does not have a description._ ### [Feat](https://github.com/ory/kratos/labels/feat) @@ -13,14 +13,18 @@ New feature or request. #### Issues -* [ ] Selfservice account deletion ([kratos#596](https://github.com/ory/kratos/issues/596)) -* [ ] Implement Hydra integration ([kratos#273](https://github.com/ory/kratos/issues/273)) -* [ ] Self-service GDPR identity export ([kratos#658](https://github.com/ory/kratos/issues/658)) -* [ ] Admin/Selfservice session management ([kratos#655](https://github.com/ory/kratos/issues/655)) +- [ ] Selfservice account deletion + ([kratos#596](https://github.com/ory/kratos/issues/596)) +- [ ] Implement Hydra integration + ([kratos#273](https://github.com/ory/kratos/issues/273)) +- [ ] Self-service GDPR identity export + ([kratos#658](https://github.com/ory/kratos/issues/658)) +- [ ] Admin/Selfservice session management + ([kratos#655](https://github.com/ory/kratos/issues/655)) ## [v0.6.0-alpha.1](https://github.com/ory/kratos/milestone/8) -*This milestone does not have a description.* +_This milestone does not have a description._ ### [Bug](https://github.com/ory/kratos/labels/bug) @@ -28,9 +32,12 @@ Something is not working. #### Issues -* [ ] Sending JSON to complete oidc/password strategy flows causes CSRF issues ([kratos#378](https://github.com/ory/kratos/issues/378)) -* [ ] Unmable to use Auth0 as a generic OIDC provider ([kratos#609](https://github.com/ory/kratos/issues/609)) -* [ ] Password reset emails sent twice by each of the two kratos pods in my cluster ([kratos#652](https://github.com/ory/kratos/issues/652)) +- [ ] Sending JSON to complete oidc/password strategy flows causes CSRF issues + ([kratos#378](https://github.com/ory/kratos/issues/378)) +- [ ] Unmable to use Auth0 as a generic OIDC provider + ([kratos#609](https://github.com/ory/kratos/issues/609)) +- [ ] Password reset emails sent twice by each of the two kratos pods in my + cluster ([kratos#652](https://github.com/ory/kratos/issues/652)) ### [Feat](https://github.com/ory/kratos/labels/feat) @@ -38,21 +45,42 @@ New feature or request. #### Issues -* [ ] Implement Security Questions MFA ([kratos#469](https://github.com/ory/kratos/issues/469)) -* [ ] Feature request: adjustable thresholds on how many times a password has been in a breach according to haveibeenpwned ([kratos#450](https://github.com/ory/kratos/issues/450)) -* [ ] Do not send credentials to hooks ([kratos#77](https://github.com/ory/kratos/issues/77)) - [@hackerman](https://github.com/aeneasr) -* [ ] Implement immutable keyword in JSON Schema for Identity Traits ([kratos#117](https://github.com/ory/kratos/issues/117)) -* [ ] Add filters to admin api ([kratos#249](https://github.com/ory/kratos/issues/249)) -* [ ] Feature Request: Webhooks ([kratos#271](https://github.com/ory/kratos/issues/271)) -* [ ] Support email verification paswordless login ([kratos#286](https://github.com/ory/kratos/issues/286)) -* [ ] Support remote argon2 execution ([kratos#357](https://github.com/ory/kratos/issues/357)) - [@hackerman](https://github.com/aeneasr) -* [ ] Implement identity state and administrative deactivation, deletion of identities ([kratos#598](https://github.com/ory/kratos/issues/598)) - [@hackerman](https://github.com/aeneasr) -* [ ] SMTP Error spams the server logs ([kratos#402](https://github.com/ory/kratos/issues/402)) -* [ ] Gracefully handle CSRF errors ([kratos#91](https://github.com/ory/kratos/issues/91)) - [@hackerman](https://github.com/aeneasr) -* [ ] How to sign in with Twitter ([kratos#517](https://github.com/ory/kratos/issues/517)) -* [ ] Add ability to import user credentials ([kratos#605](https://github.com/ory/kratos/issues/605)) - [@hackerman](https://github.com/aeneasr) -* [ ] Throttling repeated login requests ([kratos#654](https://github.com/ory/kratos/issues/654)) -* [ ] Require identity deactivation before administrative deletion ([kratos#657](https://github.com/ory/kratos/issues/657)) +- [ ] Implement Security Questions MFA + ([kratos#469](https://github.com/ory/kratos/issues/469)) +- [ ] Feature request: adjustable thresholds on how many times a password has + been in a breach according to haveibeenpwned + ([kratos#450](https://github.com/ory/kratos/issues/450)) +- [ ] Do not send credentials to hooks + ([kratos#77](https://github.com/ory/kratos/issues/77)) - + [@hackerman](https://github.com/aeneasr) +- [ ] Implement immutable keyword in JSON Schema for Identity Traits + ([kratos#117](https://github.com/ory/kratos/issues/117)) +- [ ] Add filters to admin api + ([kratos#249](https://github.com/ory/kratos/issues/249)) +- [ ] Feature Request: Webhooks + ([kratos#271](https://github.com/ory/kratos/issues/271)) +- [ ] Support email verification paswordless login + ([kratos#286](https://github.com/ory/kratos/issues/286)) +- [ ] Support remote argon2 execution + ([kratos#357](https://github.com/ory/kratos/issues/357)) - + [@hackerman](https://github.com/aeneasr) +- [ ] Implement identity state and administrative deactivation, deletion of + identities ([kratos#598](https://github.com/ory/kratos/issues/598)) - + [@hackerman](https://github.com/aeneasr) +- [ ] SMTP Error spams the server logs + ([kratos#402](https://github.com/ory/kratos/issues/402)) +- [ ] Gracefully handle CSRF errors + ([kratos#91](https://github.com/ory/kratos/issues/91)) - + [@hackerman](https://github.com/aeneasr) +- [ ] How to sign in with Twitter + ([kratos#517](https://github.com/ory/kratos/issues/517)) +- [ ] Add ability to import user credentials + ([kratos#605](https://github.com/ory/kratos/issues/605)) - + [@hackerman](https://github.com/aeneasr) +- [ ] Throttling repeated login requests + ([kratos#654](https://github.com/ory/kratos/issues/654)) +- [ ] Require identity deactivation before administrative deletion + ([kratos#657](https://github.com/ory/kratos/issues/657)) ### [Help wanted](https://github.com/ory/kratos/labels/help%20wanted) @@ -60,8 +88,12 @@ We are looking for help on this one. #### Issues -* [ ] Document that identity information (traits, etc) are available to token holders and backend systems ([kratos#43](https://github.com/ory/kratos/issues/43)) - [@hackerman](https://github.com/aeneasr) -* [ ] Feature Request: Webhooks ([kratos#271](https://github.com/ory/kratos/issues/271)) +- [ ] Document that identity information (traits, etc) are available to token + holders and backend systems + ([kratos#43](https://github.com/ory/kratos/issues/43)) - + [@hackerman](https://github.com/aeneasr) +- [ ] Feature Request: Webhooks + ([kratos#271](https://github.com/ory/kratos/issues/271)) ### [Docs](https://github.com/ory/kratos/labels/docs) @@ -69,9 +101,15 @@ Affects documentation. #### Issues -* [ ] Document that identity information (traits, etc) are available to token holders and backend systems ([kratos#43](https://github.com/ory/kratos/issues/43)) - [@hackerman](https://github.com/aeneasr) -* [ ] Config JSON Schema needs example values ([kratos#179](https://github.com/ory/kratos/issues/179)) - [@hackerman](https://github.com/aeneasr) -* [ ] Elaborate on security practices against DoS and Brute Force ([kratos#134](https://github.com/ory/kratos/issues/134)) +- [ ] Document that identity information (traits, etc) are available to token + holders and backend systems + ([kratos#43](https://github.com/ory/kratos/issues/43)) - + [@hackerman](https://github.com/aeneasr) +- [ ] Config JSON Schema needs example values + ([kratos#179](https://github.com/ory/kratos/issues/179)) - + [@hackerman](https://github.com/aeneasr) +- [ ] Elaborate on security practices against DoS and Brute Force + ([kratos#134](https://github.com/ory/kratos/issues/134)) ### [Rfc](https://github.com/ory/kratos/labels/rfc) @@ -79,7 +117,8 @@ A request for comments to discuss and share ideas. #### Issues -* [ ] Introduce prevent extension in Identity JSON schema ([kratos#47](https://github.com/ory/kratos/issues/47)) +- [ ] Introduce prevent extension in Identity JSON schema + ([kratos#47](https://github.com/ory/kratos/issues/47)) ## [v0.5.0-alpha.1](https://github.com/ory/kratos/milestone/5) @@ -91,14 +130,27 @@ Something is not working. #### Issues -* [ ] Logout does not use new cookie domain setting ([kratos#645](https://github.com/ory/kratos/issues/645)) -* [ ] Refresh Sessions Without Having to Log In Again ([kratos#615](https://github.com/ory/kratos/issues/615)) - [@hackerman](https://github.com/aeneasr) -* [ ] Email field type changes on second request for request context during registration flow ([kratos#670](https://github.com/ory/kratos/issues/670)) -* [x] Generate a new UUID/token after every interaction ([kratos#236](https://github.com/ory/kratos/issues/236)) - [@hackerman](https://github.com/aeneasr) -* [x] UNIQUE constraint failure when updating identities via Admin API ([kratos#325](https://github.com/ory/kratos/issues/325)) - [@hackerman](https://github.com/aeneasr) -* [x] Can not update an identity using PUT /identities/{id} ([kratos#435](https://github.com/ory/kratos/issues/435)) -* [x] Verification email is sent after password recovery ([kratos#578](https://github.com/ory/kratos/issues/578)) - [@hackerman](https://github.com/aeneasr) -* [x] Do not return expired sessions in `/sessions/whoami` ([kratos#611](https://github.com/ory/kratos/issues/611)) - [@hackerman](https://github.com/aeneasr) +- [ ] Logout does not use new cookie domain setting + ([kratos#645](https://github.com/ory/kratos/issues/645)) +- [ ] Refresh Sessions Without Having to Log In Again + ([kratos#615](https://github.com/ory/kratos/issues/615)) - + [@hackerman](https://github.com/aeneasr) +- [ ] Email field type changes on second request for request context during + registration flow ([kratos#670](https://github.com/ory/kratos/issues/670)) +- [x] Generate a new UUID/token after every interaction + ([kratos#236](https://github.com/ory/kratos/issues/236)) - + [@hackerman](https://github.com/aeneasr) +- [x] UNIQUE constraint failure when updating identities via Admin API + ([kratos#325](https://github.com/ory/kratos/issues/325)) - + [@hackerman](https://github.com/aeneasr) +- [x] Can not update an identity using PUT /identities/{id} + ([kratos#435](https://github.com/ory/kratos/issues/435)) +- [x] Verification email is sent after password recovery + ([kratos#578](https://github.com/ory/kratos/issues/578)) - + [@hackerman](https://github.com/aeneasr) +- [x] Do not return expired sessions in `/sessions/whoami` + ([kratos#611](https://github.com/ory/kratos/issues/611)) - + [@hackerman](https://github.com/aeneasr) ### [Feat](https://github.com/ory/kratos/labels/feat) @@ -106,25 +158,53 @@ New feature or request. #### Issues -* [ ] Design of the client cli ([kratos#663](https://github.com/ory/kratos/issues/663)) - [@Patrik](https://github.com/zepatrik) -* [ ] Rename `request_lifespan` to `lifespan` ([kratos#666](https://github.com/ory/kratos/issues/666)) - [@hackerman](https://github.com/aeneasr) -* [ ] Implement React SPA sample app ([kratos#668](https://github.com/ory/kratos/issues/668)) - [@hackerman](https://github.com/aeneasr) -* [ ] Implement React Native sample application consuming API ([kratos#667](https://github.com/ory/kratos/issues/667)) - [@hackerman](https://github.com/aeneasr) -* [x] Implement JSON capabilities in ErrorHandler ([kratos#61](https://github.com/ory/kratos/issues/61)) - [@hackerman](https://github.com/aeneasr) -* [x] Allow attaching credentials to identities in CRUD create ([kratos#200](https://github.com/ory/kratos/issues/200)) -* [x] Move away from UUID-based challenges and responses ([kratos#241](https://github.com/ory/kratos/issues/241)) - [@hackerman](https://github.com/aeneasr) -* [x] Add tests to prevent duplicate migration files ([kratos#282](https://github.com/ory/kratos/issues/282)) - [@Patrik](https://github.com/zepatrik) -* [x] Session cookie (ory_kratos_session) expired time should be configurable ([kratos#326](https://github.com/ory/kratos/issues/326)) - [@hackerman](https://github.com/aeneasr) -* [x] Can not update an identity using PUT /identities/{id} ([kratos#435](https://github.com/ory/kratos/issues/435)) -* [x] Make session cookie 'domain' property configurable ([kratos#516](https://github.com/ory/kratos/issues/516)) -* [x] Remove one of in-memory/on-disk SQLite e2e runners and replace with faster test ([kratos#580](https://github.com/ory/kratos/issues/580)) - [@Andreas Bucksteeg](https://github.com/tricky42) -* [x] Password similarity policy is too strict ([kratos#581](https://github.com/ory/kratos/issues/581)) - [@Patrik](https://github.com/zepatrik) -* [x] Implement a test-error for implementing the Error UI ([kratos#610](https://github.com/ory/kratos/issues/610)) +- [ ] Design of the client cli + ([kratos#663](https://github.com/ory/kratos/issues/663)) - + [@Patrik](https://github.com/zepatrik) +- [ ] Rename `request_lifespan` to `lifespan` + ([kratos#666](https://github.com/ory/kratos/issues/666)) - + [@hackerman](https://github.com/aeneasr) +- [ ] Implement React SPA sample app + ([kratos#668](https://github.com/ory/kratos/issues/668)) - + [@hackerman](https://github.com/aeneasr) +- [ ] Implement React Native sample application consuming API + ([kratos#667](https://github.com/ory/kratos/issues/667)) - + [@hackerman](https://github.com/aeneasr) +- [x] Implement JSON capabilities in ErrorHandler + ([kratos#61](https://github.com/ory/kratos/issues/61)) - + [@hackerman](https://github.com/aeneasr) +- [x] Allow attaching credentials to identities in CRUD create + ([kratos#200](https://github.com/ory/kratos/issues/200)) +- [x] Move away from UUID-based challenges and responses + ([kratos#241](https://github.com/ory/kratos/issues/241)) - + [@hackerman](https://github.com/aeneasr) +- [x] Add tests to prevent duplicate migration files + ([kratos#282](https://github.com/ory/kratos/issues/282)) - + [@Patrik](https://github.com/zepatrik) +- [x] Session cookie (ory_kratos_session) expired time should be configurable + ([kratos#326](https://github.com/ory/kratos/issues/326)) - + [@hackerman](https://github.com/aeneasr) +- [x] Can not update an identity using PUT /identities/{id} + ([kratos#435](https://github.com/ory/kratos/issues/435)) +- [x] Make session cookie 'domain' property configurable + ([kratos#516](https://github.com/ory/kratos/issues/516)) +- [x] Remove one of in-memory/on-disk SQLite e2e runners and replace with faster + test ([kratos#580](https://github.com/ory/kratos/issues/580)) - + [@Andreas Bucksteeg](https://github.com/tricky42) +- [x] Password similarity policy is too strict + ([kratos#581](https://github.com/ory/kratos/issues/581)) - + [@Patrik](https://github.com/zepatrik) +- [x] Implement a test-error for implementing the Error UI + ([kratos#610](https://github.com/ory/kratos/issues/610)) #### Pull Requests -* [ ] feat: implement API-based self-service flows ([kratos#624](https://github.com/ory/kratos/pull/624)) - [@hackerman](https://github.com/aeneasr) -* [x] fix: resolve identity admin api issues ([kratos#586](https://github.com/ory/kratos/pull/586)) - [@hackerman](https://github.com/aeneasr) +- [ ] feat: implement API-based self-service flows + ([kratos#624](https://github.com/ory/kratos/pull/624)) - + [@hackerman](https://github.com/aeneasr) +- [x] fix: resolve identity admin api issues + ([kratos#586](https://github.com/ory/kratos/pull/586)) - + [@hackerman](https://github.com/aeneasr) ### [Help wanted](https://github.com/ory/kratos/labels/help%20wanted) @@ -132,8 +212,11 @@ We are looking for help on this one. #### Issues -* [ ] Design of the client cli ([kratos#663](https://github.com/ory/kratos/issues/663)) - [@Patrik](https://github.com/zepatrik) -* [ ] Email field type changes on second request for request context during registration flow ([kratos#670](https://github.com/ory/kratos/issues/670)) +- [ ] Design of the client cli + ([kratos#663](https://github.com/ory/kratos/issues/663)) - + [@Patrik](https://github.com/zepatrik) +- [ ] Email field type changes on second request for request context during + registration flow ([kratos#670](https://github.com/ory/kratos/issues/670)) ### [Docs](https://github.com/ory/kratos/labels/docs) @@ -141,8 +224,11 @@ Affects documentation. #### Issues -* [ ] Remove reverse proxy from node example and rely on port and the domain parameter ([kratos#661](https://github.com/ory/kratos/issues/661)) - [@hackerman](https://github.com/aeneasr) -* [x] Document multi-tenant set up ([kratos#370](https://github.com/ory/kratos/issues/370)) +- [ ] Remove reverse proxy from node example and rely on port and the domain + parameter ([kratos#661](https://github.com/ory/kratos/issues/661)) - + [@hackerman](https://github.com/aeneasr) +- [x] Document multi-tenant set up + ([kratos#370](https://github.com/ory/kratos/issues/370)) ### [Rfc](https://github.com/ory/kratos/labels/rfc) @@ -150,7 +236,9 @@ A request for comments to discuss and share ideas. #### Issues -* [ ] Rename login/registration/recovery/... request to flow ([kratos#635](https://github.com/ory/kratos/issues/635)) - [@hackerman](https://github.com/aeneasr) +- [ ] Rename login/registration/recovery/... request to flow + ([kratos#635](https://github.com/ory/kratos/issues/635)) - + [@hackerman](https://github.com/aeneasr) ### [Blocking](https://github.com/ory/kratos/labels/blocking) @@ -158,12 +246,18 @@ Blocks milestones or other issues or pulls. #### Issues -* [ ] Remove reverse proxy from node example and rely on port and the domain parameter ([kratos#661](https://github.com/ory/kratos/issues/661)) - [@hackerman](https://github.com/aeneasr) -* [ ] Rename `request_lifespan` to `lifespan` ([kratos#666](https://github.com/ory/kratos/issues/666)) - [@hackerman](https://github.com/aeneasr) +- [ ] Remove reverse proxy from node example and rely on port and the domain + parameter ([kratos#661](https://github.com/ory/kratos/issues/661)) - + [@hackerman](https://github.com/aeneasr) +- [ ] Rename `request_lifespan` to `lifespan` + ([kratos#666](https://github.com/ory/kratos/issues/666)) - + [@hackerman](https://github.com/aeneasr) #### Pull Requests -* [ ] feat: implement API-based self-service flows ([kratos#624](https://github.com/ory/kratos/pull/624)) - [@hackerman](https://github.com/aeneasr) +- [ ] feat: implement API-based self-service flows + ([kratos#624](https://github.com/ory/kratos/pull/624)) - + [@hackerman](https://github.com/aeneasr) ### [Breaking change](https://github.com/ory/kratos/labels/breaking%20change) @@ -171,8 +265,12 @@ Changes behavior in a breaking manner. #### Issues -* [ ] Rename `request_lifespan` to `lifespan` ([kratos#666](https://github.com/ory/kratos/issues/666)) - [@hackerman](https://github.com/aeneasr) +- [ ] Rename `request_lifespan` to `lifespan` + ([kratos#666](https://github.com/ory/kratos/issues/666)) - + [@hackerman](https://github.com/aeneasr) #### Pull Requests -* [ ] feat: implement API-based self-service flows ([kratos#624](https://github.com/ory/kratos/pull/624)) - [@hackerman](https://github.com/aeneasr) \ No newline at end of file +- [ ] feat: implement API-based self-service flows + ([kratos#624](https://github.com/ory/kratos/pull/624)) - + [@hackerman](https://github.com/aeneasr) diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 814cc60571d..c7c3b9de835 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -2,13 +2,12 @@ const config = require('./contrib/config.js') const fs = require('fs') const admonitions = require('remark-admonitions') -const githubRepoName = config.projectSlug === 'ecosystem' - ? 'docs' - : config.projectSlug +const githubRepoName = + config.projectSlug === 'ecosystem' ? 'docs' : config.projectSlug const links = [ { - to: "/", + to: '/', activeBasePath: `${config.projectSlug}/docs`, label: `Docs`, position: 'left' @@ -80,7 +79,9 @@ module.exports = { logo: { alt: config.projectName, src: `img/logo-${config.projectSlug}.svg`, - href: `https://www.ory.sh/${config.projectSlug === 'ecosystem' ? '' : config.projectSlug}` + href: `https://www.ory.sh/${ + config.projectSlug === 'ecosystem' ? '' : config.projectSlug + }` }, items: links }, diff --git a/cmd/jsonnet.go b/internal/clihelpers/helpers.go similarity index 74% rename from cmd/jsonnet.go rename to internal/clihelpers/helpers.go index 6cb286a1a32..4f3779c877e 100644 --- a/cmd/jsonnet.go +++ b/internal/clihelpers/helpers.go @@ -1,10 +1,6 @@ -package cmd +package clihelpers -import ( - "github.com/spf13/cobra" -) - -const globHelp = `Glob Syntax: +const JsonnetGlobHelp = `Glob Syntax: pattern: { term } @@ -29,12 +25,8 @@ const globHelp = `Glob Syntax: pattern { ',' pattern } comma-separated (without spaces) patterns` -// jsonnetCmd represents the jsonnet command -var jsonnetCmd = &cobra.Command{ - Use: "jsonnet", - Short: "Helpers for linting and formatting JSONNet code", -} - -func init() { - rootCmd.AddCommand(jsonnetCmd) -} +var ( + BuildVersion = "" + BuildTime = "" + BuildGitHash = "" +) diff --git a/x/http_secure_redirect_test.go b/x/http_secure_redirect_test.go index a341dd3cdbe..b086e8c12cd 100644 --- a/x/http_secure_redirect_test.go +++ b/x/http_secure_redirect_test.go @@ -86,7 +86,7 @@ func TestSecureRedirectTo(t *testing.T) { } defaultReturnTo := "/default-return-to" if !isRelative { - defaultReturnTo = ts.URL+defaultReturnTo + defaultReturnTo = ts.URL + defaultReturnTo } ru, err := x.SecureRedirectTo(r, urlx.ParseOrPanic(defaultReturnTo), opts(ts)...) if expectErr {