authentricity/justfile

35 lines
801 B
Makefile

# SPDX-FileCopyrightText: 2024 Erin Shepherd <erin.shepherd@e43.eu>
#
# SPDX-License-Identifier: ISC
export KO_DOCKER_REPO := env_var_or_default("KO_DOCKER_REPO", "ko.local")
reuse:
reuse lint
format:
goimports -format-only -local go.e43.eu/authentricity -w .
imports:
goimports -local go.e43.eu/authentricity -w .
tidy:
go mod tidy
container:
ko build ./cmd/authentricity-idpd
# Testing
consul:
mkdir -p tmp/consul
consul agent -data-dir=./tmp/consul -dev
init-db:
go run ./cmd/authentricity-admin import ./fixtures/admin_group.json ./fixtures/admin_user.json
go run ./cmd/authentricity-admin user add-to-group admin wheel
idpd:
[ -e tmp/idpd-kek.jwk ] || go run ./cmd/authentricity-admin key generate-kek >tmp/idpd-kek.jwk
go run ./cmd/authentricity-idpd --kek tmp/idpd-kek.jwk