-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In-cluster grr-client container build and client repackaging (#164)
* Adds kaniko * Switch key paths * Add config * Add config * Add config * Add config * Add config * Adds kaniko manifest * Fix kaniko Dockerfile * Fix kaniko Dockerfile * Enable client upload * Enable client upload * Enable client upload * Enable client upload * Enable client upload * Moves to pre-created signing keys * Adds Artifact Writer role for GRR Workload Identity * Updates after first e2e test * Fixes config errors * Update GRR README * Fixes several GRR client config issues and renames the daemon to client * Fix client config path * Add communicator.txt to client config * Changes naming from DAEMON to CLIENT * Bumps grr and fleetspeak container image version tags * Fixes signing key locations * Fix the private public key pair configs * Bump Chart.yaml version to 1.0.3 Signed-off-by: daschwanden <daschwanden@google.com> * Update README.md Added note about building the grr-client container image. Signed-off-by: daschwanden <daschwanden@google.com> * Update job-build-grr-client.yaml Remove feature branch checkout from grr-client build job. Signed-off-by: daschwanden <daschwanden@google.com> * Update README.md with readme-generator-for-helm Signed-off-by: daschwanden <daschwanden@users.noreply.github.com> * Fix typo Signed-off-by: daschwanden <daschwanden@google.com> --------- Signed-off-by: daschwanden <daschwanden@google.com> Signed-off-by: daschwanden <daschwanden@users.noreply.github.com> Co-authored-by: daschwanden <daschwanden@users.noreply.github.com>
- Loading branch information
1 parent
9a85fd3
commit e3938f0
Showing
23 changed files
with
252 additions
and
148 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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Copyright 2024 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
FROM ghcr.io/google/grr:latest AS grr | ||
|
||
ARG FLEETSPEAK_FRONTEND | ||
ARG FLEETSPEAK_FRONTEND_PORT | ||
|
||
WORKDIR / | ||
|
||
COPY config /config | ||
COPY grr-client-config.yaml /config/grr.client.yaml | ||
|
||
RUN echo "FLEETSPEAK_FRONTEND: $FLEETSPEAK_FRONTEND, FLEETSPEAK_FRONTEND_PORT: $FLEETSPEAK_FRONTEND_PORT"; | ||
|
||
RUN export FLEETSPEAK_CERT=$(openssl s_client -showcerts -nocommands -connect $FLEETSPEAK_FRONTEND:$FLEETSPEAK_FRONTEND_PORT< /dev/null | openssl x509 -outform pem | sed ':a;N;$!ba;s/\n/\\\\n/g') && \ | ||
sed "s'FLEETSPEAK_FRONTEND_ADDRESS'$FLEETSPEAK_FRONTEND'g" /config/config.textproto.tmpl > /config/config.textproto && \ | ||
sed -i "s'FLEETSPEAK_FRONTEND_PORT'$FLEETSPEAK_FRONTEND_PORT'" /config/config.textproto && \ | ||
sed -i "s'FRONTEND_TRUSTED_CERTIFICATES'\"$FLEETSPEAK_CERT\"'g" /config/config.textproto && \ | ||
echo 'client_certificate_header: "client-certificate"' >> /config/config.textproto | ||
|
||
RUN mkdir /client_installers && \ | ||
grr_config_updater repack_clients \ | ||
--secondary_configs /config/grr.server.yaml | ||
|
||
FROM ubuntu:22.04 | ||
WORKDIR / | ||
|
||
COPY --from=grr /config/communicator.txt /etc/fleetspeak-client/communicator.txt | ||
COPY --from=grr /config/config.textproto /etc/fleetspeak-client/client.config | ||
COPY --from=grr /config/grr.client.yaml /etc/fleetspeak-client/grr.client.yaml | ||
|
||
COPY --from=grr /client_installers/grr_*_amd64.deb . | ||
RUN dpkg -i grr_*_amd64.deb && rm grr_*_amd64.deb | ||
ENTRYPOINT ["fleetspeak-client", "-config" , "/etc/fleetspeak-client/client.config", "-alsologtostderr"] |
File renamed without changes.
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
4 changes: 2 additions & 2 deletions
4
...grr/containers/grr-daemon/config/grr.yaml → ...grr/containers/grr-client/config/grr.yaml
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
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
Oops, something went wrong.