-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove data-plane-gateway implementation and make it a simple proxy
Since data-plane-gateway was written: * The connector networking frontend was moved into reactors and significantly improved. * gRPC Web REST handlers were implemented in reactors and gazette. * reactors and gazette implemented first-class fine grain authorizations. Remove the historical implementations of these features, instead updating to the implementations used by reactors and brokers today. Remove authorization checks, and just verify and pass-through an authorization header. Issue #estuary/flow/issues/1627
- Loading branch information
1 parent
a906ada
commit cc4a961
Showing
31 changed files
with
363 additions
and
5,045 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
docs/ | ||
client/ | ||
test/ | ||
*.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1 @@ | ||
# This certificate and key are generated by start-flow.sh for local development | ||
local-tls-cert.pem | ||
local-tls-private-key.pem | ||
|
||
data-plane-gateway | ||
test/tmp/* | ||
data-plane-gateway |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,15 @@ | ||
# Build Stage | ||
################################################################################ | ||
FROM golang as builder | ||
|
||
WORKDIR /builder | ||
|
||
RUN apt-get update && apt-get install -y openssl | ||
|
||
# Download & compile dependencies early. Doing this separately allows for layer | ||
# caching opportunities when no dependencies are updated. | ||
COPY go.* ./ | ||
RUN go mod download | ||
|
||
# Build the gateway. | ||
COPY *.go ./ | ||
COPY gen ./gen | ||
COPY auth ./auth | ||
COPY proxy ./proxy | ||
RUN go build . | ||
|
||
# Generate a self-signed certificate to allow the server to use TLS | ||
RUN openssl req -x509 -nodes -days 1095 \ | ||
-subj "/C=CA/ST=QC/O=Estuary/CN=not-a-real-hostname.test" \ | ||
-newkey rsa:2048 -keyout tls-private-key.pem \ | ||
-out tls-cert.pem | ||
|
||
# We'll copy the sh executable out of this, since distroless doesn't have a package manager with | ||
# which to install one | ||
FROM busybox:1.34-musl as busybox | ||
|
||
# Runtime Stage | ||
################################################################################ | ||
FROM gcr.io/distroless/base-debian12 | ||
|
||
COPY --from=busybox /bin/sh /bin/sh | ||
FROM ubuntu:24.04 | ||
|
||
WORKDIR /app | ||
ENV PATH="/app:$PATH" | ||
|
||
# Bring in the compiled artifact from the builder. | ||
COPY --from=builder /builder/data-plane-gateway ./ | ||
COPY --from=builder --chown=nonroot /builder/tls-private-key.pem ./ | ||
COPY --from=builder --chown=nonroot /builder/tls-cert.pem ./ | ||
COPY data-plane-gateway ./ | ||
|
||
# Avoid running the data-plane-gateway as root. | ||
USER nonroot:nonroot | ||
USER 65534:65534 | ||
|
||
# Ensure data-plane-gateway can run on this runtime image. | ||
RUN ./data-plane-gateway --help | ||
RUN /app/data-plane-gateway print-config | ||
|
||
ENTRYPOINT ["/app/data-plane-gateway"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.