diff --git a/README.md b/README.md index 3bd829b..d5dc183 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # findy-grpc -Includes WebAuthn sample server. That will work as a reference implementation how to allocate `findy-agent` cloud agents from fido2 compatible web wallets. Main purpose of the package is to provide helpers for JWT and gRPC handling that sill is under construction. @@ -10,10 +9,6 @@ The `findy-grpc` package is first client API implementation for `findy-agent` DI #### Usage -A current version of the WebAuthn server can be started from package root: -```shell script -$ go run . -``` These helper packages are made to help use gRPC and JWT together. It also helps with TLS keys. @@ -29,4 +24,13 @@ Both client and server use configuration structs to init them. The most importan - [x] add a client and server main programs for manual testing - [x] fix Go 1.15 tls certificate format problems - [x] Simplify cert format and generation process (see `cert/`) -- [x] check if client TLS certificate could be used as well. **We now have mutual TLS authentication and 1.3 version in use** +- [x] check if client TLS certificate could be used as well. **We now have mutual TLS authentication and 1.2 version in use** + +## Publishing new version + +Release script will tag the current version and push the tag to remote. Release script assumes it is triggered from dev branch. It takes one parameter, the next working version. E.g. if current working version is 0.1.0, following will release version 0.1.0 and update working version to 0.2.0. + +```bash +git checkout dev +./release 0.2.0 +``` diff --git a/agency/client/async/pairwise.go b/agency/client/async/pairwise.go index b69f5e6..c75f7dc 100644 --- a/agency/client/async/pairwise.go +++ b/agency/client/async/pairwise.go @@ -6,7 +6,7 @@ import ( "github.com/findy-network/findy-agent-api/grpc/agency" didexchange "github.com/findy-network/findy-agent/std/didexchange/invitation" - "github.com/findy-network/findy-grpc/agency/client" + "github.com/findy-network/findy-common-go/agency/client" "github.com/lainio/err2" "google.golang.org/grpc" ) diff --git a/agency/client/chat/bot.go b/agency/client/chat/bot.go index 4263645..cb635d5 100644 --- a/agency/client/chat/bot.go +++ b/agency/client/chat/bot.go @@ -9,10 +9,10 @@ import ( "path/filepath" "github.com/findy-network/findy-agent-api/grpc/agency" - "github.com/findy-network/findy-grpc/agency/client" - "github.com/findy-network/findy-grpc/agency/client/chat/chat" - "github.com/findy-network/findy-grpc/agency/fsm" - "github.com/findy-network/findy-grpc/utils" + "github.com/findy-network/findy-common-go/agency/client" + "github.com/findy-network/findy-common-go/agency/client/chat/chat" + "github.com/findy-network/findy-common-go/agency/fsm" + "github.com/findy-network/findy-common-go/utils" "github.com/ghodss/yaml" "github.com/golang/glog" "github.com/lainio/err2" diff --git a/agency/client/chat/bot_test.go b/agency/client/chat/bot_test.go index 8c3df34..4fd7af2 100644 --- a/agency/client/chat/bot_test.go +++ b/agency/client/chat/bot_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/findy-network/findy-grpc/agency/fsm" + "github.com/findy-network/findy-common-go/agency/fsm" ) var issuerFSMYaml = `initial: diff --git a/agency/client/chat/chat/chat.go b/agency/client/chat/chat/chat.go index 8e0484c..b460837 100644 --- a/agency/client/chat/chat/chat.go +++ b/agency/client/chat/chat/chat.go @@ -4,9 +4,9 @@ import ( "context" "github.com/findy-network/findy-agent-api/grpc/agency" - "github.com/findy-network/findy-grpc/agency/client" - "github.com/findy-network/findy-grpc/agency/client/async" - "github.com/findy-network/findy-grpc/agency/fsm" + "github.com/findy-network/findy-common-go/agency/client" + "github.com/findy-network/findy-common-go/agency/client/async" + "github.com/findy-network/findy-common-go/agency/fsm" "github.com/golang/glog" "github.com/lainio/err2" ) diff --git a/agency/client/chat/machines.go b/agency/client/chat/machines.go index 87ac1b7..b58795d 100644 --- a/agency/client/chat/machines.go +++ b/agency/client/chat/machines.go @@ -1,6 +1,6 @@ package chat -import "github.com/findy-network/findy-grpc/agency/fsm" +import "github.com/findy-network/findy-common-go/agency/fsm" var EmailIssuerMachine = fsm.Machine{ Name: "email issuer machine", diff --git a/agency/client/client.go b/agency/client/client.go index f12c20c..ba80b6c 100644 --- a/agency/client/client.go +++ b/agency/client/client.go @@ -10,9 +10,9 @@ import ( "github.com/findy-network/findy-agent-api/grpc/agency" "github.com/findy-network/findy-agent-api/grpc/ops" didexchange "github.com/findy-network/findy-agent/std/didexchange/invitation" - "github.com/findy-network/findy-grpc/jwt" - "github.com/findy-network/findy-grpc/rpc" - "github.com/findy-network/findy-grpc/utils" + "github.com/findy-network/findy-common-go/jwt" + "github.com/findy-network/findy-common-go/rpc" + "github.com/findy-network/findy-common-go/utils" "github.com/golang/glog" "github.com/lainio/err2" "google.golang.org/grpc" diff --git a/client/main.go b/client/main.go index 6d1dbf1..34caf8c 100644 --- a/client/main.go +++ b/client/main.go @@ -7,8 +7,8 @@ import ( "time" "github.com/findy-network/findy-agent-api/grpc/ops" - "github.com/findy-network/findy-grpc/jwt" - "github.com/findy-network/findy-grpc/rpc" + "github.com/findy-network/findy-common-go/jwt" + "github.com/findy-network/findy-common-go/rpc" "github.com/golang/glog" "github.com/lainio/err2" "google.golang.org/grpc" diff --git a/crypto/db/db.go b/crypto/db/db.go index a562b87..c54bee7 100644 --- a/crypto/db/db.go +++ b/crypto/db/db.go @@ -5,7 +5,7 @@ import ( "sync" "time" - "github.com/findy-network/findy-grpc/backup" + "github.com/findy-network/findy-common-go/backup" "github.com/golang/glog" "github.com/lainio/err2" bolt "go.etcd.io/bbolt" diff --git a/go.mod b/go.mod index 872e6ab..bc723e9 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/findy-network/findy-grpc +module github.com/findy-network/findy-common-go go 1.16 diff --git a/integration/grpc_test.go b/integration/grpc_test.go index 914e374..64d1c14 100644 --- a/integration/grpc_test.go +++ b/integration/grpc_test.go @@ -12,8 +12,8 @@ import ( "time" "github.com/findy-network/findy-agent-api/grpc/ops" - "github.com/findy-network/findy-grpc/jwt" - "github.com/findy-network/findy-grpc/rpc" + "github.com/findy-network/findy-common-go/jwt" + "github.com/findy-network/findy-common-go/rpc" "github.com/golang/glog" "github.com/lainio/err2" "github.com/stretchr/testify/assert" diff --git a/release.sh b/release.sh index 3041d70..adcd5e3 100755 --- a/release.sh +++ b/release.sh @@ -23,9 +23,8 @@ if [ -z "$(git status --porcelain)" ]; then VERSION=v$VERSION_NBR - # TODO: resolve mismatch in GRPC deps + go mod tidy set +e - go mod tidy git commit -a -m "Releasing version $VERSION." set -e diff --git a/rpc/client.go b/rpc/client.go index 5dd2794..2543b57 100644 --- a/rpc/client.go +++ b/rpc/client.go @@ -6,7 +6,7 @@ import ( "crypto/x509" "io/ioutil" - "github.com/findy-network/findy-grpc/jwt" + "github.com/findy-network/findy-common-go/jwt" "github.com/golang/glog" "github.com/lainio/err2" "google.golang.org/grpc" diff --git a/rpc/server.go b/rpc/server.go index 8d53a38..9b8fcd0 100644 --- a/rpc/server.go +++ b/rpc/server.go @@ -7,7 +7,7 @@ import ( "io/ioutil" "net" - "github.com/findy-network/findy-grpc/jwt" + "github.com/findy-network/findy-common-go/jwt" "github.com/golang/glog" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" grpc_auth "github.com/grpc-ecosystem/go-grpc-middleware/auth" diff --git a/rpc/tls.go b/rpc/tls.go index aff9022..9fd301c 100644 --- a/rpc/tls.go +++ b/rpc/tls.go @@ -20,7 +20,7 @@ type PKI struct { func LoadPKI(tlsPath string) *PKI { if tlsPath == "" { p := os.Getenv("GOPATH") - tlsPath = path.Join(p, "src/github.com/findy-network/findy-grpc/cert") + tlsPath = path.Join(p, "src/github.com/findy-network/findy-common-go/cert") } return &PKI{ Server: CertFiles{ diff --git a/server/main.go b/server/main.go index 2121be3..dcf08a8 100644 --- a/server/main.go +++ b/server/main.go @@ -7,8 +7,8 @@ import ( "fmt" "github.com/findy-network/findy-agent-api/grpc/ops" - "github.com/findy-network/findy-grpc/jwt" - "github.com/findy-network/findy-grpc/rpc" + "github.com/findy-network/findy-common-go/jwt" + "github.com/findy-network/findy-common-go/rpc" "github.com/golang/glog" "github.com/lainio/err2" "google.golang.org/grpc"