Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #27 from findy-network/rename-grpc-to-common
Browse files Browse the repository at this point in the history
Rename findy-grpc to findy-common-go
  • Loading branch information
lauravuo-techlab authored Mar 4, 2021
2 parents 6450578 + 55063d2 commit 80381b5
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 32 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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.

Expand All @@ -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
```
2 changes: 1 addition & 1 deletion agency/client/async/pairwise.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
8 changes: 4 additions & 4 deletions agency/client/chat/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion agency/client/chat/bot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions agency/client/chat/chat/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion agency/client/chat/machines.go
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 3 additions & 3 deletions agency/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion crypto/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/findy-network/findy-grpc
module github.com/findy-network/findy-common-go

go 1.16

Expand Down
4 changes: 2 additions & 2 deletions integration/grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion rpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion rpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion rpc/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
4 changes: 2 additions & 2 deletions server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 80381b5

Please sign in to comment.