Giter Club home page Giter Club logo

jwt_issuer_poc's Introduction

JWT Issuer Proof of Concept

Overview

Simple PoC to issue JSON Web Tokens (JWTs) with a canister on the Internet Computer. It allows the issuance of two types of JWTs:

  • Symmetric (kind: mac, algo: HS256) uses a secret stored in the canister (not secure against a single malicious node provider).
  • Asymmetric (kind: tecdsa, algo ES256k) uses Threshold ECDSA (tECDSA) and kind iccsa uses canister signatures.

The JWT's sub (subject) field will be set to the principal of the caller. In tECDSA mode the iss (issuer) field will be set to the did:key representation of the tECDSA public key.

The canister signature (ICCSA) implementation is based on the Internet Identity implementation. The iss is set to the principal of the canister and the signature field of the JWT is set to the base64url encoded ICCSA certificate. Obviously no JWT library will be available to verify a JWT with algo: ICCSA and there might be better encodings. This is just meant as a PoC.

Quickstart

If you want to test your project locally, you can use the following commands:

# Starts the replica, running in the background
dfx start --background

# Deploys your canisters to the replica and generates your candid interface
dfx deploy

Interacting with the minimal web UI

Once the job completes, your application will be available at http://localhost:8000?canisterId={frontend_canister_id}.

Interacting wth dfx

Coming soon :)

jwt_issuer_poc's People

Contributors

domwoe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kevloui

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.