From d3c3d4de4ef153926960d3c505aa7f99a217b8df Mon Sep 17 00:00:00 2001 From: mohamedlajmileanix Date: Mon, 25 Nov 2024 14:52:49 +0100 Subject: [PATCH 01/10] CID-2910: Proxy support --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 58a4dae..5960d53 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ The SAP LeanIX agent discovers self-built software in self-hosted GitHub Enterpr - `GITHUB_APP_ID`: The ID of your GitHub App. - `PEM_FILE`: The path to your GitHub App's PEM file inside the Docker container. - `WEBHOOK_SECRET`: The secret used to validate incoming webhook events from GitHub. (Optional, but recommended. [Needs to be set in the GitHub App settings first](https://docs.github.com/en/enterprise-server@3.8/webhooks/using-webhooks/validating-webhook-deliveries).) + - `JAVA_OPTS`: Java options for the agent. Use this to set proxy settings if required. 5. **Start the agent**: To start the agent, run the following Docker command. Replace the variables in angle brackets with your actual values. @@ -38,6 +39,7 @@ The SAP LeanIX agent discovers self-built software in self-hosted GitHub Enterpr -e GITHUB_APP_ID= \ -e PEM_FILE=/privateKey.pem \ -e WEBHOOK_SECRET= \ + -e JAVA_OPTS="-Dhttp.proxyHost= -Dhttp.proxyPort= -Dhttps.proxyHost= -Dhttps.proxyPort=" \ leanix-github-agent ``` From 8f9389ed7b9c2d48dcea09f8faf30214e3f79ce9 Mon Sep 17 00:00:00 2001 From: mohamedlajmileanix Date: Tue, 26 Nov 2024 14:13:52 +0100 Subject: [PATCH 02/10] CID-2910: Add troubleshooting section --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5960d53..e49e065 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,7 @@ The SAP LeanIX agent discovers self-built software in self-hosted GitHub Enterpr -e GITHUB_APP_ID= \ -e PEM_FILE=/privateKey.pem \ -e WEBHOOK_SECRET= \ - -e JAVA_OPTS="-Dhttp.proxyHost= -Dhttp.proxyPort= -Dhttps.proxyHost= -Dhttps.proxyPort=" \ - leanix-github-agent + ghcr.io/leanix/leanix-github-agent:dev ``` This command starts the agent and exposes it on port 8000. The agent starts scanning your organizations and repositories. @@ -51,6 +50,50 @@ The SAP LeanIX agent discovers self-built software in self-hosted GitHub Enterpr **Note**: The Docker image for the agent is currently unavailable. It will become available for download once a new version is released. Please check the [Releases](https://github.com/leanix/leanix-github-agent/releases) page for updates. +### Troubleshooting + +#### Using over a http proxy system + +Add the following properties on the command: + +```console +docker run + ... + -e JAVA_OPTS="-Dhttp.proxyHost= -Dhttp.proxyPort= -Dhttps.proxyHost= -Dhttps.proxyPort=" \ + ghcr.io/leanix/leanix-github-agent:dev +``` +> Note: Basic authentication is not currently supported. + +#### Using over SSL Intercepting proxy + +Build your own docker image adding the certificate: + +```console +FROM ghcr.io/leanix/leanix-github-agent:dev + + +USER root + +RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* +COPY YOUR-CERTIFICATE-HERE /usr/local/share/ca-certificates/YOUR-CERTIFICATE-HERE +RUN update-ca-certificates +RUN keytool -import -trustcacerts -keystore $JAVA_HOME/lib/security/cacerts -storepass changeit -noprompt -alias YOUR-CERTIFICATE-HERE -file /usr/local/share/ca-certificates/YOUR-CERTIFICATE-HERE + +``` + +> Note: You should add an additional COPY and the final RUN for each certificate you need to insert into the image. + +#### Using amd64 images on Apple M1 + +Just run the container by providing the following command: + +```console + +docker run --platform linux/amd64 \ + ... + ghcr.io/leanix/leanix-github-agent:dev +``` + ## Support and Feedback We welcome your feedback, feature suggestions, and bug reports via [GitHub issues](https://github.com/leanix/leanix-github-agent/issues). From 0ad14bb587e278c936dd47440f406cbde55b697a Mon Sep 17 00:00:00 2001 From: ana-dashuk Date: Tue, 26 Nov 2024 17:12:20 +0100 Subject: [PATCH 03/10] Add Troubleshooting to title --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e49e065..107868f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The SAP LeanIX agent discovers self-built software in self-hosted GitHub Enterprise setups and communicates this information to an SAP LeanIX workspace. -## Prerequisites and Installation +## Prerequisites, Installation, and Troubleshooting ### Prerequisites From 2cfe90772e5786bd6d6098f0a53dc2736fe071be Mon Sep 17 00:00:00 2001 From: Amin Lajmi <76781027+mohamedlajmileanix@users.noreply.github.com> Date: Thu, 28 Nov 2024 08:51:23 +0100 Subject: [PATCH 04/10] Accepting PR suggestion Co-authored-by: ana-dashuk <145348740+ana-dashuk-leanix@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 107868f..eafa73e 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ The SAP LeanIX agent discovers self-built software in self-hosted GitHub Enterpr ### Troubleshooting -#### Using over a http proxy system +#### Using an HTTP Proxy System -Add the following properties on the command: +Add the following properties to the command: ```console docker run From bb2f18636a560012cf56f10c608a427b8ca7746c Mon Sep 17 00:00:00 2001 From: Amin Lajmi <76781027+mohamedlajmileanix@users.noreply.github.com> Date: Thu, 28 Nov 2024 08:51:31 +0100 Subject: [PATCH 05/10] Accepting PR suggestion Co-authored-by: ana-dashuk <145348740+ana-dashuk-leanix@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eafa73e..0cd2fae 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ docker run -e JAVA_OPTS="-Dhttp.proxyHost= -Dhttp.proxyPort= -Dhttps.proxyHost= -Dhttps.proxyPort=" \ ghcr.io/leanix/leanix-github-agent:dev ``` -> Note: Basic authentication is not currently supported. +> **Note:** Basic authentication is not currently supported. #### Using over SSL Intercepting proxy From 6f84cc1a668376ceb9c3c69af62ce311ded25433 Mon Sep 17 00:00:00 2001 From: Amin Lajmi <76781027+mohamedlajmileanix@users.noreply.github.com> Date: Thu, 28 Nov 2024 08:51:41 +0100 Subject: [PATCH 06/10] Accepting PR suggestion Co-authored-by: ana-dashuk <145348740+ana-dashuk-leanix@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0cd2fae..8f60eef 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ docker run ``` > **Note:** Basic authentication is not currently supported. -#### Using over SSL Intercepting proxy +#### Using an SSL Intercepting Proxy Build your own docker image adding the certificate: From d24593bffb29b5f1841a74cda74b02d7e0cc4b43 Mon Sep 17 00:00:00 2001 From: Amin Lajmi <76781027+mohamedlajmileanix@users.noreply.github.com> Date: Thu, 28 Nov 2024 08:52:01 +0100 Subject: [PATCH 07/10] Accepting PR suggestion Co-authored-by: ana-dashuk <145348740+ana-dashuk-leanix@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f60eef..8d8b0e5 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ docker run #### Using an SSL Intercepting Proxy -Build your own docker image adding the certificate: +Build your own Docker image by adding the certificate: ```console FROM ghcr.io/leanix/leanix-github-agent:dev From 38baeacee4510e2ba856e601f0b94974a40c5ec6 Mon Sep 17 00:00:00 2001 From: Amin Lajmi <76781027+mohamedlajmileanix@users.noreply.github.com> Date: Thu, 28 Nov 2024 08:52:15 +0100 Subject: [PATCH 08/10] Accepting PR suggestion Co-authored-by: ana-dashuk <145348740+ana-dashuk-leanix@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d8b0e5..9274137 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ RUN keytool -import -trustcacerts -keystore $JAVA_HOME/lib/security/cacerts -st ``` -> Note: You should add an additional COPY and the final RUN for each certificate you need to insert into the image. +> **Note:** Add an additional COPY and the final RUN for each certificate you need to insert into the image. #### Using amd64 images on Apple M1 From 9a6ba06314e8ade378825123a18df1ac64a290c8 Mon Sep 17 00:00:00 2001 From: Amin Lajmi <76781027+mohamedlajmileanix@users.noreply.github.com> Date: Thu, 28 Nov 2024 08:52:23 +0100 Subject: [PATCH 09/10] Accepting PR suggestion Co-authored-by: ana-dashuk <145348740+ana-dashuk-leanix@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9274137..26013ed 100644 --- a/README.md +++ b/README.md @@ -83,9 +83,9 @@ RUN keytool -import -trustcacerts -keystore $JAVA_HOME/lib/security/cacerts -st > **Note:** Add an additional COPY and the final RUN for each certificate you need to insert into the image. -#### Using amd64 images on Apple M1 +#### Using AMD64 Images on Apple M1 -Just run the container by providing the following command: +Run the container by providing the following command: ```console From ce5a8db355e2c693f585bdf35de7c83c42df4773 Mon Sep 17 00:00:00 2001 From: ana-dashuk Date: Thu, 28 Nov 2024 09:54:09 +0100 Subject: [PATCH 10/10] Minor updates --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 26013ed..9340a7a 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ docker run -e JAVA_OPTS="-Dhttp.proxyHost= -Dhttp.proxyPort= -Dhttps.proxyHost= -Dhttps.proxyPort=" \ ghcr.io/leanix/leanix-github-agent:dev ``` + > **Note:** Basic authentication is not currently supported. #### Using an SSL Intercepting Proxy @@ -81,7 +82,7 @@ RUN keytool -import -trustcacerts -keystore $JAVA_HOME/lib/security/cacerts -st ``` -> **Note:** Add an additional COPY and the final RUN for each certificate you need to insert into the image. +> **Note:** For each certificate you need to insert into the image, add a `COPY` command and a final `RUN` command. #### Using AMD64 Images on Apple M1