- */
- boolean requestNewApiToken(String emailAddress) {
- /* @formatter:off */
-
- Boolean result = accessService.createExecutorForResult(Boolean.class).
- whenDoing("request a new api token").
- callAndReturn(client -> {
- client.requestNewApiToken(emailAddress);
- return Boolean.TRUE;
- }).
- onErrorReturn(exception -> Boolean.FALSE).
- execute();
-
- return Boolean.TRUE.equals(result);
-
- /* @formatter:on */
- }
-}
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/encryption/AES256Encryption.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/encryption/AES256Encryption.java
deleted file mode 100644
index cd7a5d4a85..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/encryption/AES256Encryption.java
+++ /dev/null
@@ -1,89 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.encryption;
-
-import java.nio.charset.StandardCharsets;
-import java.security.GeneralSecurityException;
-import java.security.InvalidKeyException;
-
-import javax.crypto.Cipher;
-import javax.crypto.SealedObject;
-import javax.crypto.SecretKey;
-import javax.crypto.spec.SecretKeySpec;
-
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.stereotype.Component;
-
-import com.mercedesbenz.sechub.commons.core.security.CryptoAccess;
-
-@Component
-@EnableConfigurationProperties(AES256EncryptionProperties.class)
-public class AES256Encryption {
-
- private static final String TRANSFORMATION = "AES";
- private static final CryptoAccess secretKeyCryptoAccess = new CryptoAccess<>();
-
- private final Cipher encrypt;
- private final Cipher decrypt;
- private final SealedObject sealedSecretKey;
-
- AES256Encryption(AES256EncryptionProperties properties) throws GeneralSecurityException {
- SecretKey secretKey = new SecretKeySpec(properties.getSecretKeyBytes(), TRANSFORMATION);
- this.sealedSecretKey = secretKeyCryptoAccess.seal(secretKey);
-
- this.encrypt = Cipher.getInstance(TRANSFORMATION);
- try {
- initEncrypt();
- } catch (Exception e) {
- throw new GeneralSecurityException(e);
- }
-
- this.decrypt = Cipher.getInstance(TRANSFORMATION);
- try {
- initDecrypt();
- } catch (Exception e) {
- throw new GeneralSecurityException(e);
- }
- }
-
- public byte[] encrypt(String plainText) {
- byte[] encryptedBytes;
-
- try {
- encryptedBytes = encrypt.doFinal(plainText.getBytes(StandardCharsets.UTF_8));
- } catch (Exception e) {
- initEncrypt();
- throw new AES256EncryptionException("Failed to encrypt text", e);
- }
-
- return encryptedBytes;
- }
-
- public String decrypt(byte[] encryptedBytes) {
- byte[] decryptedBytes;
-
- try {
- decryptedBytes = decrypt.doFinal(encryptedBytes);
- } catch (Exception e) {
- initDecrypt();
- throw new AES256EncryptionException("Failed to decrypt text", e);
- }
-
- return new String(decryptedBytes, StandardCharsets.UTF_8);
- }
-
- private void initEncrypt() {
- try {
- this.encrypt.init(Cipher.ENCRYPT_MODE, secretKeyCryptoAccess.unseal(sealedSecretKey));
- } catch (InvalidKeyException e) {
- throw new AES256EncryptionException("Failed to init encryption cipher", e);
- }
- }
-
- private void initDecrypt() {
- try {
- this.decrypt.init(Cipher.DECRYPT_MODE, secretKeyCryptoAccess.unseal(sealedSecretKey));
- } catch (InvalidKeyException e) {
- throw new AES256EncryptionException("Failed to init decryption cipher", e);
- }
- }
-}
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/encryption/AES256EncryptionException.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/encryption/AES256EncryptionException.java
deleted file mode 100644
index 800ec36cf6..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/encryption/AES256EncryptionException.java
+++ /dev/null
@@ -1,9 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.encryption;
-
-public class AES256EncryptionException extends RuntimeException {
-
- public AES256EncryptionException(String errMsg, Exception e) {
- super(errMsg, e);
- }
-}
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/encryption/AES256EncryptionProperties.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/encryption/AES256EncryptionProperties.java
deleted file mode 100644
index cd2e241017..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/encryption/AES256EncryptionProperties.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.encryption;
-
-import static java.util.Objects.requireNonNull;
-
-import java.nio.charset.StandardCharsets;
-
-import javax.crypto.SealedObject;
-
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.context.properties.bind.ConstructorBinding;
-
-import com.mercedesbenz.sechub.commons.core.security.CryptoAccess;
-
-@ConfigurationProperties(prefix = AES256EncryptionProperties.PREFIX)
-class AES256EncryptionProperties {
-
- static final String PREFIX = "sechub.security.encryption";
- private static final String ERR_MSG_FORMAT = "The property '%s.%s' must not be null";
- private static final int AES_256_SECRET_KEY_LENGTH = 32;
-
- private final SealedObject secretKeySealed;
-
- @ConstructorBinding
- AES256EncryptionProperties(String secretKey) {
- try {
- requireNonNull(secretKey, ERR_MSG_FORMAT.formatted(PREFIX, "secret-key"));
- this.secretKeySealed = CryptoAccess.CRYPTO_STRING.seal(secretKey);
- if (!is256BitString(secretKey)) {
- throw new IllegalArgumentException("The property %s.%s must be a 256-bit string".formatted(PREFIX, "secret-key"));
- }
- } finally {
- /* Ensure that the secret key is cleared */
- secretKey = null;
- }
- }
-
- byte[] getSecretKeyBytes() {
- return CryptoAccess.CRYPTO_STRING.unseal(secretKeySealed).getBytes(StandardCharsets.UTF_8);
- }
-
- /*
- * Checks if the secret key length is 32 characters (32 * 8 = 256 bits)
- */
- private static boolean is256BitString(String secretKey) {
- return secretKey.length() == AES_256_SECRET_KEY_LENGTH;
- }
-}
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/i18n/RequestParamLocaleContextResolver.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/i18n/RequestParamLocaleContextResolver.java
deleted file mode 100644
index 963b9abdd7..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/i18n/RequestParamLocaleContextResolver.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.i18n;
-
-import java.util.List;
-import java.util.Locale;
-
-import org.springframework.context.i18n.LocaleContext;
-import org.springframework.context.i18n.SimpleLocaleContext;
-import org.springframework.stereotype.Component;
-import org.springframework.web.server.ServerWebExchange;
-import org.springframework.web.server.adapter.WebHttpHandlerBuilder;
-import org.springframework.web.server.i18n.LocaleContextResolver;
-
-@Component(WebHttpHandlerBuilder.LOCALE_CONTEXT_RESOLVER_BEAN_NAME)
-public class RequestParamLocaleContextResolver implements LocaleContextResolver {
- public LocaleContext resolveLocaleContext(ServerWebExchange exchange) {
- List lang = exchange.getRequest().getQueryParams().get("lang");
- Locale targetLocale = null;
-
- if (lang != null && !lang.isEmpty()) {
- targetLocale = Locale.forLanguageTag(lang.get(0));
- }
- if (targetLocale == null) {
- targetLocale = Locale.US;
- }
- return new SimpleLocaleContext(targetLocale);
- }
-
- @Override
- public void setLocaleContext(ServerWebExchange exchange, LocaleContext localeContext) {
- throw new UnsupportedOperationException("Cannot change lang query parameter - use a different locale context resolution strategy");
- }
-}
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/page/HomeController.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/page/HomeController.java
deleted file mode 100644
index 8423fed050..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/page/HomeController.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.page;
-
-import org.springframework.security.core.annotation.AuthenticationPrincipal;
-import org.springframework.security.oauth2.core.oidc.user.OidcUser;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.GetMapping;
-
-import com.mercedesbenz.sechub.webserver.RequestConstants;
-
-@Controller
-class HomeController {
-
- @GetMapping(RequestConstants.HOME)
- public String home(@AuthenticationPrincipal OidcUser principal, Model model) {
- if (principal != null) {
- model.addAttribute("principal", principal.getAttribute("name"));
- }
- return "home";
- }
-}
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/page/LoginController.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/page/LoginController.java
deleted file mode 100644
index 45f5628d89..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/page/LoginController.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.page;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.env.Environment;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.GetMapping;
-
-import com.mercedesbenz.sechub.webserver.ApplicationProfiles;
-import com.mercedesbenz.sechub.webserver.RequestConstants;
-import com.mercedesbenz.sechub.webserver.security.OAuth2Properties;
-
-@Controller
-class LoginController {
-
- private final OAuth2Properties oAuth2Properties;
- private final boolean isOAuth2Enabled;
- private final boolean isClassicAuthEnabled;
-
- LoginController(@Autowired(required = false) OAuth2Properties oAuth2Properties, Environment environment) {
- this.oAuth2Properties = oAuth2Properties;
- this.isOAuth2Enabled = environment.matchesProfiles(ApplicationProfiles.OAUTH2_ENABLED);
- this.isClassicAuthEnabled = environment.matchesProfiles(ApplicationProfiles.CLASSIC_AUTH_ENABLED);
- }
-
- @GetMapping({ RequestConstants.ROOT, RequestConstants.LOGIN })
- String login(Model model) {
- model.addAttribute("isOAuth2Enabled", isOAuth2Enabled);
- model.addAttribute("isClassicAuthEnabled", isClassicAuthEnabled);
-
- if (oAuth2Properties != null) {
- String registrationId = oAuth2Properties.getProvider();
- model.addAttribute("registrationId", registrationId);
- }
-
- return "login";
- }
-
-}
\ No newline at end of file
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/sechubaccess/ClientCaller.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/sechubaccess/ClientCaller.java
deleted file mode 100644
index d6ee6757e9..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/sechubaccess/ClientCaller.java
+++ /dev/null
@@ -1,8 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.sechubaccess;
-
-import com.mercedesbenz.sechub.api.SecHubClient;
-
-public interface ClientCaller {
- public R callAndReturn(SecHubClient client) throws Exception;
-}
\ No newline at end of file
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/sechubaccess/ErrorCallback.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/sechubaccess/ErrorCallback.java
deleted file mode 100644
index 325b2da327..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/sechubaccess/ErrorCallback.java
+++ /dev/null
@@ -1,6 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.sechubaccess;
-
-public interface ErrorCallback {
- T handleExceptionAndReturnFallback(Exception e);
-}
\ No newline at end of file
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/sechubaccess/SecHubAccessService.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/sechubaccess/SecHubAccessService.java
deleted file mode 100644
index 406b539f3d..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/sechubaccess/SecHubAccessService.java
+++ /dev/null
@@ -1,111 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.sechubaccess;
-
-import java.net.URI;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Profile;
-import org.springframework.stereotype.Service;
-
-import com.mercedesbenz.sechub.api.MockedSecHubClient;
-import com.mercedesbenz.sechub.api.OldDefaultSecHubClient;
-import com.mercedesbenz.sechub.api.SecHubClient;
-import com.mercedesbenz.sechub.api.SecHubClientException;
-import com.mercedesbenz.sechub.webserver.ApplicationProfiles;
-
-import jakarta.annotation.PostConstruct;
-
-/**
- * Main class for communication with SecHub server. The {@link SecHubClient} is
- * not provided directly but via {@link #createExecutorForResult(Class)} and
- * {@link #createExecutorWithoutResult()} methods which provide a fluent and
- * secured access.
- *
- *
- * @author Albert Tregnaghi
- *
- */
-@Service
-@Profile(ApplicationProfiles.CLASSIC_AUTH_ENABLED)
-public class SecHubAccessService {
-
- static final Logger LOG = LoggerFactory.getLogger(SecHubAccessService.class);
-
- @Value("${web-server.sechub.server-url}")
- private String secHubServerUrl;
-
- @Value("${web-server.sechub.trust-all-certificates:false}")
- private boolean trustAllCertificates;
-
- @Value("${web-server.client.mocked:false}")
- private boolean useMockedClient;
-
- @Value("${web-server.sechub.userid}")
- private String userId;
-
- @Value("${web-server.sechub.apitoken}")
- private String apiToken;
-
- private SecHubClient client;
-
- @PostConstruct
- void initSecHubClient() {
- URI serverUri = URI.create(secHubServerUrl);
- /*
- * TODO Albert Tregnaghi, 2024-02-28: currently we have ONE client - maybe this
- * is okay, but when we use real user credentials/are delegate for it etc. it
- * could become necessary to have different clients ?! Means this is an open
- * question
- */
- /* @formatter:off */
- try {
- if (useMockedClient) {
- this.client = MockedSecHubClient.from(serverUri, userId, apiToken, trustAllCertificates);
- } else {
-
- this.client = OldDefaultSecHubClient.builder().
- server(serverUri).
- user(userId).
- apiToken(apiToken).
- trustAll(trustAllCertificates).
- build();
- }
- }finally {
- // reset sensitive data - is now stored secure in client object
- userId= null;
- apiToken=null;
- }
- /* @formatter:on */
- }
-
- public boolean isSecHubServerAlive() {
- try {
- return client.isServerAlive();
- } catch (SecHubClientException e) {
- return false;
- }
- }
-
- public String getServerVersion() {
- try {
- return client.getServerVersion();
- } catch (SecHubClientException e) {
- return "invalid";
- }
- }
-
- public URI getSecHubServerUri() {
- return client.getServerUri();
- }
-
- public SecHubClientExecutor createExecutorForResult(Class clazz) {
- return new SecHubClientExecutor<>(client, clazz);
- }
-
- public SecHubClientExecutor createExecutorWithoutResult() {
- return new SecHubClientExecutor<>(client, Void.class);
- }
-
-}
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/sechubaccess/SecHubClientExecutor.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/sechubaccess/SecHubClientExecutor.java
deleted file mode 100644
index b9851abd78..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/sechubaccess/SecHubClientExecutor.java
+++ /dev/null
@@ -1,89 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.sechubaccess;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.mercedesbenz.sechub.api.SecHubClient;
-
-/**
- * Provides a fluent api, automated logging and error handling. Also hides
- * client object and client exceptions.
- *
- * @author Albert Tregnaghi
- *
- * @param
- */
-public class SecHubClientExecutor {
-
- private static final Logger LOG = LoggerFactory.getLogger(SecHubClientExecutor.class);
-
- private SecHubClient client;
- protected String info;
- protected ClientCaller clientCaller;
- protected ErrorCallback errorCallback;
- protected Class resultClazz;
-
- private T fallbackResult;
- private boolean onErrorReturnFallback;
-
- SecHubClientExecutor(SecHubClient client, Class resultClazz) {
- this.client = client;
- this.resultClazz = resultClazz;
- }
-
- public SecHubClientExecutor whenDoing(String info) {
- this.info = info;
- return this;
- }
-
- public SecHubClientExecutor callAndReturn(ClientCaller clientCaller) {
- this.clientCaller = clientCaller;
- return this;
- }
-
- /**
- * Within this method we can handle errors explicit via an error callback.
- *
- * @param errorCallback
- * @return the object to return in case of an error
- */
- public SecHubClientExecutor onErrorReturn(ErrorCallback errorCallback) {
- this.onErrorReturnFallback = false;
- this.errorCallback = errorCallback;
- return this;
- }
-
- public SecHubClientExecutor onErrorReturnAlways(T fallbackResult) {
- this.onErrorReturnFallback = true;
- this.fallbackResult = fallbackResult;
- return this;
- }
-
- public T execute() {
- try {
- if (clientCaller == null) {
- throw new IllegalArgumentException("You did not define a client caller - please use call(..) method to define one!");
- }
- return clientCaller.callAndReturn(client);
- } catch (Exception e) {
-
- LOG.error("Client call failed: {}", info, e);
-
- if (onErrorReturnFallback) {
- return fallbackResult;
- }
-
- if (errorCallback == null) {
- if (!resultClazz.isAssignableFrom(Void.class)) {
- SecHubAccessService.LOG.warn(
- "Error callback not set for '{}' - will return null for expected result of '{}' result! This is a bug in usage - please use onError(..) method or call allowNullResults() to define correct error result!",
- info, resultClazz);
- }
- return null;
- }
- return errorCallback.handleExceptionAndReturnFallback(e);
- }
- }
-
-}
\ No newline at end of file
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/Base64EncodedClientIdAndSecretOAuth2AccessTokenClient.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/Base64EncodedClientIdAndSecretOAuth2AccessTokenClient.java
deleted file mode 100644
index 792083cda8..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/Base64EncodedClientIdAndSecretOAuth2AccessTokenClient.java
+++ /dev/null
@@ -1,124 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.security;
-
-import java.util.Base64;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.security.oauth2.client.endpoint.OAuth2AccessTokenResponseClient;
-import org.springframework.security.oauth2.client.endpoint.OAuth2AuthorizationCodeGrantRequest;
-import org.springframework.security.oauth2.client.registration.ClientRegistration;
-import org.springframework.security.oauth2.core.OAuth2AccessToken;
-import org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse;
-import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationExchange;
-import org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames;
-import org.springframework.util.LinkedMultiValueMap;
-import org.springframework.util.MultiValueMap;
-import org.springframework.web.client.RestClientException;
-import org.springframework.web.client.RestTemplate;
-import org.springframework.web.server.ResponseStatusException;
-
-/**
- *
- * Custom implementation of {@link OAuth2AccessTokenResponseClient} for
- * retrieving a JWT token response from a configured Identity Provider (IDP)
- * after a successful OAuth2 authorization code grant request.
- *
- *
- * This class handles the exchange of the authorization code for an access
- * token, refresh token, and ID token by making a POST request to the token
- * endpoint of the IDP. The client credentials (client ID and client secret) are
- * encoded in Base64 and included in the Authorization header of the request.
- *
- *
- * The response from the IDP is expected to be a {@link JwtResponse}, which
- * includes the access token, refresh token, ID token, and the expiration time
- * of the access token.
- *
- *
- * @see OAuth2AccessTokenResponseClient
- * @see OAuth2AuthorizationCodeGrantRequest
- * @see OAuth2AccessTokenResponse
- * @see WebServerSecurityConfiguration
- * @see JwtResponse
- *
- * @author hamidonos
- */
-class Base64EncodedClientIdAndSecretOAuth2AccessTokenClient implements OAuth2AccessTokenResponseClient {
-
- private static final Logger LOG = LoggerFactory.getLogger(Base64EncodedClientIdAndSecretOAuth2AccessTokenClient.class);
- private static final String GRANT_TYPE_VALUE = "authorization_code";
- private static final String BASIC_AUTHORIZATION_HEADER_VALUE_FORMAT = "Basic %s";
- private static final String CLIENT_ID_CLIENT_SECRET_FORMAT = "%s:%s";
- private static final String ID_TOKEN = "id_token";
-
- private final RestTemplate restTemplate;
-
- Base64EncodedClientIdAndSecretOAuth2AccessTokenClient(RestTemplate restTemplate) {
- this.restTemplate = restTemplate;
- }
-
- @Override
- public OAuth2AccessTokenResponse getTokenResponse(OAuth2AuthorizationCodeGrantRequest authorizationGrantRequest) {
- ClientRegistration clientRegistration = authorizationGrantRequest.getClientRegistration();
- String tokenUri = clientRegistration.getProviderDetails().getTokenUri();
- String clientId = clientRegistration.getClientId();
- String clientSecret = clientRegistration.getClientSecret();
-
- HttpHeaders headers = new HttpHeaders();
- headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
- headers.set(HttpHeaders.AUTHORIZATION, getBasicAuthHeaderValue(clientId, clientSecret));
-
- HttpEntity> entity = getMultiValueMapHttpEntity(authorizationGrantRequest, headers);
-
- JwtResponse jwtResponse;
- try {
- jwtResponse = restTemplate.postForObject(tokenUri, entity, JwtResponse.class);
-
- if (jwtResponse == null) {
- throw new RestClientException("JWT response is null");
- }
- } catch (RestClientException e) {
- String errMsg = "Failed to get JWT token response";
- LOG.error(errMsg, e);
- throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, errMsg, e);
- }
-
- Map additionalParameters = Map.of(ID_TOKEN, jwtResponse.getIdToken());
-
- /* @formatter:off */
- return OAuth2AccessTokenResponse
- .withToken(jwtResponse.getAccessToken())
- .tokenType(OAuth2AccessToken.TokenType.BEARER)
- .expiresIn(jwtResponse.getExpiresIn())
- .refreshToken(jwtResponse.getRefreshToken())
- .additionalParameters(additionalParameters)
- .build();
- /* @formatter:on */
- }
-
- private static HttpEntity> getMultiValueMapHttpEntity(OAuth2AuthorizationCodeGrantRequest authorizationGrantRequest,
- HttpHeaders headers) {
- MultiValueMap formParameters = new LinkedMultiValueMap<>();
- OAuth2AuthorizationExchange authorizationExchange = authorizationGrantRequest.getAuthorizationExchange();
- String code = authorizationExchange.getAuthorizationResponse().getCode();
- String redirectUri = authorizationExchange.getAuthorizationRequest().getRedirectUri();
-
- formParameters.add(OAuth2ParameterNames.GRANT_TYPE, GRANT_TYPE_VALUE);
- formParameters.add(OAuth2ParameterNames.CODE, code);
- formParameters.add(OAuth2ParameterNames.REDIRECT_URI, redirectUri);
-
- return new HttpEntity<>(formParameters, headers);
- }
-
- private static String getBasicAuthHeaderValue(String clientId, String clientSecret) {
- String clientIdClientSecret = CLIENT_ID_CLIENT_SECRET_FORMAT.formatted(clientId, clientSecret);
- String clientIdClientSecretB64Encoded = Base64.getEncoder().encodeToString(clientIdClientSecret.getBytes());
- return BASIC_AUTHORIZATION_HEADER_VALUE_FORMAT.formatted(clientIdClientSecretB64Encoded);
- }
-}
\ No newline at end of file
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/ClassicLoginSuccessHandler.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/ClassicLoginSuccessHandler.java
deleted file mode 100644
index f1d35f2cdf..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/ClassicLoginSuccessHandler.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.security;
-
-import java.io.IOException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
-
-import com.mercedesbenz.sechub.webserver.RequestConstants;
-
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-
-/**
- * {@code ClassicLoginSuccessHandler} implements
- * {@link AuthenticationSuccessHandler} to provide custom behavior upon
- * successful authentication. This handler redirects the user to the /home page
- * specified in {@link RequestConstants}.
- *
- * @see WebServerSecurityConfiguration
- * @see RequestConstants
- *
- * @author hamidonos
- */
-class ClassicLoginSuccessHandler implements AuthenticationSuccessHandler {
-
- private static final Logger LOG = LoggerFactory.getLogger(ClassicLoginSuccessHandler.class);
-
- @Override
- public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException {
- LOG.debug("Redirecting to {}", RequestConstants.HOME);
- response.sendRedirect(RequestConstants.HOME);
- }
-}
\ No newline at end of file
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/JwtCookieResolver.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/JwtCookieResolver.java
deleted file mode 100644
index 0a196524c1..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/JwtCookieResolver.java
+++ /dev/null
@@ -1,81 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.security;
-
-import java.util.Arrays;
-import java.util.Base64;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.security.oauth2.server.resource.web.BearerTokenResolver;
-
-import com.mercedesbenz.sechub.webserver.encryption.AES256Encryption;
-
-import jakarta.servlet.http.Cookie;
-import jakarta.servlet.http.HttpServletRequest;
-
-/**
- * {@code JwtCookieResolver} implements {@link BearerTokenResolver} to provide
- * custom Bearer Token resolution. The encrypted JWT is read from the cookies
- * and decrypted using {@link AES256Encryption}. Note that the JWT is expected
- * in {@link Base64} encoded format.
- *
- * @see BearerTokenResolver
- * @see AES256Encryption
- *
- * @author hamidonos
- */
-class JwtCookieResolver implements BearerTokenResolver {
-
- private static final Logger LOG = LoggerFactory.getLogger(JwtCookieResolver.class);
- private static final String MISSING_JWT_VALUE = "missing-jwt";
- private static final Base64.Decoder DECODER = Base64.getDecoder();
-
- private final AES256Encryption aes256Encryption;
-
- JwtCookieResolver(AES256Encryption aes256Encryption) {
- this.aes256Encryption = aes256Encryption;
- }
-
- @Override
- public String resolve(HttpServletRequest request) {
- Cookie[] cookies = request.getCookies();
-
- if (cookies == null) {
- LOG.debug("No cookies found in the request");
-
- /*
- * If the JWT cookie is not found, we return a constant string to indicate that
- * the JWT is missing. We do this because we want to pass exception handling
- * further down the chain. Spring does not provide a way to wrap exceptions
- * around custom BearerTokenResolver classes effectively. This is a good
- * practice because it allows us to handle the missing JWT in a more controlled
- * manner.
- */
- return MISSING_JWT_VALUE;
- }
-
- /* @formatter:off */
- String jwt = Arrays
- .stream(cookies)
- .filter(cookie -> WebServerSecurityConfiguration.ACCESS_TOKEN.equals(cookie.getName()))
- .map(Cookie::getValue)
- .findFirst()
- .orElse(null);
- /* @formatter:on */
-
- if (jwt == null) {
- LOG.debug("Request is missing the 'access_token' cookie");
- /* same here */
- return MISSING_JWT_VALUE;
- }
-
- try {
- byte[] jwtBytes = DECODER.decode(jwt);
- return aes256Encryption.decrypt(jwtBytes);
- } catch (Exception e) {
- LOG.debug("Failed to decrypt JWT cookie", e);
- /* same here */
- return MISSING_JWT_VALUE;
- }
- }
-}
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/JwtResponse.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/JwtResponse.java
deleted file mode 100644
index 97f5c1e1f6..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/JwtResponse.java
+++ /dev/null
@@ -1,91 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.security;
-
-import static java.util.Objects.requireNonNull;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Represents the response containing JWT-related tokens returned by an OAuth2
- * or OpenID Connect (OIDC) authentication flow. This class encapsulates the
- * access token, token type, ID token, expiration time, and refresh token. It is
- * primarily used for handling token-based authentication in secure API
- * communication.
- *
- *
- * The {@code JwtResponse} object is constructed from JSON using Jackson,
- * mapping the expected token fields from the authentication response.
- *
- *
- *
- * Fields:
- *
- *
{@code accessToken}: The access token used to authenticate subsequent
- * requests to the API.
- *
{@code tokenType}: The type of the token (typically "Bearer").
- *
{@code idToken}: The ID token, which contains identity claims about the
- * authenticated user.
- *
{@code expiresIn}: The duration in seconds until the access token
- * expires.
- *
{@code refreshToken}: The token used to obtain a new access token without
- * re-authenticating (optional).
- *
- *
- *
- *
- * For more information on JSON Web Tokens (JWT), please refer to the
- * official JWT documentation.
- *
- *
- * @author hamidonos
- */
-class JwtResponse {
-
- private static final String JSON_PROPERTY_ACCESS_TOKEN = "access_token";
- private static final String JSON_PROPERTY_TOKEN_TYPE = "token_type";
- private static final String JSON_PROPERTY_ID_TOKEN = "id_token";
- private static final String JSON_PROPERTY_EXPIRES_IN = "expires_in";
- private static final String JSON_PROPERTY_REFRESH_TOKEN = "refresh_token";
-
- private final String accessToken;
- private final String tokenType;
- private final String idToken;
- private final Long expiresIn;
- private final String refreshToken;
-
- /* @formatter:off */
- @JsonCreator
- JwtResponse(@JsonProperty(JSON_PROPERTY_ACCESS_TOKEN) String accessToken,
- @JsonProperty(JSON_PROPERTY_TOKEN_TYPE) String tokenType,
- @JsonProperty(JSON_PROPERTY_ID_TOKEN) String idToken,
- @JsonProperty(JSON_PROPERTY_EXPIRES_IN) Long expiresIn,
- @JsonProperty(JSON_PROPERTY_REFRESH_TOKEN) String refreshToken) {
- this.accessToken = requireNonNull(accessToken, JSON_PROPERTY_ACCESS_TOKEN + " must not be null");
- this.tokenType = requireNonNull(tokenType, JSON_PROPERTY_TOKEN_TYPE + " must not be null");
- this.idToken = requireNonNull(idToken, JSON_PROPERTY_ID_TOKEN + " must not be null");
- this.expiresIn = requireNonNull(expiresIn, JSON_PROPERTY_EXPIRES_IN + " must not be null");
- this.refreshToken = refreshToken;
- }
- /* @formatter:on */
-
- String getAccessToken() {
- return accessToken;
- }
-
- String getTokenType() {
- return tokenType;
- }
-
- String getIdToken() {
- return idToken;
- }
-
- Long getExpiresIn() {
- return expiresIn;
- }
-
- String getRefreshToken() {
- return refreshToken;
- }
-}
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/MissingAuthenticationEntryPointHandler.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/MissingAuthenticationEntryPointHandler.java
deleted file mode 100644
index bccd85d875..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/MissingAuthenticationEntryPointHandler.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.security;
-
-import java.io.IOException;
-
-import org.springframework.security.core.AuthenticationException;
-import org.springframework.security.web.AuthenticationEntryPoint;
-
-import com.mercedesbenz.sechub.webserver.RequestConstants;
-
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-
-/**
- * {@code MissingAuthenticationEntryPointHandler} implements
- * {@link AuthenticationEntryPoint} to provide custom behavior upon missing or
- * invalid authentication. This class is used by Spring's
- * oauth2ResourceServer configuration to redirect the user to the login
- * page if the user is not authenticated.
- *
- * @author hamidonos
- */
-class MissingAuthenticationEntryPointHandler implements AuthenticationEntryPoint {
- @Override
- public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException {
- response.sendRedirect(RequestConstants.LOGIN);
- }
-}
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/OAuth2LoginSuccessHandler.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/OAuth2LoginSuccessHandler.java
deleted file mode 100644
index 29efdba404..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/OAuth2LoginSuccessHandler.java
+++ /dev/null
@@ -1,95 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.security;
-
-import static java.util.Objects.requireNonNull;
-import static java.util.Objects.requireNonNullElseGet;
-
-import java.io.IOException;
-import java.time.Instant;
-import java.util.Base64;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.oauth2.client.OAuth2AuthorizedClient;
-import org.springframework.security.oauth2.client.OAuth2AuthorizedClientService;
-import org.springframework.security.oauth2.core.OAuth2AccessToken;
-import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
-
-import com.mercedesbenz.sechub.webserver.RequestConstants;
-import com.mercedesbenz.sechub.webserver.encryption.AES256Encryption;
-
-import jakarta.servlet.http.Cookie;
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-
-/**
- *
- * {@code OAuth2LoginSuccessHandler} implements
- * {@link AuthenticationSuccessHandler} to provide custom behavior upon
- * successful authentication. This handler redirects the user to the /home page
- * specified in {@link RequestConstants}.
- *
- *
- *
- * This handler will also populate a secure HTTP-only cookie containing the JWT
- * token which can be used in subsequent requests to authenticate the user. Note
- * that the JWT is encrypted using {@link AES256Encryption} and encoded using
- * {@link Base64}.
- *
- *
- * @see WebServerSecurityConfiguration
- * @see RequestConstants
- * @see OAuth2Properties
- * @see OAuth2AuthorizedClientService
- *
- * @author hamidonos
- */
-class OAuth2LoginSuccessHandler implements AuthenticationSuccessHandler {
-
- private static final Logger LOG = LoggerFactory.getLogger(OAuth2LoginSuccessHandler.class);
- private static final Base64.Encoder ENCODER = Base64.getEncoder();
- private static final int DEFAULT_EXPIRY_SECONDS = 3600;
- private static final String BASE_PATH = "/";
-
- private final OAuth2Properties oAuth2Properties;
- private final OAuth2AuthorizedClientService oAuth2AuthorizedClientService;
- private final AES256Encryption aes256Encryption;
-
- public OAuth2LoginSuccessHandler(OAuth2Properties oAuth2Properties, OAuth2AuthorizedClientService oAuth2AuthorizedClientService,
- AES256Encryption aes256Encryption) {
- this.oAuth2Properties = requireNonNull(oAuth2Properties, "Property oAuthProperties must not be null");
- this.oAuth2AuthorizedClientService = requireNonNull(oAuth2AuthorizedClientService, "Property oAuth2AuthorizedClientService must not be null");
- this.aes256Encryption = requireNonNull(aes256Encryption, "Property aes256Encryption must not be null");
- }
-
- @Override
- public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException {
- OAuth2AccessToken oAuth2AccessToken = getJwtFromAuthentication(authentication);
- Instant issuedAt = requireNonNullElseGet(oAuth2AccessToken.getIssuedAt(), Instant::now);
- /* Assume a default expiry of 1 hour if the expiry time is not set */
- Instant expiresAt = requireNonNullElseGet(oAuth2AccessToken.getExpiresAt(), () -> Instant.now().plusSeconds(DEFAULT_EXPIRY_SECONDS));
- long expirySeconds = expiresAt.getEpochSecond() - issuedAt.getEpochSecond();
- String jwt = oAuth2AccessToken.getTokenValue();
- byte[] encryptedJwtBytes = aes256Encryption.encrypt(jwt);
- String encryptedJwtB64Encoded = ENCODER.encodeToString(encryptedJwtBytes);
- response.addCookie(createJwtCookie(encryptedJwtB64Encoded, expirySeconds));
- LOG.debug("Redirecting to {}", RequestConstants.HOME);
- response.sendRedirect(RequestConstants.HOME);
- }
-
- private OAuth2AccessToken getJwtFromAuthentication(Authentication authentication) {
- OAuth2AuthorizedClient oAuth2AuthorizedClient = oAuth2AuthorizedClientService.loadAuthorizedClient(oAuth2Properties.getProvider(),
- authentication.getName());
- return oAuth2AuthorizedClient.getAccessToken();
- }
-
- private Cookie createJwtCookie(String jwt, long expirySeconds) {
- Cookie cookie = new Cookie(WebServerSecurityConfiguration.ACCESS_TOKEN, jwt);
- cookie.setMaxAge((int) expirySeconds); /* Casting this should be safe in all cases */
- cookie.setHttpOnly(true); /* Prevents client-side code (JavaScript) from accessing the cookie */
- cookie.setSecure(true); /* Send the cookie only over HTTPS */
- cookie.setPath(BASE_PATH); /* Cookie is available throughout the application */
- return cookie;
- }
-}
\ No newline at end of file
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/OAuth2Properties.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/OAuth2Properties.java
deleted file mode 100644
index d6cadee9dd..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/OAuth2Properties.java
+++ /dev/null
@@ -1,83 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.security;
-
-import static java.util.Objects.requireNonNull;
-
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.context.properties.bind.ConstructorBinding;
-
-@ConfigurationProperties(prefix = OAuth2Properties.PREFIX)
-public final class OAuth2Properties {
-
- static final String PREFIX = "sechub.security.oauth2";
- private static final String ERR_MSG_FORMAT = "The property '%s.%s' must not be null";
-
- private final String clientId;
- private final String clientSecret;
- private final String provider;
- private final String redirectUri;
- private final String issuerUri;
- private final String authorizationUri;
- private final String tokenUri;
- private final String userInfoUri;
- private final String jwkSetUri;
-
- /* @formatter:off */
- @ConstructorBinding
- OAuth2Properties(String clientId,
- String clientSecret,
- String provider,
- String redirectUri,
- String issuerUri,
- String authorizationUri,
- String tokenUri,
- String userInfoUri,
- String jwkSetUri) {
- this.clientId = requireNonNull(clientId, ERR_MSG_FORMAT.formatted(PREFIX, "client-id"));
- this.clientSecret = requireNonNull(clientSecret, ERR_MSG_FORMAT.formatted(PREFIX, "client-secret"));;
- this.provider = requireNonNull(provider, ERR_MSG_FORMAT.formatted(PREFIX, "provider"));
- this.redirectUri = requireNonNull(redirectUri, ERR_MSG_FORMAT.formatted(PREFIX, "redirect-uri"));
- this.issuerUri = requireNonNull(issuerUri, ERR_MSG_FORMAT.formatted(PREFIX, "issuer-uri"));
- this.authorizationUri = requireNonNull(authorizationUri, ERR_MSG_FORMAT.formatted(PREFIX, "authorization-uri"));
- this.tokenUri = requireNonNull(tokenUri, ERR_MSG_FORMAT.formatted(PREFIX, "token-uri"));
- this.userInfoUri = requireNonNull(userInfoUri, ERR_MSG_FORMAT.formatted(PREFIX, "user-info-uri"));
- this.jwkSetUri = requireNonNull(jwkSetUri, ERR_MSG_FORMAT.formatted(PREFIX, "jwk-set-uri"));
- }
- /* @formatter:on */
-
- public String getClientId() {
- return clientId;
- }
-
- public String getClientSecret() {
- return clientSecret;
- }
-
- public String getProvider() {
- return provider;
- }
-
- public String getRedirectUri() {
- return redirectUri;
- }
-
- public String getIssuerUri() {
- return issuerUri;
- }
-
- public String getAuthorizationUri() {
- return authorizationUri;
- }
-
- public String getTokenUri() {
- return tokenUri;
- }
-
- public String getUserInfoUri() {
- return userInfoUri;
- }
-
- public String getJwkSetUri() {
- return jwkSetUri;
- }
-}
\ No newline at end of file
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/OAuth2PropertiesConfig.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/OAuth2PropertiesConfig.java
deleted file mode 100644
index 10c966f282..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/OAuth2PropertiesConfig.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.security;
-
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Profile;
-
-import com.mercedesbenz.sechub.webserver.ApplicationProfiles;
-
-/**
- * The
- * {@link org.springframework.boot.context.properties.ConfigurationProperties}
- * annotation does not support the {@link Profile} annotation. To ensure that
- * the properties are only loaded when the
- * {@link ApplicationProfiles#OAUTH2_ENABLED} profile is active, this separate
- * configuration class is created with the {@link Profile} annotation.
- *
- * @author hamidonos
- */
-@Configuration
-@Profile(ApplicationProfiles.OAUTH2_ENABLED)
-@EnableConfigurationProperties(OAuth2Properties.class)
-class OAuth2PropertiesConfig {
-}
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/PortAccessGuard.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/PortAccessGuard.java
deleted file mode 100644
index d01591513f..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/PortAccessGuard.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.security;
-
-import java.io.IOException;
-
-import org.springframework.web.filter.OncePerRequestFilter;
-
-import jakarta.servlet.FilterChain;
-import jakarta.servlet.ServletException;
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-
-/**
- * Filter which checks if the request is targeting the allowed port. If not, it
- * will return a 403 Forbidden response.
- *
- * @author hamidonos
- */
-class PortAccessGuard extends OncePerRequestFilter {
-
- private final int allowedPort;
-
- public PortAccessGuard(int allowedPort) {
- this.allowedPort = allowedPort;
- }
-
- @Override
- /* @formatter:off */
- protected void doFilterInternal(HttpServletRequest request,
- @SuppressWarnings("NullableProblems") HttpServletResponse response,
- @SuppressWarnings("NullableProblems") FilterChain filterChain) throws ServletException, IOException {
- /* @formatter:on */
- int requestPort = request.getServerPort();
- if (allowedPort != requestPort) {
- response.sendError(HttpServletResponse.SC_FORBIDDEN);
- return;
- }
- filterChain.doFilter(request, response);
- }
-}
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/UserInputSanitizer.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/UserInputSanitizer.java
deleted file mode 100644
index 9b1ae63732..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/UserInputSanitizer.java
+++ /dev/null
@@ -1,13 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.security;
-
-import org.springframework.stereotype.Component;
-
-@Component
-public class UserInputSanitizer {
-
- public String sanitizeProjectId(String projectId) {
- /* TODO Albert Tregnaghi, 2024-02-28:implement */
- return projectId;
- }
-}
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/WebServerSecurityConfiguration.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/WebServerSecurityConfiguration.java
deleted file mode 100644
index deb12e3a23..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/security/WebServerSecurityConfiguration.java
+++ /dev/null
@@ -1,216 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.security;
-
-import java.util.Arrays;
-
-import org.springframework.beans.factory.NoSuchBeanDefinitionException;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Profile;
-import org.springframework.core.annotation.Order;
-import org.springframework.core.env.Environment;
-import org.springframework.security.authentication.AuthenticationManager;
-import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
-import org.springframework.security.config.http.SessionCreationPolicy;
-import org.springframework.security.oauth2.client.OAuth2AuthorizedClientService;
-import org.springframework.security.oauth2.client.registration.ClientRegistration;
-import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository;
-import org.springframework.security.oauth2.client.registration.InMemoryClientRegistrationRepository;
-import org.springframework.security.oauth2.core.AuthorizationGrantType;
-import org.springframework.security.oauth2.server.resource.web.BearerTokenResolver;
-import org.springframework.security.web.AuthenticationEntryPoint;
-import org.springframework.security.web.SecurityFilterChain;
-import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
-import org.springframework.security.web.context.SecurityContextHolderFilter;
-import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
-import org.springframework.security.web.util.matcher.NegatedRequestMatcher;
-import org.springframework.security.web.util.matcher.OrRequestMatcher;
-import org.springframework.security.web.util.matcher.RequestMatcher;
-import org.springframework.web.client.RestTemplate;
-
-import com.mercedesbenz.sechub.webserver.ApplicationProfiles;
-import com.mercedesbenz.sechub.webserver.RequestConstants;
-import com.mercedesbenz.sechub.webserver.encryption.AES256Encryption;
-import com.mercedesbenz.sechub.webserver.server.ManagementServerProperties;
-import com.mercedesbenz.sechub.webserver.server.ServerProperties;
-
-@Configuration
-@EnableWebSecurity
-@EnableMethodSecurity
-class WebServerSecurityConfiguration {
- static final String ACCESS_TOKEN = "access_token";
-
- private static final String ACTUATOR_PATH = "/actuator/**";
- /* @formatter:off */
- private static final String[] PUBLIC_PATHS = {
- RequestConstants.LOGIN,
- "/login/**",
- "/css/**",
- "/js/**",
- "/images/**",
- "/oauth2/**",
- "/sechub-logo.svg"
- };
- /* @formatter:on */
- private static final String SCOPE = "openid";
- private static final String USER_NAME_ATTRIBUTE_NAME = "sub";
-
- private final Environment environment;
- private final OAuth2Properties oAuth2Properties;
- private final AES256Encryption aes256Encryption;
-
- /* @formatter:off */
- WebServerSecurityConfiguration(@Autowired Environment environment,
- @Autowired(required = false) OAuth2Properties oAuth2Properties,
- @Autowired AES256Encryption aes256Encryption) {
- /* @formatter:on */
- this.environment = environment;
- if (isOAuth2Enabled() && oAuth2Properties == null) {
- throw new NoSuchBeanDefinitionException(OAuth2Properties.class);
- }
- if (!isOAuth2Enabled() && !isClassicAuthEnabled()) {
- throw new IllegalStateException("At least one authentication method must be enabled");
- }
- this.oAuth2Properties = oAuth2Properties;
- this.aes256Encryption = aes256Encryption;
- }
-
- @Bean
- @Profile(ApplicationProfiles.OAUTH2_ENABLED)
- ClientRegistrationRepository clientRegistrationRepository() {
- /* @formatter:off */
- ClientRegistration clientRegistration = ClientRegistration
- .withRegistrationId(oAuth2Properties.getProvider())
- .clientId(oAuth2Properties.getClientId())
- .clientSecret(oAuth2Properties.getClientSecret())
- .authorizationGrantType(AuthorizationGrantType.AUTHORIZATION_CODE)
- .redirectUri(oAuth2Properties.getRedirectUri())
- .issuerUri(oAuth2Properties.getIssuerUri()).scope(SCOPE)
- .authorizationUri(oAuth2Properties.getAuthorizationUri())
- .tokenUri(oAuth2Properties.getTokenUri())
- .userInfoUri(oAuth2Properties.getUserInfoUri())
- .jwkSetUri(oAuth2Properties.getJwkSetUri())
- .userNameAttributeName(USER_NAME_ATTRIBUTE_NAME)
- .build();
- /* @formatter:on */
-
- return new InMemoryClientRegistrationRepository(clientRegistration);
- }
-
- @Bean
- @Order(1)
- /* @formatter:off */
- SecurityFilterChain securityFilterChainActuator(HttpSecurity httpSecurity,
- ManagementServerProperties managementServerProperties) throws Exception {
- PortAccessGuard portAccessGuard = new PortAccessGuard(managementServerProperties.getPort());
-
- httpSecurity
- .securityMatcher(ACTUATOR_PATH)
- .authorizeHttpRequests(authorizeRequests -> authorizeRequests
- .requestMatchers(ACTUATOR_PATH)
- .permitAll())
- .addFilterBefore(portAccessGuard, SecurityContextHolderFilter.class);
- /* @formatter:on */
- return httpSecurity.build();
- }
-
- @Bean
- @Profile(ApplicationProfiles.OAUTH2_ENABLED)
- @Order(2)
- /* @formatter:off */
- SecurityFilterChain securityFilterChainProtectedPaths(HttpSecurity httpSecurity,
- @Autowired(required = false) AuthenticationManager authenticationManager,
- ServerProperties serverProperties) throws Exception {
- AuthenticationEntryPoint authenticationEntryPoint = new MissingAuthenticationEntryPointHandler();
- BearerTokenResolver bearerTokenResolver = new JwtCookieResolver(aes256Encryption);
- RequestMatcher publicPathsMatcher = new OrRequestMatcher(
- Arrays.stream(PUBLIC_PATHS)
- .map(AntPathRequestMatcher::new)
- .toArray(AntPathRequestMatcher[]::new)
- );
- RequestMatcher protectedPathsMatcher = new NegatedRequestMatcher(publicPathsMatcher);
- PortAccessGuard portAccessGuard = new PortAccessGuard(serverProperties.getPort());
-
- httpSecurity
- .securityMatcher(protectedPathsMatcher)
- .oauth2ResourceServer(oauth2ResourceServer -> oauth2ResourceServer
- .authenticationEntryPoint(authenticationEntryPoint)
- .bearerTokenResolver(bearerTokenResolver)
- .jwt(jwt -> jwt.jwkSetUri(oAuth2Properties.getJwkSetUri()))
- );
- /* @formatter:on */
-
- if (authenticationManager != null) {
- /*
- * This is useful to mock authentication when no real authentication manager can
- * be constructed (e.g. in tests)
- */
- httpSecurity.authenticationManager(authenticationManager);
- }
-
- httpSecurity.addFilterBefore(portAccessGuard, SecurityContextHolderFilter.class);
-
- return httpSecurity.build();
- }
-
- @Bean
- @Order(3)
- /* @formatter:on */
- SecurityFilterChain securityFilterChainPublicPaths(HttpSecurity httpSecurity,
- @Autowired(required = false) OAuth2AuthorizedClientService oAuth2AuthorizedClientService, ServerProperties serverProperties) throws Exception {
-
- PortAccessGuard portAccessGuard = new PortAccessGuard(serverProperties.getPort());
-
- httpSecurity.securityMatcher(PUBLIC_PATHS)
- /* Disable CSRF */
- .csrf(AbstractHttpConfigurer::disable)
- /* Make the application stateless */
- .sessionManagement(httpSecuritySessionManagementConfigurer -> httpSecuritySessionManagementConfigurer
- .sessionCreationPolicy(SessionCreationPolicy.STATELESS));
-
- if (isOAuth2Enabled()) {
- RestTemplate restTemplate = new RestTemplate();
- Base64EncodedClientIdAndSecretOAuth2AccessTokenClient base64EncodedClientIdAndSecretOAuth2AccessTokenClient = new Base64EncodedClientIdAndSecretOAuth2AccessTokenClient(
- restTemplate);
- if (oAuth2AuthorizedClientService == null) {
- throw new NoSuchBeanDefinitionException(
- "No qualifying bean of type 'OAuth2AuthorizedClientService' available: expected at least 1 bean which qualifies as autowire candidate.");
- }
- AuthenticationSuccessHandler authenticationSuccessHandler = new OAuth2LoginSuccessHandler(oAuth2Properties, oAuth2AuthorizedClientService,
- aes256Encryption);
- /* Enable OAuth2 */
- httpSecurity.oauth2Login(oauth2 -> oauth2.loginPage(RequestConstants.LOGIN)
- .tokenEndpoint(token -> token.accessTokenResponseClient(base64EncodedClientIdAndSecretOAuth2AccessTokenClient))
- .successHandler(authenticationSuccessHandler));
- }
-
- if (isClassicAuthEnabled()) {
- /*
- * Enable Classic Authentication Note: This must be the last configuration in
- * order to set the default 'loginPage' to oAuth2 because spring uses the
- * 'loginPage' from the first authentication method configured
- */
- AuthenticationSuccessHandler authenticationSuccessHandler = new ClassicLoginSuccessHandler();
- httpSecurity.formLogin(form -> form.loginPage(RequestConstants.LOGIN).successHandler(authenticationSuccessHandler));
- }
-
- /* @formatter:on */
-
- httpSecurity.addFilterBefore(portAccessGuard, SecurityContextHolderFilter.class);
-
- return httpSecurity.build();
- }
-
- private boolean isOAuth2Enabled() {
- return environment.matchesProfiles(ApplicationProfiles.OAUTH2_ENABLED);
- }
-
- private boolean isClassicAuthEnabled() {
- return environment.matchesProfiles(ApplicationProfiles.CLASSIC_AUTH_ENABLED);
- }
-
-}
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/server/ManagementServerProperties.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/server/ManagementServerProperties.java
deleted file mode 100644
index fe83077882..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/server/ManagementServerProperties.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.server;
-
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.context.properties.bind.ConstructorBinding;
-
-@ConfigurationProperties(prefix = ManagementServerProperties.PREFIX)
-public final class ManagementServerProperties {
-
- static final String PREFIX = "management.server";
-
- private final int port;
-
- @ConstructorBinding
- ManagementServerProperties(int port) {
- this.port = port;
- }
-
- public int getPort() {
- return port;
- }
-}
\ No newline at end of file
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/server/ServerProperties.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/server/ServerProperties.java
deleted file mode 100644
index 6e6a6e892f..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/server/ServerProperties.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.server;
-
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.context.properties.bind.ConstructorBinding;
-
-@ConfigurationProperties(prefix = ServerProperties.PREFIX)
-public final class ServerProperties {
-
- static final String PREFIX = "server";
-
- private final int port;
-
- @ConstructorBinding
- ServerProperties(int port) {
- this.port = port;
- }
-
- public int getPort() {
- return port;
- }
-}
\ No newline at end of file
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/server/ServerPropertiesConfiguration.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/server/ServerPropertiesConfiguration.java
deleted file mode 100644
index d283e7bd91..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/server/ServerPropertiesConfiguration.java
+++ /dev/null
@@ -1,11 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.server;
-
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-@EnableConfigurationProperties({ ServerProperties.class, ManagementServerProperties.class })
-public class ServerPropertiesConfiguration {
-
-}
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/user/UserDetailInformationService.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/user/UserDetailInformationService.java
deleted file mode 100644
index bbfe5b294f..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/user/UserDetailInformationService.java
+++ /dev/null
@@ -1,17 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.user;
-
-import org.springframework.security.core.userdetails.User;
-import org.springframework.security.core.userdetails.UserDetails;
-import org.springframework.security.crypto.factory.PasswordEncoderFactories;
-import org.springframework.security.crypto.password.PasswordEncoder;
-import org.springframework.stereotype.Service;
-
-@Service
-public class UserDetailInformationService {
- public UserDetails getUser() {
- /* FIXME Albert Tregnaghi, 2024-02-28:implement real user management */
- PasswordEncoder encoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
- return User.builder().passwordEncoder(encoder::encode).username("user").password("password").roles("USER").build();
- }
-}
\ No newline at end of file
diff --git a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/user/UserInfoService.java b/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/user/UserInfoService.java
deleted file mode 100644
index 2eee4f48e6..0000000000
--- a/sechub-web-server/src/main/java/com/mercedesbenz/sechub/webserver/user/UserInfoService.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// SPDX-License-Identifier: MIT
-package com.mercedesbenz.sechub.webserver.user;
-
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContext;
-import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.stereotype.Service;
-
-@Service
-public class UserInfoService {
-
- public String getUserId() {
- Authentication authentication = getAuthentication();
- if (authentication == null) {
- return null;
- }
- return authentication.getName();
- }
-
- public String getEmailAddress() {
- /* FIXME Albert Tregnaghi, 2024-02-28:implement */
- return getUserId() + "_calculated@example.org";
- }
-
- private Authentication getAuthentication() {
- SecurityContext context = getContext();
- if (context == null) {
- return null;
- }
- return getContext().getAuthentication();
- }
-
- private SecurityContext getContext() {
- return SecurityContextHolder.getContext();
- }
-}
diff --git a/sechub-web-server/src/main/resources/application-classic-auth-enabled.yml b/sechub-web-server/src/main/resources/application-classic-auth-enabled.yml
deleted file mode 100644
index bb475be945..0000000000
--- a/sechub-web-server/src/main/resources/application-classic-auth-enabled.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-# SPDX-License-Identifier: MIT
-web-server:
- client:
- mocked: true
- sechub:
- ## Mocked sechub user (necessary for credentialinjection, we have no defaults...)
- userid: "mocked-user"
- apitoken: "mocked-apitoken"
-
-spring:
- security:
- user:
- name: mock-user
- password: mock-password
\ No newline at end of file
diff --git a/sechub-web-server/src/main/resources/application-integrationtest-data.yml b/sechub-web-server/src/main/resources/application-integrationtest-data.yml
deleted file mode 100644
index 6d3e83fa71..0000000000
--- a/sechub-web-server/src/main/resources/application-integrationtest-data.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-# SPDX-License-Identifier: MIT
-web-server:
- sechub:
- ## Setup integration test sechub user (currently admin, later other role)
- userid: int-test_superadmin
- apitoken: int-test_superadmin-pwd
\ No newline at end of file
diff --git a/sechub-web-server/src/main/resources/application-local.yml b/sechub-web-server/src/main/resources/application-local.yml
deleted file mode 100644
index 1c01922465..0000000000
--- a/sechub-web-server/src/main/resources/application-local.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-# SPDX-License-Identifier: MIT
-# Utility file to load user specific configuration for local development
-# Define a profile for your local system user by creating a file named application-local.${USER}.yml (if needed)
-# ${USER} is the value of your system username (e.g. application-local.JOHNDOE.yml)
-# Note that all application-local.${USER}.yml files are ignored by git
-
-spring:
- config:
- import:
- - optional:classpath:application-local.${USER}.yml
\ No newline at end of file
diff --git a/sechub-web-server/src/main/resources/application-ssl-cert-provided.yml b/sechub-web-server/src/main/resources/application-ssl-cert-provided.yml
deleted file mode 100644
index 45a7810b64..0000000000
--- a/sechub-web-server/src/main/resources/application-ssl-cert-provided.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-# SPDX-License-Identifier: MIT
-# This configuration is used for development and local testing. It uses a self-signed certificate provided by the build.
-
-server:
- ssl:
- key-store-type: 'PKCS12'
- # we use a keystore location which is never tracked by git.
- # see dev-create_localhost_certificate.sh and dev-ensure_localhost_certificate.sh
- key-store: 'classpath:certificates-untracked/generated-dev-localhost-keystore.p12'
- key-store-password: '123456'
- key-alias: 'tomcat'
-
-web-server:
- sechub:
- server-url: "https://localhost:8443"
- trust-all-certificates: true
diff --git a/sechub-web-server/src/main/resources/application-ssl-cert-required.yml b/sechub-web-server/src/main/resources/application-ssl-cert-required.yml
deleted file mode 100644
index f9c736423f..0000000000
--- a/sechub-web-server/src/main/resources/application-ssl-cert-required.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-# SPDX-License-Identifier: MIT
-# This configuration is used for prod and int. It requires a valid certificate to be provided through the environment variables.
-
-server:
- ssl:
- keyStoreType:
- ${SECHUB_WEB_SERVER_SSL_KEYSTORE_TYPE}
- key-store:
- ${SECHUB_WEB_SERVER_SSL_KEYSTORE_LOCATION}
- key-store-password:
- ${SECHUB_WEB_SERVER_SSL_KEYSTORE_PASSWORD}
- key-alias:
- ${SECHUB_WEB_SERVER_SSL_KEYSTORE_ALIAS}
diff --git a/sechub-web-server/src/main/resources/application.yml b/sechub-web-server/src/main/resources/application.yml
deleted file mode 100644
index 87ab18e370..0000000000
--- a/sechub-web-server/src/main/resources/application.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-# SPDX-License-Identifier: MIT
-
-# Main settings
-server:
- port:
- 4443
- ssl:
- enabled: true # always enabled
- protocol: TLS
- enabled-protocols: TLSv1.2,TLSv1.3
-
-spring:
- messages:
- basename: "i18n/messages"
- profiles:
- group:
- web-server_prod: "ssl-cert-required,oauth2-enabled"
- web-server_int: "ssl-cert-required,oauth2-enabled,classic-auth-enabled"
- web-server_dev: "ssl-cert-provided,classic-auth-enabled"
- web-server_local: "ssl-cert-provided,classic-auth-enabled,local"
- web-server_test: "test"
- web-server_integrationtest: "ssl-cert-provided,integrationtest-data"
- web:
- resources:
- static-locations: classpath:/static
-
-# Spring Boot Actuators and Metrics
-management:
- server:
- port:
- 10250
- ssl:
- enabled: false
- endpoints:
- web:
- exposure:
- include: "prometheus,health"
- endpoint:
- metrics:
- enabled: true
- prometheus:
- enabled: true
- prometheus:
- metrics:
- export:
- enabled: true
\ No newline at end of file
diff --git a/sechub-web-server/src/main/resources/banner.txt b/sechub-web-server/src/main/resources/banner.txt
deleted file mode 100644
index c071cd43f1..0000000000
--- a/sechub-web-server/src/main/resources/banner.txt
+++ /dev/null
@@ -1,8 +0,0 @@
- ____ _ _ _ __ __ _ ____
- / ___| ___ ___| | | |_ _| |__ \ \ / /__| |__/ ___| ___ _ ____ _____ _ __
- \___ \ / _ \/ __| |_| | | | | '_ \ \ \ /\ / / _ \ '_ \___ \ / _ \ '__\ \ / / _ \ '__|
- ___) | __/ (__| _ | |_| | |_) | \ V V / __/ |_) |__) | __/ | \ V / __/ |
- |____/ \___|\___|_| |_|\__,_|_.__/ \_/\_/ \___|_.__/____/ \___|_| \_/ \___|_|
-
-:: SecHub Web Server :: ${application.formatted-version}
-:: Spring Boot :: ${spring-boot.formatted-version}
\ No newline at end of file
diff --git a/sechub-web-server/src/main/resources/certificates-untracked/.gitignore b/sechub-web-server/src/main/resources/certificates-untracked/.gitignore
deleted file mode 100644
index a8df1b6f0c..0000000000
--- a/sechub-web-server/src/main/resources/certificates-untracked/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-# accept nothing
-*
-# except the readme.md
-!README.md
-!.gitignore
diff --git a/sechub-web-server/src/main/resources/certificates-untracked/README.md b/sechub-web-server/src/main/resources/certificates-untracked/README.md
deleted file mode 100644
index 3172a4735d..0000000000
--- a/sechub-web-server/src/main/resources/certificates-untracked/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-# About p12 folder
-
-Here your p12 certificates have to be stored
-- local development
-- prod
-- ..
-
-Inside this folder GIT does ignore anything except this `README.md`.
\ No newline at end of file
diff --git a/sechub-web-server/src/main/resources/i18n/messages.properties b/sechub-web-server/src/main/resources/i18n/messages.properties
deleted file mode 100644
index 8a9f3d6b8d..0000000000
--- a/sechub-web-server/src/main/resources/i18n/messages.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-# SPDX-License-Identifier: MIT
-common.projects=Projects
-common.status=Status
-common.loggout=Logout
-
-lang.switch-de=German
-lang.switch-en=English
-
-newapitoken.request-new=Request new API Token
-
-scans.project-headline-prefix=Scanned
\ No newline at end of file
diff --git a/sechub-web-server/src/main/resources/i18n/messages_de.properties b/sechub-web-server/src/main/resources/i18n/messages_de.properties
deleted file mode 100644
index e91330ba21..0000000000
--- a/sechub-web-server/src/main/resources/i18n/messages_de.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-# SPDX-License-Identifier: MIT
-common.projects=Projekte
-common.status=Status
-common.loggout=Ausloggen
-
-lang.switch-de=Deutsch
-lang.switch-en=Englisch
-
-newapitoken.request-new=Neues API Token anfordern
-
-scans.project-headline-prefix=Scans für
\ No newline at end of file
diff --git a/sechub-web-server/src/main/resources/logback-spring.xml b/sechub-web-server/src/main/resources/logback-spring.xml
deleted file mode 100644
index 763b30380f..0000000000
--- a/sechub-web-server/src/main/resources/logback-spring.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/sechub-web-server/src/main/resources/static/css/main.css b/sechub-web-server/src/main/resources/static/css/main.css
deleted file mode 100644
index 9810deffeb..0000000000
--- a/sechub-web-server/src/main/resources/static/css/main.css
+++ /dev/null
@@ -1,166 +0,0 @@
-* {
- margin: 0;
- padding: 0;
-}
-
-:root {
- --color-dark: #100c08;
- --color-light: #FDFDFD;
- --color-grey: #696969;
-}
-
-body {
- font-family: sans-serif;
- min-height: 100vh
-}
-
-.placeholder {
- color: var(--color-grey);
-}
-
-.border-thin {
- border-width: 0.2rem;
- border-style: solid;
-}
-
-.warning-border-dark-bg {
- border-color: goldenrod;
-}
-
-.warning-light-bg {
- color: darkgoldenrod;
-}
-
-.warning-dark-bg {
- color: goldenrod;
-}
-
-.container-flex {
- display: flex;
-}
-
-.flex-column {
- flex-direction: column;
-}
-
-.flex-row {
- flex-direction: row;
-}
-
-.flex-grow {
- flex-grow: 1;
-}
-
-.flex-shrink {
- flex-shrink: 1;
-}
-
-.text-align-center {
- text-align: center;
-}
-
-.padding-thin-all {
- padding: 1em;
-}
-
-.menu {
- list-style: none;
-}
-
-.menu > li {
- display: inline;
-}
-
-.item > a {
- color: white;
-}
-
-.item > a:hover {
- color: gold;
-}
-
-.item > a:visited {
- color: white;
-}
-
-.text-color-dark {
- color: var(--color-dark);
-}
-
-.text-color-light {
- color: var(--color-light);
-}
-
-.background-dark {
- background: var(--color-dark);
-}
-
-.background-light {
- background: var(--color-light);
-}
-
-.text-color-white {
- color: white;
-}
-
-.error {
- color: darkred;
-}
-
-/* -----------------
- * Info table
- * -----------------
- */
-
-.infoTable {
- padding-bottom: 16px;
- padding-top: 10px;
- border-collapse: separate;
- border: solid #cccccc 1px;
- border-radius: 16px;
- border-spacing: 0px;
-}
-
-.infoTable th {
- padding: 8px;
- vertical-align: top;
- text-align: left;
-}
-
-.infoTable tr:nth-child(even) {
- background: #f0f0f0;
-}
-
-.infoTable tr:nth-child(odd) {
- background: #fefefe;
-}
-
-.infoTable td {
- padding:8px;
-
- font-family: monospace;
- vertical-align: top;
- text-align: left;
-}
-
-.infoTable td:nth-child(1) {
- width: 150px;
- padding-left: 10px;
-}
-
-.infoTable td:nth-child(2) {
- width: 300px;
- padding-left: 10px;
- border-left: 1px solid #cccccc;
-}
-
-/*
- * Logo
- */
-.logo {
- width: 80px;
- height: 80px;
-}
-
-
-
\ No newline at end of file
diff --git a/sechub-web-server/src/main/resources/static/sechub-logo.svg b/sechub-web-server/src/main/resources/static/sechub-logo.svg
deleted file mode 100644
index 39495203c3..0000000000
--- a/sechub-web-server/src/main/resources/static/sechub-logo.svg
+++ /dev/null
@@ -1,494 +0,0 @@
-
-
-
-
diff --git a/sechub-web-server/src/main/resources/templates/fragments/banner.html b/sechub-web-server/src/main/resources/templates/fragments/banner.html
deleted file mode 100644
index 4e813969b2..0000000000
--- a/sechub-web-server/src/main/resources/templates/fragments/banner.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-Banner
-
-
-
-
-
Early WebUI draft - do not use this in production!