jwt-manager

JWT Manager Helm Chart

Artifact Hub

The JWT Manager Helm Chart is a Kubernetes chart that provides a custom resource definition (CRD) for managing JSON Web Tokens (JWTs) and their signers in your Kubernetes cluster. It allows you to create and manage JWTs, and handles the signing process using various encryption algorithms.

Installing the Chart

To install the JWT Manager chart, follow these steps:

  1. Add the Helm repository:
helm repo add jwt-manager https://chximn.github.io/jwt-manager
  1. Update the Helm repositories:
    helm repo update
    
  2. Install the chart with a release name of your choice:
    helm install my-jwt-manager jwt-manager/jwt-manager
    

Usage

Once the JWT Manager chart is installed, you can start using JWTs and JWT signers in your Kubernetes cluster. The chart provides two custom resource definitions (CRD): JWT and JWTSigner.

JWT

The JWT CRD allows you to create, update, and delete JWTs. It has the following specification:

Example JWT resource:

apiVersion: k8s.chximn.pro/v1
kind: JWT
metadata:
  name: my-jwt
spec:
  signer: my-jwt-signer
  data:
    username: john.doe
    role: admin
  secretName: my-jwt-secret
  expiryTime:
    days: 1
  resignBefore:
    hours: 1

JWTSigner

The JWTSigner CRD allows you to define the signers for JWTs. It has the following specification:

Example JWTSigner resource with a secret key:

apiVersion: k8s.chximn.pro/v1
kind: JWTSigner
metadata:
  name: my-jwt-signer
spec:
  algorithm: HS256
  key:
    secret:
      namespace: my-namespace
      name: my-secret
      key: secret-key

Example JWTSigner resource with a direct value:

apiVersion: k8s.chximn.pro/v1
kind: JWTSigner
metadata:
  name: my-jwt-signer
spec:
  algorithm: RS256
  key:
    value: |
      -----BEGIN RSA PRIVATE KEY-----
      ...
      -----END RSA PRIVATE KEY-----

Note