Skip to content

Commit

Permalink
feat(security): add security.txt to docker images (edgexfoundry#4407)
Browse files Browse the repository at this point in the history
Signed-off-by: geraldzm <[email protected]>
Signed-off-by: Gerald Zamora <[email protected]>
  • Loading branch information
geraldzm authored and Gerald Zamora committed Mar 13, 2023
1 parent a4ee942 commit 51ed33e
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/core-command/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ EXPOSE $APP_PORT

WORKDIR /
COPY --from=builder /edgex-go/Attribution.txt /
COPY --from=builder /edgex-go/security.txt /
COPY --from=builder /edgex-go/cmd/core-command/core-command /
COPY --from=builder /edgex-go/cmd/core-command/res/configuration.toml /res/configuration.toml

Expand Down
1 change: 1 addition & 0 deletions cmd/core-common-config-bootstrapper/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ LABEL license='SPDX-License-Identifier: Apache-2.0' \

RUN apk add --update --no-cache dumb-init
COPY --from=builder /edgex-go/Attribution.txt /
COPY --from=builder /edgex-go/security.txt /
COPY --from=builder /edgex-go/cmd/core-common-config-bootstrapper/core-common-config-bootstrapper /
COPY --from=builder /edgex-go/cmd/core-common-config-bootstrapper/res/configuration.yaml /res/configuration.yaml

Expand Down
1 change: 1 addition & 0 deletions cmd/core-data/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ EXPOSE $APP_PORT

RUN apk add --update --no-cache dumb-init
COPY --from=builder /edgex-go/Attribution.txt /
COPY --from=builder /edgex-go/security.txt /
COPY --from=builder /edgex-go/cmd/core-data/core-data /
COPY --from=builder /edgex-go/cmd/core-data/res/configuration.toml /res/configuration.toml

Expand Down
1 change: 1 addition & 0 deletions cmd/core-metadata/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ EXPOSE $APP_PORT

WORKDIR /
COPY --from=builder /edgex-go/Attribution.txt /
COPY --from=builder /edgex-go/security.txt /
COPY --from=builder /edgex-go/cmd/core-metadata/core-metadata /
COPY --from=builder /edgex-go/cmd/core-metadata/res/configuration.toml /res/configuration.toml
COPY --from=builder /edgex-go/cmd/core-metadata/res/uom.toml /res/uom.toml
Expand Down
1 change: 1 addition & 0 deletions cmd/security-bootstrapper/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ COPY --from=builder /edgex-go/cmd/security-bootstrapper/entrypoint-scripts/ ${SE
RUN chmod +x ${SECURITY_INIT_STAGING}/*.sh

COPY --from=builder /edgex-go/Attribution.txt /
COPY --from=builder /edgex-go/security.txt /
COPY --from=builder /edgex-go/cmd/security-bootstrapper/security-bootstrapper .
COPY --from=builder /edgex-go/cmd/security-bootstrapper/res/configuration.toml ./res/

Expand Down
1 change: 1 addition & 0 deletions cmd/security-proxy-auth/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ LABEL license='SPDX-License-Identifier: Apache-2.0' \

RUN apk add --update --no-cache dumb-init
COPY --from=builder /edgex-go/Attribution.txt /
COPY --from=builder /edgex-go/security.txt /
COPY --from=builder /edgex-go/cmd/security-proxy-auth/security-proxy-auth /
COPY --from=builder /edgex-go/cmd/security-proxy-auth/res/configuration.toml /res/configuration.toml

Expand Down
2 changes: 2 additions & 0 deletions cmd/security-proxy-setup/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ LABEL license='SPDX-License-Identifier: Apache-2.0' \

WORKDIR /edgex

COPY --from=builder /edgex-go/security.txt /

# Note that secrets-config shares the same configuration file as security-proxy-setup
# as we are splitting security-proxy-setup into two different utilities for ease-of-use.
COPY --from=builder /edgex-go/cmd/secrets-config/res/configuration.toml res/configuration.toml
Expand Down
2 changes: 2 additions & 0 deletions cmd/security-secretstore-setup/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ LABEL license='SPDX-License-Identifier: Apache-2.0' \

WORKDIR /

COPY --from=builder /edgex-go/security.txt /

COPY --from=builder /edgex-go/cmd/security-file-token-provider/res/token-config.json /res-file-token-provider/token-config.json
COPY --from=builder /edgex-go/cmd/security-secretstore-setup/res-file-token-provider/configuration.toml /res-file-token-provider/configuration.toml
COPY --from=builder /edgex-go/cmd/security-secretstore-setup/res/configuration.toml /res/configuration.toml
Expand Down
1 change: 1 addition & 0 deletions cmd/security-spiffe-token-provider/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ LABEL license='SPDX-License-Identifier: Apache-2.0' \
RUN apk update && apk --no-cache --update add dumb-init curl gcompat

COPY --from=builder /edgex-go/Attribution.txt /
COPY --from=builder /edgex-go/security.txt /
COPY --from=builder /edgex-go/cmd/security-spiffe-token-provider/security-spiffe-token-provider /
COPY --from=builder /edgex-go/cmd/security-spiffe-token-provider/res/configuration.toml /res/configuration.toml

Expand Down
3 changes: 3 additions & 0 deletions cmd/security-spire-agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ LABEL license='SPDX-License-Identifier: Apache-2.0' \

RUN apk update && apk --no-cache --update add dumb-init openssl gcompat

COPY --from=builder /edgex-go/security.txt /

COPY --from=builder /usr/local/bin/spire-agent /usr/local/bin
COPY --from=builder /usr/local/bin/spire-server /usr/local/bin

COPY --from=builder /edgex-go/cmd/security-spire-agent/docker-entrypoint.sh /usr/local/bin/
COPY --from=builder /edgex-go/cmd/security-spire-agent/agent.conf /usr/local/etc/spire/agent.conf.tpl
COPY --from=builder /edgex-go/cmd/security-spire-agent/openssl.conf /usr/local/etc/
Expand Down
1 change: 1 addition & 0 deletions cmd/security-spire-config/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ LABEL license='SPDX-License-Identifier: Apache-2.0' \

RUN apk update && apk --no-cache --update add dumb-init gcompat

COPY --from=builder /edgex-go/security.txt /
COPY --from=builder /usr/local/bin/spire-server /usr/local/bin
COPY --from=builder /edgex-go/cmd/security-spire-config/docker-entrypoint.sh /usr/local/bin/

Expand Down
2 changes: 2 additions & 0 deletions cmd/security-spire-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ LABEL license='SPDX-License-Identifier: Apache-2.0' \

RUN apk update && apk --no-cache --update add dumb-init openssl gcompat

COPY --from=builder /edgex-go/security.txt /

COPY --from=builder /usr/local/bin/spire-server /usr/local/bin
COPY --from=builder /edgex-go/cmd/security-spire-server/docker-entrypoint.sh /usr/local/bin/
COPY --from=builder /edgex-go/cmd/security-spire-server/server.conf /usr/local/etc/spire/server.conf.tpl
Expand Down
1 change: 1 addition & 0 deletions cmd/support-notifications/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ ENV APP_PORT=59860
EXPOSE $APP_PORT

COPY --from=builder /edgex-go/Attribution.txt /
COPY --from=builder /edgex-go/security.txt /
COPY --from=builder /edgex-go/cmd/support-notifications/support-notifications /
COPY --from=builder /edgex-go/cmd/support-notifications/res/configuration.toml /res/configuration.toml

Expand Down
1 change: 1 addition & 0 deletions cmd/support-scheduler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ ENV APP_PORT=59861
EXPOSE $APP_PORT

COPY --from=builder /edgex-go/Attribution.txt /
COPY --from=builder /edgex-go/security.txt /
COPY --from=builder /edgex-go/cmd/support-scheduler/support-scheduler /
COPY --from=builder /edgex-go/cmd/support-scheduler/res/configuration.toml /res/configuration.toml

Expand Down

0 comments on commit 51ed33e

Please sign in to comment.