Code Monkey home page Code Monkey logo

FTAuth codecov

FTAuth (Fault-Tolerant Auth) is a secure, lightweight OAuth 2.1-compliant server, written in Go.

Note: This project is still in development and should not be used in production.

Quick Start

Run the following command to create a local instance of FTAuth:

docker run --rm -it \
    -e FTAUTH_OAUTH_ADMIN_USERNAME=admin \
    -e FTAUTH_OAUTH_ADMIN_PASSWORD=password \
    -p 8000:8000 ftauth/ftauth:latest --embedded

The process will print client info in JSON to the terminal which can be used with a client SDK to connect to the running server.

Admin client: {
  "uid": "3cf9a7ac-9198-469e-92a7-cc2f15d8b87d",
  "client_name": "Admin",
  "client_type": "public",
  "redirect_uris": [
    "localhost",
    "myapp://auth"
  ],
  "scopes": [
    {
      "name": "default"
    },
    {
      "name": "admin"
    }
  ],
  "grant_types": [
    "authorization_code",
    "refresh_token"
  ],
  "access_token_life": 3600,
  "refresh_token_life": 86400
}

Client SDKs

Features

FTAuth supports the OAuth 2.1 protocol, currently in draft, which slims the original OAuth 2.0 spec and incorporates best practices for security.

Features include:

  • JSON Web Tokens (JWT) & JSON Web Keys (JWK)

JWTs improve performance by allowing clients to introspect the token without querying the authorization server. JWKs allow clients to validate the claims embedded within the JWT by verifying the signature against a public key set.

  • Demonstrated Proof-of-Possession (DPoP) - RFC

While OAuth best practices mandate that clients mutually authenticate (e.g. via mutual TLS (mTLS)), this is not possible for public clients (i.e. Web apps, native apps) which encompass the majority of common use cases.

As an alternative, DPoP or Demonstrated Proof-of-Possession is implemented for all clients (public and confidential) which protects against many of the same attacks. The disadvantage of DPoP is that the public client cannot be initially authenticated, i.e. anyone can impersonate a trusted client.

It is recommended that mTLS is implemented when possible, e.g. in the service mesh.

  • Proof Key for Code Exchange (PKCE) - RFC

An added layer of protection for public clients, this standard protects against authorization code intercepts by establishing a secret on the client which is used later when exchanging the authorization code. In the same way DPoP protects access tokens, PKCE protects authorization codes from interception and replay attacks.

FTAuth's Projects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.