Skip to content

Commit 9578869

Browse files
authored
Merge pull request #124 from hyperledger/fixes
fix: TLS and extend FileServer OpenAPI
2 parents 73fc96b + 74d76cb commit 9578869

27 files changed

+2710
-111
lines changed

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ RUN mkdir /.cache \
88
RUN make
99

1010
FROM alpine:3.19
11+
RUN apk add curl
1112
WORKDIR /fabconnect
1213
COPY --from=fabconnect-builder /fabconnect/fabconnect ./
1314
ADD ./openapi ./openapi/

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ TESTED_INTERNALS := $(shell go list ./internal/... | grep -v test | grep -v kafk
55
TESTED_CMD := $(shell go list ./cmd/...)
66
COVERPKG_INTERNALS = $(shell go list ./internal/... | grep -v test | grep -v kafka | tr "\n" ",")
77
COVERPKG_CMD = $(shell go list ./cmd/... | tr "\n" ",")
8-
# Expect that FireFly compiles with CGO disabled
8+
# Expect that FireFly-FabConnect compiles with CGO disabled
99
CGO_ENABLED=0
1010
GOGC=30
1111
.DELETE_ON_ERROR:
@@ -20,13 +20,13 @@ lint: ${LINT}
2020
GOGC=20 $(LINT) run -v --timeout 5m
2121
${LINT}:
2222
$(VGO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2
23-
firefly-nocgo: ${GOFILES}
23+
firefly-fabconnect-nocgo: ${GOFILES}
2424
CGO_ENABLED=0 $(VGO) build -o ${BINARY_NAME}-nocgo -ldflags "-X main.buildDate=`date -u +\"%Y-%m-%dT%H:%M:%SZ\"` -X main.buildVersion=$(BUILD_VERSION)" -tags=prod -tags=prod -v
25-
firefly: ${GOFILES}
25+
firefly-fabconnect: ${GOFILES}
2626
$(VGO) build -o ${BINARY_NAME} -ldflags "-X main.buildDate=`date -u +\"%Y-%m-%dT%H:%M:%SZ\"` -X main.buildVersion=$(BUILD_VERSION)" -tags=prod -tags=prod -v
2727
go-mod-tidy: .ALWAYS
2828
go mod tidy
29-
build: firefly-nocgo firefly
29+
build: firefly-fabconnect-nocgo firefly-fabconnect
3030
.ALWAYS: ;
3131
clean:
3232
$(VGO) clean

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
A reliable REST and websocket API to interact with a Fabric network and stream events.
44

5+
This component provides 3 high level sets of API endpoints:
6+
7+
- Client MSPs (aka the wallet): registering and enrolling identities to be used for signing transactions
8+
- Transactions: submit transactions and query for transaction result/receipts
9+
- Events: subscribe to events with regex based filter and stream to the client app via websocket
10+
511
## Architecture
612

713
### High Level Components
@@ -13,12 +19,6 @@ A reliable REST and websocket API to interact with a Fabric network and stream e
1319
![objects and flows architecture](/images/arch-2.png)
1420
![kafkal handler architecture](/images/arch-3.png)
1521

16-
The component provides 3 high level sets of API endpoints:
17-
18-
- Client MSPs (aka the wallet): registering and enrolling identities to be used for signing transactions
19-
- Transactions: submit transactions and query for transaction result/receipts
20-
- Events: subscribe to events with regex based filter and stream to the client app via websocket
21-
2222
## Getting Started
2323

2424
After checking out the repo, simply run `make` to build and test.
@@ -57,6 +57,7 @@ To launch, first prepare the 2 configurations files:
5757
}
5858
```
5959

60+
// TODO clean this up
6061
- the standard Fabric common connection profile (CCP) file that describes the target Fabric network, at the location specified in the main config file above under `rpc.configPath`. For details on the CCP file, see [Fabric SDK documentation](https://hyperledger.github.io/fabric-sdk-node/release-1.4/tutorial-network-config.html). Note that the CCP file must contain the `client` section, which is required for the fabconnect to act as a client to Fabric networks.
6162

6263
Use the following command to launch the connector:

go.mod

+143
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,92 @@ require (
2929
)
3030

3131
require (
32+
4d63.com/gocheckcompilerdirectives v1.2.1 // indirect
33+
4d63.com/gochecknoglobals v0.2.1 // indirect
34+
github.com/4meepo/tagalign v1.3.3 // indirect
35+
github.com/Abirdcfly/dupword v0.0.13 // indirect
36+
github.com/Antonboom/errname v0.1.12 // indirect
37+
github.com/Antonboom/nilnil v0.1.7 // indirect
38+
github.com/Antonboom/testifylint v0.2.3 // indirect
39+
github.com/BurntSushi/toml v1.3.2 // indirect
40+
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
41+
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0 // indirect
3242
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect
43+
github.com/Masterminds/semver v1.5.0 // indirect
44+
github.com/OpenPeeDeeP/depguard/v2 v2.1.0 // indirect
45+
github.com/alecthomas/go-check-sumtype v0.1.3 // indirect
46+
github.com/alexkohler/nakedret/v2 v2.0.2 // indirect
47+
github.com/alexkohler/prealloc v1.0.0 // indirect
48+
github.com/alingse/asasalint v0.0.11 // indirect
49+
github.com/ashanbrown/forbidigo v1.6.0 // indirect
50+
github.com/ashanbrown/makezero v1.1.1 // indirect
3351
github.com/beorn7/perks v1.0.1 // indirect
52+
github.com/bkielbasa/cyclop v1.2.1 // indirect
53+
github.com/blizzy78/varnamelen v0.8.0 // indirect
54+
github.com/bombsimon/wsl/v3 v3.4.0 // indirect
55+
github.com/breml/bidichk v0.2.7 // indirect
56+
github.com/breml/errchkjson v0.3.6 // indirect
57+
github.com/butuzov/ireturn v0.2.2 // indirect
58+
github.com/butuzov/mirror v1.1.0 // indirect
59+
github.com/catenacyber/perfsprint v0.2.0 // indirect
60+
github.com/ccojocar/zxcvbn-go v1.0.1 // indirect
3461
github.com/cespare/xxhash/v2 v2.2.0 // indirect
62+
github.com/charithe/durationcheck v0.0.10 // indirect
63+
github.com/chavacava/garif v0.1.0 // indirect
3564
github.com/cloudflare/cfssl v1.6.4 // indirect
65+
github.com/curioswitch/go-reassign v0.2.0 // indirect
66+
github.com/daixiang0/gci v0.11.2 // indirect
3667
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
68+
github.com/denis-tingaikin/go-header v0.4.3 // indirect
3769
github.com/eapache/go-resiliency v1.5.0 // indirect
3870
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
3971
github.com/eapache/queue v1.1.0 // indirect
72+
github.com/esimonov/ifshort v1.0.4 // indirect
73+
github.com/ettle/strcase v0.1.1 // indirect
74+
github.com/fatih/color v1.15.0 // indirect
75+
github.com/fatih/structtag v1.2.0 // indirect
76+
github.com/firefart/nonamedreturns v1.0.4 // indirect
4077
github.com/fsnotify/fsnotify v1.7.0 // indirect
78+
github.com/fzipp/gocyclo v0.6.0 // indirect
79+
github.com/ghostiam/protogetter v0.2.3 // indirect
80+
github.com/go-critic/go-critic v0.9.0 // indirect
4181
github.com/go-kit/kit v0.13.0 // indirect
4282
github.com/go-kit/log v0.2.1 // indirect
4383
github.com/go-logfmt/logfmt v0.6.0 // indirect
84+
github.com/go-toolsmith/astcast v1.1.0 // indirect
85+
github.com/go-toolsmith/astcopy v1.1.0 // indirect
86+
github.com/go-toolsmith/astequal v1.1.0 // indirect
87+
github.com/go-toolsmith/astfmt v1.1.0 // indirect
88+
github.com/go-toolsmith/astp v1.1.0 // indirect
89+
github.com/go-toolsmith/strparse v1.1.0 // indirect
90+
github.com/go-toolsmith/typep v1.1.0 // indirect
91+
github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect
92+
github.com/gobwas/glob v0.2.3 // indirect
93+
github.com/gofrs/flock v0.8.1 // indirect
4494
github.com/golang/mock v1.6.0 // indirect
4595
github.com/golang/snappy v0.0.4 // indirect
96+
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
97+
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
98+
github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect
99+
github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e // indirect
100+
github.com/golangci/golangci-lint v1.55.2 // indirect
101+
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect
102+
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect
103+
github.com/golangci/misspell v0.4.1 // indirect
104+
github.com/golangci/revgrep v0.5.2 // indirect
105+
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
106+
github.com/google/go-cmp v0.6.0 // indirect
107+
github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 // indirect
108+
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
109+
github.com/gostaticanalysis/comment v1.4.2 // indirect
110+
github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect
111+
github.com/gostaticanalysis/nilerr v0.1.1 // indirect
46112
github.com/hashicorp/errwrap v1.1.0 // indirect
47113
github.com/hashicorp/go-multierror v1.1.1 // indirect
48114
github.com/hashicorp/go-uuid v1.0.3 // indirect
115+
github.com/hashicorp/go-version v1.6.0 // indirect
49116
github.com/hashicorp/hcl v1.0.0 // indirect
117+
github.com/hexops/gotextdiff v1.0.3 // indirect
50118
github.com/hyperledger/fabric-config v0.2.1 // indirect
51119
github.com/hyperledger/fabric-lib-go v1.0.0 // indirect
52120
github.com/inconshreveable/mousetrap v1.1.0 // indirect
@@ -55,51 +123,126 @@ require (
55123
github.com/jcmturner/gofork v1.7.6 // indirect
56124
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
57125
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
126+
github.com/jgautheron/goconst v1.6.0 // indirect
127+
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
128+
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect
58129
github.com/jmoiron/sqlx v1.3.5 // indirect
130+
github.com/julz/importas v0.1.0 // indirect
131+
github.com/kisielk/errcheck v1.6.3 // indirect
132+
github.com/kisielk/gotool v1.0.0 // indirect
133+
github.com/kkHAIKE/contextcheck v1.1.4 // indirect
59134
github.com/klauspost/compress v1.17.4 // indirect
135+
github.com/kulti/thelper v0.6.3 // indirect
136+
github.com/kunwardeep/paralleltest v1.0.8 // indirect
137+
github.com/kyoh86/exportloopref v0.1.11 // indirect
138+
github.com/ldez/gomoddirectives v0.2.3 // indirect
139+
github.com/ldez/tagliatelle v0.5.0 // indirect
140+
github.com/leonklingele/grouper v1.1.1 // indirect
141+
github.com/lufeee/execinquery v1.2.1 // indirect
142+
github.com/macabu/inamedparam v0.1.2 // indirect
60143
github.com/magiconair/properties v1.8.7 // indirect
144+
github.com/maratori/testableexamples v1.0.0 // indirect
145+
github.com/maratori/testpackage v1.1.1 // indirect
146+
github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect
61147
github.com/mattn/go-colorable v0.1.13 // indirect
62148
github.com/mattn/go-isatty v0.0.20 // indirect
149+
github.com/mattn/go-runewidth v0.0.13 // indirect
63150
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
151+
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
152+
github.com/mgechev/revive v1.3.4 // indirect
64153
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
154+
github.com/mitchellh/go-homedir v1.1.0 // indirect
65155
github.com/mitchellh/mapstructure v1.5.0 // indirect
156+
github.com/moricho/tparallel v0.3.1 // indirect
157+
github.com/nakabonne/nestif v0.3.1 // indirect
158+
github.com/nishanths/exhaustive v0.11.0 // indirect
159+
github.com/nishanths/predeclared v0.2.2 // indirect
160+
github.com/nunnatsa/ginkgolinter v0.14.1 // indirect
161+
github.com/olekukonko/tablewriter v0.0.5 // indirect
66162
github.com/onsi/ginkgo v1.16.4 // indirect
67163
github.com/onsi/gomega v1.28.1 // indirect
68164
github.com/pelletier/go-toml v1.9.5 // indirect
69165
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
70166
github.com/pierrec/lz4/v4 v4.1.21 // indirect
71167
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
168+
github.com/polyfloyd/go-errorlint v1.4.5 // indirect
72169
github.com/prometheus/client_golang v1.18.0 // indirect
73170
github.com/prometheus/client_model v0.5.0 // indirect
74171
github.com/prometheus/common v0.45.0 // indirect
75172
github.com/prometheus/procfs v0.12.0 // indirect
173+
github.com/quasilyte/go-ruleguard v0.4.0 // indirect
174+
github.com/quasilyte/gogrep v0.5.0 // indirect
175+
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
176+
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
76177
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
178+
github.com/rivo/uniseg v0.4.4 // indirect
179+
github.com/ryancurrah/gomodguard v1.3.0 // indirect
180+
github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect
77181
github.com/sagikazarmark/locafero v0.4.0 // indirect
78182
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
183+
github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect
184+
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
185+
github.com/sashamelentyev/usestdlibvars v1.24.0 // indirect
186+
github.com/securego/gosec/v2 v2.18.2 // indirect
187+
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
188+
github.com/sivchari/containedctx v1.0.3 // indirect
189+
github.com/sivchari/nosnakecase v1.7.0 // indirect
190+
github.com/sivchari/tenv v1.7.1 // indirect
191+
github.com/sonatard/noctx v0.0.2 // indirect
79192
github.com/sourcegraph/conc v0.3.0 // indirect
193+
github.com/sourcegraph/go-diff v0.7.0 // indirect
80194
github.com/spf13/afero v1.11.0 // indirect
81195
github.com/spf13/cast v1.6.0 // indirect
82196
github.com/spf13/pflag v1.0.5 // indirect
197+
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
198+
github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect
83199
github.com/stretchr/objx v0.5.1 // indirect
84200
github.com/subosito/gotenv v1.6.0 // indirect
201+
github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect
202+
github.com/tdakkota/asciicheck v0.2.0 // indirect
203+
github.com/tetafro/godot v1.4.15 // indirect
204+
github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect
205+
github.com/timonwong/loggercheck v0.9.4 // indirect
206+
github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect
207+
github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect
208+
github.com/ultraware/funlen v0.1.0 // indirect
209+
github.com/ultraware/whitespace v0.0.5 // indirect
210+
github.com/uudashr/gocognit v1.1.2 // indirect
211+
github.com/vektra/mockery v1.1.2 // indirect
85212
github.com/weppos/publicsuffix-go v0.30.2-0.20230730094716-a20f9abcc222 // indirect
86213
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
87214
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
215+
github.com/xen0n/gosmopolitan v1.2.2 // indirect
216+
github.com/yagipy/maintidx v1.0.0 // indirect
217+
github.com/yeya24/promlinter v0.2.0 // indirect
218+
github.com/ykadowak/zerologlint v0.1.3 // indirect
88219
github.com/zmap/zcrypto v0.0.0-20231219022726-a1f61fb1661c // indirect
89220
github.com/zmap/zlint/v3 v3.6.0 // indirect
221+
gitlab.com/bosi/decorder v0.4.1 // indirect
222+
go-simpler.org/sloglint v0.1.2 // indirect
223+
go.tmz.dev/musttag v0.7.2 // indirect
90224
go.uber.org/multierr v1.11.0 // indirect
225+
go.uber.org/zap v1.26.0 // indirect
91226
golang.org/x/crypto v0.18.0 // indirect
92227
golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e // indirect
228+
golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect
229+
golang.org/x/mod v0.14.0 // indirect
93230
golang.org/x/net v0.20.0 // indirect
94231
golang.org/x/sync v0.5.0 // indirect
95232
golang.org/x/sys v0.16.0 // indirect
96233
golang.org/x/term v0.16.0 // indirect
97234
golang.org/x/text v0.14.0 // indirect
235+
golang.org/x/tools v0.16.0 // indirect
98236
google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect
99237
google.golang.org/grpc v1.60.1 // indirect
100238
google.golang.org/protobuf v1.32.0 // indirect
101239
gopkg.in/ini.v1 v1.67.0 // indirect
102240
gopkg.in/yaml.v3 v3.0.1 // indirect
241+
honnef.co/go/tools v0.4.6 // indirect
242+
mvdan.cc/gofumpt v0.5.0 // indirect
243+
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect
244+
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
245+
mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d // indirect
103246
)
104247

105248
replace google.golang.org/grpc => google.golang.org/grpc v1.29.0

0 commit comments

Comments
 (0)