Skip to content

Commit

Permalink
updates for nov-2023
Browse files Browse the repository at this point in the history
  • Loading branch information
cviecco committed Oct 11, 2023
2 parents 690cedb + 5f3ee7c commit 834e94d
Show file tree
Hide file tree
Showing 71 changed files with 6,009 additions and 937 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
on: [push, pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.20.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- run: make test

28 changes: 21 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,29 @@ endif
BINARY=keymaster

# These are the values we want to pass for Version and BuildTime
VERSION=1.9.0
VERSION=1.14.0
#BUILD_TIME=`date +%FT%T%z`

# Setup the -ldflags option for go build here, interpolate the variable values
#LDFLAGS=-ldflags "-X github.com/ariejan/roll/core.Version=${VERSION} -X github.com/ariejan/roll/core.BuildTime=${BUILD_TIME}"

all: init-config-host
cd $(GOPATH)/src; go install -ldflags "-X main.Version=${VERSION}" github.com/Cloud-Foundations/keymaster/cmd/*
all: init-config-host cmd/keymasterd/binData.go
cd cmd/keymaster; go install -ldflags "-X main.Version=${VERSION}"
cd cmd/keymasterd; go install -ldflags "-X main.Version=${VERSION}"
cd cmd/keymaster-unlocker; go install -ldflags "-X main.Version=${VERSION}"
cd cmd/keymaster-eventmond; go install -ldflags "-X main.Version=${VERSION}"

win-client:
cd $(GOPATH)\src && go install -ldflags "-X main.Version=${VERSION}" github.com\Cloud-Foundations\keymaster\cmd\keymaster
cd $(GOPATH)\src\github.com\Cloud-Foundations\keymaster\cmd\keymaster && go test -v ./...
build: cmd/keymasterd/binData.go
go build -ldflags "-X main.Version=${VERSION}" -o bin/ ./...

cmd/keymasterd/binData.go:
-go-bindata -fs -o cmd/keymasterd/binData.go -prefix cmd/keymasterd/data cmd/keymasterd/data/...

win-client: client-test
go build -ldflags "-X main.Version=${VERSION}" -o bin .\cmd\keymaster\

client-test:
go test -v ./cmd/keymaster/...

get-deps: init-config-host
go get -t ./...
Expand All @@ -38,7 +49,10 @@ ${BINARY}-${VERSION}.tar.gz:
rsync -av --exclude="config.yml" --exclude="*.pem" --exclude="*.out" lib/ ${BINARY}-${VERSION}/lib/
rsync -av --exclude="config.yml" --exclude="*.pem" --exclude="*.out" --exclude="*.key" cmd/ ${BINARY}-${VERSION}/cmd/
rsync -av misc/ ${BINARY}-${VERSION}/misc/
cp LICENSE Makefile keymaster.spec README.md ${BINARY}-${VERSION}/
rsync -av proto/ ${BINARY}-${VERSION}/proto/
rsync -av keymasterd/ ${BINARY}-${VERSION}/keymasterd/
rsync -av eventmon/ ${BINARY}-${VERSION}/eventmon/
cp -p LICENSE Makefile keymaster.spec README.md go.mod go.sum ${BINARY}-${VERSION}/
tar -cvzf ${BINARY}-${VERSION}.tar.gz ${BINARY}-${VERSION}/
rm -rf ${BINARY}-${VERSION}/

Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Keymaster
[![Build Status](https://travis-ci.org/Cloud-Foundations/keymaster.svg?branch=master)](https://travis-ci.org/Cloud-Foundations/keymaster)

[![Build Status](https://github.com/Cloud-Foundations/keymaster/actions/workflows/test.yml/badge.svg?query=branch%3Amaster)](https://github.com/Cloud-Foundations/keymaster/actions/workflows/test.yml?query=branch%3Amaster)
[![Coverage Status](https://coveralls.io/repos/github/Cloud-Foundations/keymaster/badge.svg?branch=master)](https://coveralls.io/github/Cloud-Foundations/keymaster?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/Cloud-Foundations/keymaster)](https://goreportcard.com/report/github.com/Cloud-Foundations/keymaster)

Keymaster is usable short-term certificate based identity system. With a primary goal to be a single-sign-on (with optional second factor with [Symantec VIP](https://vip.symantec.com/), [U2F](https://fidoalliance.org/specifications/overview/) tokens or [TOTP](https://en.wikipedia.org/wiki/Time-based_One-time_Password_algorithm) compatible apps ([FreeOTP](https://freeotp.github.io/)/google authenticator ) ) for CLI operations (both SSHD and TLS).

Expand Down Expand Up @@ -35,7 +35,7 @@ Pre-build binaries (both RPM and DEB) can be found here: [releases page](https:/
* make
* gcc

For Windows (both gcc and gnu-make) use: [TDM-GCC (64 bit)](https://sourceforge.net/projects/tdm-gcc/).
For Windows (both gcc and gnu-make) use: [TDM-GCC (64 bit)](https://sourceforge.net/projects/tdm-gcc/). Recent windows builds fail when using TDM-GCC 5.x. Successful builds are known with golang 1.16.X and gcc 10.X.

#### Building
1. make get-deps
Expand Down Expand Up @@ -98,7 +98,7 @@ patents and contracts.
## LICENSE
Copyright 2016-2019 Symantec Corporation.

Copyright 2019-2020 Cloud-Foundations.org
Copyright 2019-2021 Cloud-Foundations.org

Licensed under the Apache License, Version 2.0 (the “License”); you
may not use this file except in compliance with the License.
Expand All @@ -110,3 +110,7 @@ License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the
License.

## Versioning
Keymaster versions follow the [Sementic Versioning](https://semver.org/)
guidelines.
3 changes: 2 additions & 1 deletion cmd/keymaster-unlocker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ func main() {
logger.Fatal(err)
}
// Setup HTTPS clients.
tlsConfig := &tls.Config{Certificates: []tls.Certificate{cert}}
tlsConfig := &tls.Config{Certificates: []tls.Certificate{cert},
MinVersion: tls.VersionTLS12}
tlsConfig.BuildNameToCertificate()
clients := makeClients(addrs, tlsConfig)
var password string
Expand Down
Loading

0 comments on commit 834e94d

Please sign in to comment.