diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 3a2a60682c..74ffae8952 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -69,7 +69,7 @@ jobs: run: ./gradlew :sechub-cli:buildGo :sechub-cli:testGo - name: Build Server, DAUI and generate OpenAPI file - run: ./gradlew ensureLocalhostCertificate build generateOpenapi buildDeveloperAdminUI -x :sechub-cli:build + run: ./gradlew ensureLocalhostCertificate build generateOpenapi -x :sechub-cli:build - name: Generate and build Java projects related to SecHub Java API run: ./gradlew :sechub-api-java:build :sechub-systemtest:build :sechub-pds-tools:buildPDSToolsCLI -Dsechub.build.stage=api-necessary diff --git a/.github/workflows/release-client-server-pds.yml b/.github/workflows/release-client-server-pds.yml index d509fe4877..21f64783c1 100644 --- a/.github/workflows/release-client-server-pds.yml +++ b/.github/workflows/release-client-server-pds.yml @@ -173,7 +173,7 @@ jobs: # Build SecHub Server + PDS # ---------------------- - name: Build Server and PDS artifacts - run: ./gradlew ensureLocalhostCertificate build generateOpenapi buildDeveloperAdminUI -x :sechub-cli:build + run: ./gradlew ensureLocalhostCertificate build generateOpenapi -x :sechub-cli:build # ---------------------- # Build API Java publish diff --git a/.github/workflows/release-pds-tools.yml b/.github/workflows/release-pds-tools.yml index f453c5c8fb..22e9ee0b9e 100644 --- a/.github/workflows/release-pds-tools.yml +++ b/.github/workflows/release-pds-tools.yml @@ -96,7 +96,7 @@ jobs: # Build SecHub PDS-Tools # ---------------------- - name: Build Server, DAUI and generate OpenAPI file - run: ./gradlew ensureLocalhostCertificate build generateOpenapi buildDeveloperAdminUI -x :sechub-integrationtest:test -x :sechub-cli:build + run: ./gradlew ensureLocalhostCertificate build generateOpenapi -x :sechub-integrationtest:test -x :sechub-cli:build - name: Generate and build Java projects related to SecHub Java API run: ./gradlew :sechub-api-java:build :sechub-systemtest:build :sechub-pds-tools:buildPDSToolsCLI -Dsechub.build.stage=api-necessary diff --git a/continous-integration-multibranch-pipeline.jenkins b/continous-integration-multibranch-pipeline.jenkins index 907c86ff0d..bfda3d70ec 100644 --- a/continous-integration-multibranch-pipeline.jenkins +++ b/continous-integration-multibranch-pipeline.jenkins @@ -57,7 +57,7 @@ pipeline { // We do NOT build sechub-integrationtest // Reason: because we do NOT want to have the integration tests executed, otherwise gradle will not execute them // on integration phase again (because nothing has changed, so gradle will cache the results which are ignored ... - callGradleWrapper("ensureLocalhostCertificate build generateOpenapi buildDeveloperAdminUI -x :sechub-cli:build -Psechub.test.wiremock.https_port=${env.SECHUB_TEST_WIREMOCK_HTTPS_PORT} -Psechub.test.wiremock.http_port=${env.SECHUB_TEST_WIREMOCK_HTTP_PORT} --console=plain") + callGradleWrapper("ensureLocalhostCertificate build generateOpenapi -x :sechub-cli:build -Psechub.test.wiremock.https_port=${env.SECHUB_TEST_WIREMOCK_HTTPS_PORT} -Psechub.test.wiremock.http_port=${env.SECHUB_TEST_WIREMOCK_HTTP_PORT} --console=plain") callGradleWrapper(":sechub-api-java:build :sechub-systemtest:build :sechub-pds-tools:buildPDSToolsCLI -Dsechub.build.stage=api-necessary --console=plain") } } diff --git a/docs/latest/sechub-developer-quickstart-guide.html b/docs/latest/sechub-developer-quickstart-guide.html index 151a4ccca0..874da0b4be 100644 --- a/docs/latest/sechub-developer-quickstart-guide.html +++ b/docs/latest/sechub-developer-quickstart-guide.html @@ -1939,7 +1939,7 @@

5.2. Run Integration Tests From
-
./gradlew ensureLocalhostCertificate build generateOpenapi buildDeveloperAdminUI -x :sechub-cli:build
+
./gradlew ensureLocalhostCertificate build generateOpenapi -x :sechub-cli:build
diff --git a/gradle/projects.gradle b/gradle/projects.gradle index acadbd954c..2955e328fb 100644 --- a/gradle/projects.gradle +++ b/gradle/projects.gradle @@ -58,7 +58,10 @@ projectType = [ project(':sechub-wrapper-secretvalidation'), /* archUnit */ - project(':sechub-archunit-test') + project(':sechub-archunit-test'), + + /* developerTools */ + project(':sechub-developertools') // to have DAUI available by build and a working fat jar provided by spring boot ], /* adapter projects - have simple spring dependencies, but know only sechub-adapter as base */ diff --git a/release-pipeline.jenkins b/release-pipeline.jenkins index 6f60cc88a8..0f214961ce 100644 --- a/release-pipeline.jenkins +++ b/release-pipeline.jenkins @@ -70,7 +70,7 @@ pipeline { * Reason: because we do NOT want to have the integration tests executed, otherwise gradle will not execute them * on integration phase again (because nothing has changed, so gradle will cache the results which are ignored ... */ - callGradleWrapper("ensureLocalhostCertificate build generateOpenapi buildDeveloperAdminUI -x :sechub-integrationtest:test -x :sechub-cli:build -Psechub.test.wiremock.https_port=${env.SECHUB_TEST_WIREMOCK_HTTPS_PORT} -Psechub.test.wiremock.http_port=${env.SECHUB_TEST_WIREMOCK_HTTP_PORT}") + callGradleWrapper("ensureLocalhostCertificate build generateOpenapi -x :sechub-integrationtest:test -x :sechub-cli:build -Psechub.test.wiremock.https_port=${env.SECHUB_TEST_WIREMOCK_HTTPS_PORT} -Psechub.test.wiremock.http_port=${env.SECHUB_TEST_WIREMOCK_HTTP_PORT}") callGradleWrapper(":sechub-api-java:build :sechub-systemtest:build :sechub-pds-tools:buildPDSToolsCLI -Dsechub.build.stage=api-necessary") } } diff --git a/sechub-developertools/README.adoc b/sechub-developertools/README.adoc new file mode 100644 index 0000000000..e238bf67c2 --- /dev/null +++ b/sechub-developertools/README.adoc @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: MIT +:toc: + +== About +`sechub-developertools` is a gradle subprojects +only containing tools for SecHub development. It is not intended to be used in production. + +WARNING: No other gradle submodule shall have this project as a dependency! + + +== Content + +=== DAUI +The Developer Administration UI (DAUI) is a simple quick and dirty administration client which will reuse parts +from `sechub-integration--test` (for example REST api access, URL building). + +Every single feature we implement, is available at this simple UI from the beginning. +It is extreme simple to extend. + +[TIP] +==== +Look into +`/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/job/GetJobStatusAction.java` +for an example how you can simply implement a feature. +==== + +===== Build +Inside sechub root folder execute: + +[source, bash] +---- +./gradlew :sechub-developertools:bootJar +---- + +This will build +`/sechub-developertools/build/libs/sechub-developertools-0.0.0.jar` + + +===== Start +[source, bash] +---- +export SECHUB_ADMIN_APITOKEN=int-test_superadmin-pwd +export SECHUB_ADMIN_ENVIRONMENT=localhost +export SECHUB_ADMIN_USERID=int-test_superadmin +export SECHUB_ADMIN_SERVER=localhost +export SECHUB_ADMIN_SERVER_PORT=8443 + +java -jar ./sechub-developertools/build/libs/sechub-developertools-0.0.0.jar +---- + diff --git a/sechub-developertools/README.md b/sechub-developertools/README.md deleted file mode 100644 index 8b14dd7e24..0000000000 --- a/sechub-developertools/README.md +++ /dev/null @@ -1,13 +0,0 @@ - -What is "sechub-developertools" for? -==================================== - -A collection of some tooling around sechub which is only available for developers and not part of -a deployment or a client given to users. - -__NEVER give those tools to admins or users!__ - -## Content: -### 1. Quick and dirty admin client -One of the first things created here is a simple quick and dirty administration client which will reuse parts -from integration test project - e.g. rest api access, url building etc. which is already done there. *So we do not reinvent the wheel...* \ No newline at end of file diff --git a/sechub-developertools/build.gradle b/sechub-developertools/build.gradle index b7e3887037..4b132ec41d 100644 --- a/sechub-developertools/build.gradle +++ b/sechub-developertools/build.gradle @@ -7,7 +7,9 @@ */ plugins { id 'java-library' + id 'org.springframework.boot' apply true } + dependencies { implementation project(':sechub-testframework') @@ -23,48 +25,9 @@ dependencies { } -task startIntegrationTestAdminUI(type: JavaExec){ - - group 'sechub' - description 'Starts developer admin ui ready to use with for a server started by gradle task ' - - classpath = sourceSets.main.runtimeClasspath - - mainClass = 'com.mercedesbenz.sechub.developertools.admin.ui.DeveloperAdministrationUI' - - jvmArgs = ['-Dsechub.developertools.admin.integrationtestserver=true', - '-Dsechub.developertools.admin.server=localhost', - '-Dsechub.developertools.admin.serverport=8443', - '-Dsechub.developertools.admin.userid=int-test_superadmin', - '-Dsechub.developertools.admin.apitoken=int-test_superadmin-pwd'] - -} - -task buildDeveloperAdminUI(type: Jar, dependsOn: build) { - group 'sechub' - description 'Builds the SecHub Developer Admin tool as standalone executable jar. Use launch-developer-admin-ui script to execute' - archiveBaseName = 'sechub-developer-admin-ui' - /* TODO: This is a 'dirty' fix for the standard archive entries limit of 64K. We should refactor this module to make it leaner */ - zip64 = true - - manifest { - attributes 'Main-Class': 'com.mercedesbenz.sechub.developertools.admin.ui.DeveloperAdministrationUI' - } - - from { - configurations.runtimeClasspath.collect { - it.isDirectory() ? it : zipTree(it) - } - } - duplicatesStrategy = DuplicatesStrategy.INCLUDE - with jar -} - - task importEclipseProjectsNeedingOpenApiFile(type: Exec){ workingDir "$rootDir" commandLine './gradlew', ':sechub-systemtest:cleanEclipse',':sechub-systemtest:eclipse', ':sechub-web-server:cleanEclipse',':sechub-web-server:eclipse', ':sechub-api-java:cleanEclipse',':sechub-api-java:eclipse', ':sechub-pds-tools:cleanEclipse',':sechub-pds-tools:eclipse',':sechub-examples:example-sechub-api-java:cleanEclipse',':sechub-examples:example-sechub-api-java:eclipse','-Dsechub.build.stage=all' - } /* diff --git a/sechub-developertools/scripts/sdc.sh b/sechub-developertools/scripts/sdc.sh index 003ca50a2d..f502bc9622 100755 --- a/sechub-developertools/scripts/sdc.sh +++ b/sechub-developertools/scripts/sdc.sh @@ -345,7 +345,7 @@ if [[ "$FULL_BUILD" = "YES" ]]; then ./gradlew spotlessCheck :sechub-cli:buildGo :sechub-cli:testGo step "Build Server, DAUI and generate OpenAPI file" - ./gradlew ensureLocalhostCertificate build generateOpenapi buildDeveloperAdminUI -x :sechub-cli:build + ./gradlew ensureLocalhostCertificate build generateOpenapi -x :sechub-cli:build step "Generate and build Java projects related to SecHub Java API" ./gradlew :sechub-api-java:build :sechub-systemtest:build :sechub-pds-tools:buildPDSToolsCLI :sechub-web-server:build -Dsechub.build.stage=api-necessary diff --git a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/DAUIApplication.java b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/DAUIApplication.java new file mode 100644 index 0000000000..e402416979 --- /dev/null +++ b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/DAUIApplication.java @@ -0,0 +1,16 @@ +package com.mercedesbenz.sechub.developertools; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration; +import org.springframework.boot.builder.SpringApplicationBuilder; + +@SpringBootApplication(exclude = RepositoryRestMvcAutoConfiguration.class) // we do not want to have automatic resources in HAL & co +public class DAUIApplication { + + public static void main(String[] args) { + SpringApplicationBuilder builder = new SpringApplicationBuilder(DAUIApplication.class); + builder.headless(false); + + builder.run(args); + } +} diff --git a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/DAUICLIRunner.java b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/DAUICLIRunner.java new file mode 100644 index 0000000000..faba0a26ac --- /dev/null +++ b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/DAUICLIRunner.java @@ -0,0 +1,16 @@ +package com.mercedesbenz.sechub.developertools; + +import org.springframework.boot.CommandLineRunner; +import org.springframework.stereotype.Component; + +import com.mercedesbenz.sechub.developertools.admin.ui.DeveloperAdministrationUI; + +@Component +public class DAUICLIRunner implements CommandLineRunner { + + @Override + public void run(String... args) throws Exception { + DeveloperAdministrationUI.main(args); + } + +} diff --git a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/CommandUI.java b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/CommandUI.java index cdbefba643..e38c0d3530 100644 --- a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/CommandUI.java +++ b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/CommandUI.java @@ -460,7 +460,7 @@ private void createIntegrationTestServerMenu() { if (!ConfigurationSetup.isIntegrationTestServerMenuEnabled()) { menu.setEnabled(false); - menu.setToolTipText("Not enabled, use \"-D" + ConfigurationSetup.SECHUB_ENABLE_INTEGRATION_TESTSERVER_MENU.getSystemPropertyid() + menu.setToolTipText("Not enabled, use \"-D" + ConfigurationSetup.SECHUB_ENABLE_INTEGRATION_TESTSERVER_MENU.getSystemPropertyId() + "=true\" to enable it and run an integration test server!"); return; } diff --git a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/ConfigurationSetup.java b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/ConfigurationSetup.java index b785a70f35..60644b8033 100644 --- a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/ConfigurationSetup.java +++ b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/ConfigurationSetup.java @@ -15,88 +15,94 @@ */ public enum ConfigurationSetup { - SECHUB_ADMIN_USERID(false), + SECHUB_ADMIN_USERID(false, true), - SECHUB_ADMIN_APITOKEN(false), + SECHUB_ADMIN_APITOKEN(false, true), - SECHUB_ADMIN_SERVER("sechub.developertools.admin.server", false), + SECHUB_ADMIN_SERVER("sechub.developertools.admin.server", false, false), - SECHUB_ADMIN_SERVER_PORT("sechub.developertools.admin.serverport", true), + SECHUB_ADMIN_SERVER_PORT("sechub.developertools.admin.serverport", true, false), - SECHUB_ADMIN_SERVER_PROTOCOL("sechub.developertools.admin.serverprotocol", true), + SECHUB_ADMIN_SERVER_PROTOCOL("sechub.developertools.admin.serverprotocol", true, false), - SECHUB_ENABLE_INTEGRATION_TESTSERVER_MENU("sechub.developertools.admin.integrationtestserver", true), + SECHUB_ENABLE_INTEGRATION_TESTSERVER_MENU("sechub.developertools.admin.integrationtestserver", true, false), - SECHUB_DISABLE_CONFIRMATIONS("sechub.developertools.admin.disable.confim", true, "When set to true, no confirmation dialogs will appear"), + SECHUB_DISABLE_CONFIRMATIONS("sechub.developertools.admin.disable.confim", true, "When set to true, no confirmation dialogs will appear", false), - SECHUB_CHECK_STATUS_ON_STARTUP("sechub.developertools.admin.statuscheck.onstartup", true), + SECHUB_CHECK_STATUS_ON_STARTUP("sechub.developertools.admin.statuscheck.onstartup", true, false), /** * Here you can set environment information. See description for details */ SECHUB_ADMIN_ENVIRONMENT("sechub.developertools.admin.environment", false, - "Use 'PROD', 'INT' or anything containing 'TEST' for dedicated colors (red,yellow,cyan). All other variants are without special colors"), + "Use 'PROD', 'INT' or anything containing 'TEST' for dedicated colors (red,yellow,cyan). All other variants are without special colors", false), - SECHUB_MASS_OPERATION_PARENTDIRECTORY("sechub.developertools.admin.massoperation.parentdirectory", true), + SECHUB_MASS_OPERATION_PARENTDIRECTORY("sechub.developertools.admin.massoperation.parentdirectory", true, false), - PDS_SOLUTION_GENERATOR_SECHUB_CONFIGURATION_DIRECTORY("pds.solution.generator.config.sechub.parentdirectory", true), + PDS_SOLUTION_GENERATOR_SECHUB_CONFIGURATION_DIRECTORY("pds.solution.generator.config.sechub.parentdirectory", true, false), /** * Usage: for example -Dsechub.developertools.output.font.settings="courier 18" */ - SECHUB_OUTPUT_FONT_SETTINGS("sechub.developertools.output.font.settings", true), + SECHUB_OUTPUT_FONT_SETTINGS("sechub.developertools.output.font.settings", true, false), - SECHUB_LOOK_AND_FEEL("sechub.developertools.lookandfeel.nimbus", true), + SECHUB_LOOK_AND_FEEL("sechub.developertools.lookandfeel.nimbus", true, false), SECHUB_TARGETFOLDER_FOR_SECHUB_CLIENT_SCAN("sechub.developertools.admin.launch.scan.targetfolder", true, - "Default path to parent folder of configuration file and sources to scan"), + "Default path to parent folder of configuration file and sources to scan", false), /** * When defined we use this path instead IDE relative one */ - SECHUB_PATH_TO_SECHUB_CLIENT_BINARY("sechub.developertools.admin.launch.clientbinary.path", true), + SECHUB_PATH_TO_SECHUB_CLIENT_BINARY("sechub.developertools.admin.launch.clientbinary.path", true, false), - SECHUB_TRUSTALL_DENIED("sechub.developertools.trustall.denied", true); + SECHUB_TRUSTALL_DENIED("sechub.developertools.trustall.denied", true, false); ; - private String systemPropertyid; + private String systemPropertyId; private String environmentEntryId; private boolean optional; private String description; + private boolean sensitiveInformation; - private ConfigurationSetup(boolean optional) { - this(null, optional); + private ConfigurationSetup(boolean optional, boolean sensitiveInformation) { + this(null, optional, null, sensitiveInformation); } - private ConfigurationSetup(String systemPropertyid, boolean optional) { - this(systemPropertyid, optional, null); + private ConfigurationSetup(String systemPropertyid, boolean optional, boolean sensitiveInformation) { + this(systemPropertyid, optional, null, sensitiveInformation); } - private ConfigurationSetup(String systemPropertyid, boolean optional, String description) { + private ConfigurationSetup(String systemPropertyid, boolean optional, String description, boolean sensitiveInformation) { this.optional = optional; - this.systemPropertyid = systemPropertyid; + this.systemPropertyId = systemPropertyid; this.environmentEntryId = name(); this.description = description; + this.sensitiveInformation = sensitiveInformation; + } + + public boolean isSensitiveInformation() { + return sensitiveInformation; } public String getEnvironmentEntryId() { return environmentEntryId; } - public String getSystemPropertyid() { - return systemPropertyid; + public String getSystemPropertyId() { + return systemPropertyId; } public static boolean isIntegrationTestServerMenuEnabled() { - return Boolean.getBoolean(ConfigurationSetup.SECHUB_ENABLE_INTEGRATION_TESTSERVER_MENU.getSystemPropertyid()); + return Boolean.getBoolean(ConfigurationSetup.SECHUB_ENABLE_INTEGRATION_TESTSERVER_MENU.getSystemPropertyId()); } public static boolean isConfirmationDisabled() { - return Boolean.getBoolean(ConfigurationSetup.SECHUB_DISABLE_CONFIRMATIONS.getSystemPropertyid()); + return Boolean.getBoolean(ConfigurationSetup.SECHUB_DISABLE_CONFIRMATIONS.getSystemPropertyId()); } public static boolean isCheckOnStartupEnabled() { - return Boolean.getBoolean(ConfigurationSetup.SECHUB_CHECK_STATUS_ON_STARTUP.getSystemPropertyid()); + return Boolean.getBoolean(ConfigurationSetup.SECHUB_CHECK_STATUS_ON_STARTUP.getSystemPropertyId()); } public static String getOutputFontSettings(String defaultSetting) { @@ -114,11 +120,11 @@ public static String getParentFolderPathForSecHubClientScanOrNull() { * GTK */ public static boolean isNimbusLookAndFeelEnabled() { - return Boolean.getBoolean(ConfigurationSetup.SECHUB_LOOK_AND_FEEL.getSystemPropertyid()); + return Boolean.getBoolean(ConfigurationSetup.SECHUB_LOOK_AND_FEEL.getSystemPropertyId()); } public static boolean isTrustAllDenied() { - return Boolean.getBoolean(ConfigurationSetup.SECHUB_TRUSTALL_DENIED.getSystemPropertyid()); + return Boolean.getBoolean(ConfigurationSetup.SECHUB_TRUSTALL_DENIED.getSystemPropertyId()); } /** @@ -161,8 +167,8 @@ public String getStringValue(String defaultValue, boolean failWhenNull) { } /* then try system property - if not already set */ if (value == null) { - if (systemPropertyid != null) { - value = System.getProperty(systemPropertyid, defaultValue); + if (systemPropertyId != null) { + value = System.getProperty(systemPropertyId, defaultValue); } } /* then use default value - if not already set */ @@ -185,15 +191,56 @@ private void assertNotEmpty(String part, String missing) { private static String description() { StringBuilder sb = new StringBuilder(); - sb.append("Use following system properties:\n"); + sb.append("\nMandatory settings:\n------------------------------\nAs environment variables):\n"); + appendEnvironmentVariables(sb, false); + sb.append("Or by system properties:\n"); + appendSystemProperties(sb, false); + + sb.append("\nOptional settings:\n------------------------------\nAs environment variables):\n"); + appendEnvironmentVariables(sb, true); + appendSystemProperties(sb, true); + + return sb.toString(); + } + + private static void appendEnvironmentVariables(StringBuilder sb, boolean expectedToBeOptional) { + for (ConfigurationSetup setup : values()) { + if (expectedToBeOptional != setup.optional) { + continue; + } + if (setup.environmentEntryId == null) { + continue; + } + sb.append(" "); + sb.append(setup.environmentEntryId); + sb.append("=some-value"); + if (setup.optional) { + sb.append(" (optional)"); + } + if (setup.isSensitiveInformation()) { + sb.append(" (sensitive information)"); + } + if (setup.description != null) { + sb.append(" ["); + sb.append(setup.description); + sb.append("]"); + } + sb.append("\n"); + } + } + + private static void appendSystemProperties(StringBuilder sb, boolean expectedToBeOptional) { for (ConfigurationSetup setup : values()) { - if (setup.systemPropertyid == null) { + if (setup.optional != expectedToBeOptional) { + continue; + } + if (setup.systemPropertyId == null || setup.isSensitiveInformation()) { continue; } sb.append("-D"); - sb.append(setup.systemPropertyid); + sb.append(setup.systemPropertyId); sb.append("="); - String val = System.getProperty(setup.systemPropertyid); + String val = System.getProperty(setup.systemPropertyId); if (val != null && !val.isEmpty()) { val = "**** (already set)"; } @@ -208,16 +255,6 @@ private static String description() { } sb.append("\n"); } - sb.append("\nFor security reasons next parts must be set as environment variables (so not visible in process view):\n"); - for (ConfigurationSetup setup : values()) { - if (setup.environmentEntryId == null) { - continue; - } - sb.append(" "); - sb.append(setup.environmentEntryId); - sb.append("'\n"); - } - return sb.toString(); } } diff --git a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/CredentialUI.java b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/CredentialUI.java index c9ba22220e..5a34a0e6bc 100644 --- a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/CredentialUI.java +++ b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/CredentialUI.java @@ -88,11 +88,11 @@ public CredentialUI(UIContext context) { serverPortSpinner.setEnabled(false); protocolField.setEnabled(false); - serverField.setToolTipText(ConfigurationSetup.SECHUB_ADMIN_SERVER.getSystemPropertyid()); - useridField.setToolTipText(ConfigurationSetup.SECHUB_ADMIN_USERID.getSystemPropertyid()); - passwordField.setToolTipText(ConfigurationSetup.SECHUB_ADMIN_APITOKEN.getSystemPropertyid()); - serverPortSpinner.setToolTipText(ConfigurationSetup.SECHUB_ADMIN_SERVER_PORT.getSystemPropertyid()); - protocolField.setToolTipText(ConfigurationSetup.SECHUB_ADMIN_SERVER_PROTOCOL.getSystemPropertyid()); + serverField.setToolTipText(ConfigurationSetup.SECHUB_ADMIN_SERVER.getSystemPropertyId()); + useridField.setToolTipText(ConfigurationSetup.SECHUB_ADMIN_USERID.getSystemPropertyId()); + passwordField.setToolTipText(ConfigurationSetup.SECHUB_ADMIN_APITOKEN.getSystemPropertyId()); + serverPortSpinner.setToolTipText(ConfigurationSetup.SECHUB_ADMIN_SERVER_PORT.getSystemPropertyId()); + protocolField.setToolTipText(ConfigurationSetup.SECHUB_ADMIN_SERVER_PROTOCOL.getSystemPropertyId()); useDifferentColorsForWellknownEnvironments(); diff --git a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/client/TriggerSecHubClientSynchronousScanAction.java b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/client/TriggerSecHubClientSynchronousScanAction.java index b00b4b0cc5..03f0f9d548 100644 --- a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/client/TriggerSecHubClientSynchronousScanAction.java +++ b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/client/TriggerSecHubClientSynchronousScanAction.java @@ -36,7 +36,7 @@ public void execute(ActionEvent event) throws Exception { "Please enter target folder for sechub scan:\n\n"+ (optionalProject.isPresent() ? "": "WARN: You didn't define a project. So this folder must contain a sechub.json having projectId defined inside to work!)")+"\nServer, user and apitoken are used by DAUI setup!\n"+ "INFO: You can set a a default by system property:\n"+ - ConfigurationSetup.SECHUB_TARGETFOLDER_FOR_SECHUB_CLIENT_SCAN.getSystemPropertyid(), InputCacheIdentifier.CLIENT_SCAN_TARGETFOLDER + ConfigurationSetup.SECHUB_TARGETFOLDER_FOR_SECHUB_CLIENT_SCAN.getSystemPropertyId(), InputCacheIdentifier.CLIENT_SCAN_TARGETFOLDER ); /* @formatter:on */ if (!optionalPath.isPresent()) { diff --git a/sechub-developertools/src/main/resources/application.yaml b/sechub-developertools/src/main/resources/application.yaml new file mode 100644 index 0000000000..4b4cc19c9c --- /dev/null +++ b/sechub-developertools/src/main/resources/application.yaml @@ -0,0 +1,3 @@ +spring: + main: + web-application-type: none # we do not want to start tomcat by DAUI \ No newline at end of file diff --git a/sechub-doc/src/docs/asciidoc/sechub-developer-quickstart-guide.adoc b/sechub-doc/src/docs/asciidoc/sechub-developer-quickstart-guide.adoc index c87c1a1889..8acdc852af 100644 --- a/sechub-doc/src/docs/asciidoc/sechub-developer-quickstart-guide.adoc +++ b/sechub-doc/src/docs/asciidoc/sechub-developer-quickstart-guide.adoc @@ -641,7 +641,7 @@ We explain the integration test setup based on the IntelliJ IDEA IDE. First run the following commands to create the necessary certificates for the integration test servers: ---- -./gradlew ensureLocalhostCertificate build generateOpenapi buildDeveloperAdminUI -x :sechub-cli:build +./gradlew ensureLocalhostCertificate build generateOpenapi -x :sechub-cli:build ---- ---- ./gradlew clean