Skip to content

Command line tool to communicate with Dex API

License

Notifications You must be signed in to change notification settings

epam/hub-dexctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dexctl

Description

A command line tool which communicate with The Dex API. With help of this tool you could create, update and delete such dex entity like static password of static oauth2 clients.

Usage

Values for global flags host, port, ca-cert, client-cert and client-key could be also read from env variables with prefix DEX_API

DEX_API_HOST="api.mydex.com" dexctl create password --email [email protected] --password verystrongpassword

Development

Prepare

go mod download

Build

go build -o bin/$(go env GOOS)/dexctl \
    -ldflags="-s -w \
    -X 'github.com/epam/hub-dexctl/cmd.ref=$(git rev-parse --abbrev-ref HEAD)' \
    -X 'github.com/epam/hub-dexctl/cmd.commit=$(git rev-parse --short HEAD)' \
    -X 'github.com/epam/hub-dexctl/cmd.buildAt=$(date +"%Y.%m.%d %H:%M %Z")'"

Run

./bin/$(go env GOOS)/dexctl

Docker image

Docker image is based on distoless image static-debian11

IMAGE_NAME="ghcr.io/epam/dexctl";
IMAGE_TAG="$(git rev-parse --short HEAD)";
docker buildx build --tag "${IMAGE_NAME}:${IMAGE_TAG}" --tag "${IMAGE_NAME}:latest" . ;

Contribute

Before commit and submit pull request run next commands

go fmt github.com/epam/hub-dexctl/...
go vet github.com/epam/hub-dexctl/...

About

Command line tool to communicate with Dex API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages