kratos

command module
v0.0.3-alpha.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

README

ORY Kratos - Cloud native Identity and User Management

Chat | Forums | Newsletter

Guide | API Docs | Code Docs

Support this project!


Build Status Coverage Status Go Report Card CII Best Practices

ORY Kratos is the first and only cloud native Identity and User Management System in the world. Finally, it is no longer necessary to implement a User Login process for the umpteenth time!

Table of Contents

What is ORY Kratos?

ORY Kratos is an API-first Identity and User Management system that is built according to cloud architecture best practices. It implements core use cases that almost every software application needs to deal with:

  • Self-service Login and Registration: Allow end-users to create and sign into accounts (we call them identities) using Username / Email and password combinations, Social Sign In ("Sign in with Google, GitHub"), Passwordless flows, and others.
  • Multi-Factor Authentication (MFA/2FA): Support protocols such as TOTP (RFC 6238 and IETF RFC 4226 - better known as Google Authenticator)
  • Account Verification: Verify that an E-Mail address, phone number, or physical address actually belong to that identity.
  • Account Recovery: Recover access using "Forgot Password" flows, Security Codes (in case of MKFA device loss), and others.
  • Profile and Account Management: Update passwords, personal details, email addresses, linked social profiles using secure flows.
  • Admin APIs: Import, update, delete identities.

We highly recommend reading the ORY Kratos introduction docs to learn more about ORY Krato's background, feature set, and differentiation from other products.

Who's using it?

Getting Started

To get started, head over to the ORY Kratos Documentation.

Quickstart

The ORY Kratos Quickstart teaches you ORY Kratos basics and sets up an example based on Docker Compose in less than five minutes.

Installation

Head over to the ORY Developer Documentation to learn how to install ORY Kratos on Linux, macOS, Windows, and Docker and how to build ORY Kratos from source.

Ecosystem

ORY Security Console

ORY Security Console: Administrative User Interface

The ORY Security Console is a visual admin interface for managing ORY Kratos, ORY Oathkeeper, and ORY Keto.

ORY Oathkeeper: Identity & Access Proxy

ORY Oathkeeper is a BeyondCorp/Zero Trust Identity & Access Proxy (IAP) built on top of OAuth2 and ORY Kratos.

ORY Keto: Access Control Policies as a Server

ORY Keto is a policy decision point. It uses a set of access control policies, similar to AWS IAM Policies, in order to determine whether a subject (user, application, service, car, ...) is authorized to perform a certain action on a resource.

Security

Running identity infrastructure requires attention and knowledge of thread models.

Disclosing vulnerabilities

If you think you found a security vulnerability, please refrain from posting it publicly on the forums, the chat, or GitHub and send us an email to hi@ory.am instead.

Telemetry

Ory's services collect summarized, anonymized data that can optionally be turned off. Click here to learn more.

Documentation

Guide

The Guide is available here.

HTTP API documentation

The HTTP API is documented here.

Upgrading and Changelog

New releases might introduce breaking changes. To help you identify and incorporate those changes, we document these changes in UPGRADE.md and CHANGELOG.md.

Command line documentation

Run kratos -h or kratos help.

Develop

We encourage all contributions and encourage you to read our contribution guidelines

Dependencies

You need Go 1.13+ with GO111MODULE=on and (for the test suites):

  • Docker and Docker Compose
  • Makefile
  • NodeJS / npm

It is possible to develop ORY Kratos on Windows, but please be aware that all guides assume a Unix shell like bash or zsh.

Install Tools

When cloning ORY Kratos, run make tools. It will download several required dependencies. If you haven't run the command in a while it's probably a good idea to run it again.

Formatting Code

You can format all code using make format. Our CI checks if your code is properly formatted.

Running Tests

There are three types of tests you can run:

  • Short tests (do not require a SQL database like PostgreSQL)
  • Regular tests (do require PostgreSQL, MySQL, CockroachDB)
  • End to end tests (do require databases and will use a test browser)
Short Tests

Short tests run fairly quickly. You can either test all of the code at once

go test -short -tags sqlite ./...

or test just a specific module:

cd client; go test -tags sqlite -short .
Regular Tests

Regular tests require a database set up. Our test suite is able to work with docker directly (using ory/dockertest) but we encourage to use the Makefile instead. Using dockertest can bloat the number of Docker Images on your system and are quite slow. Instead we recommend doing:

make test

Please be aware that make test recreates the databases every time you run make test. This can be annoying if you are trying to fix something very specific and need the database tests all the time. In that case we suggest that you initialize the databases with:

make resetdb
export TEST_DATABASE_MYSQL='mysql://root:secret@(127.0.0.1:3444)/mysql?parseTime=true'
export TEST_DATABASE_POSTGRESQL='postgres://postgres:secret@127.0.0.1:3445/kratos?sslmode=disable'
export TEST_DATABASE_COCKROACHDB='cockroach://root@127.0.0.1:3446/defaultdb?sslmode=disable'

Then you can run go test as often as you'd like:

go test -tags sqlite ./...

# or in a module:
cd client; go test  -tags sqlite  .
Build Docker

You can build a development Docker Image using:

make docker

Documentation

Overview

package main is the entry point for kratos.

Ory Kratos

Welcome to the ORY Kratos HTTP API documentation!

Schemes: http, https
Host:
BasePath: /
Version: latest

Consumes:
- application/json
- application/x-www-form-urlencoded

Produces:
- application/json

Extensions:
---
x-request-id: string
x-forwarded-proto: string
---

swagger:meta

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL