Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion authbridge/go.work
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
go 1.24.0
go 1.24.3

use (
./authlib
./authproxy
./cmd/authbridge
./vault-fetcher
)
1 change: 1 addition & 0 deletions authbridge/vault-fetcher/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vault-fetcher
37 changes: 37 additions & 0 deletions authbridge/vault-fetcher/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Build stage
FROM golang:1.24-alpine AS builder

WORKDIR /build

# Copy go module files from authlib
COPY authbridge/authlib/go.mod authbridge/authlib/go.sum authbridge/authlib/
WORKDIR /build/authbridge/authlib
RUN go mod download

# Copy authlib source
COPY authbridge/authlib/ /build/authbridge/authlib/

# Copy vault-fetcher source
WORKDIR /build/authbridge/vault-fetcher
COPY authbridge/vault-fetcher/ ./

# Initialize go module for vault-fetcher
RUN go mod init github.com/kagenti/kagenti-extensions/authbridge/vault-fetcher || true
RUN go mod edit -replace github.com/kagenti/kagenti-extensions/authbridge/authlib=../authlib
RUN go get gopkg.in/yaml.v3
RUN go mod tidy

# Build binary
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags="-s -w" -o vault-fetcher .

# Runtime stage - distroless for minimal attack surface
FROM gcr.io/distroless/static-debian12:nonroot

# Copy binary from builder
COPY --from=builder /build/authbridge/vault-fetcher/vault-fetcher /usr/local/bin/vault-fetcher

# Run as non-root user (automatically set by distroless/nonroot)
# UID/GID: 65532:65532

ENTRYPOINT ["/usr/local/bin/vault-fetcher"]
CMD ["--config=/etc/vault-fetcher/config.yaml"]
Loading
Loading