Skip to content

Commit

Permalink
Merge pull request #140 from xdev-software/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
AB-xdev authored Dec 17, 2024
2 parents 631e83a + 7980ad2 commit 5b56a29
Show file tree
Hide file tree
Showing 14 changed files with 122 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .idea/checkstyle-idea.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/saveactions_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 1.0.4
* Updated dependencies

# 1.0.3
* Fix ``ConcurrentModificationException`` due to missing synchronized blocks
* Don't warmUp already warmed up factories again on coordinator level
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.19.0</version>
<version>10.21.0</version>
</dependency>
</dependencies>
<configuration>
Expand Down Expand Up @@ -83,12 +83,12 @@
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>7.7.0</version>
<version>7.8.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>7.7.0</version>
<version>7.8.0</version>
</dependency>
</dependencies>
</plugin>
Expand Down
11 changes: 11 additions & 0 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@
"maven"
],
"groupName": "org.testcontainers"
},
{
"description": "Group org.junit",
"matchPackagePatterns": [
"^org.junit:junit-bom",
"^org.junit.jupiter"
],
"datasources": [
"maven"
],
"groupName": "org.junit"
}
]
}
26 changes: 25 additions & 1 deletion tci-advanced-demo/entities-metamodel/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<!-- https://hibernate.atlassian.net/browse/HHH-15877 -->
<!-- @formatter:off DO NOT INTRODUCE LINE BREAK -->
<compilerArguments>
-implicit:class -AfullyAnnotationConfigured=true -AaddGeneratedAnnotation=false
-implicit:class -AfullyAnnotationConfigured=true -AaddGeneratedAnnotation=false -Aindex=false
</compilerArguments>
<!-- @formatter:on -->
<processors>
Expand All @@ -83,6 +83,30 @@
</execution>
</executions>
</plugin>

<!-- Can be removed once fix for https://hibernate.atlassian.net/browse/HHH-18863 is released -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<!-- Workaround for https://hibernate.atlassian.net/browse/HHH-18873 -->
<execution>
<id>wipe-hibernate-entity-index</id>
<phase>generate-sources</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<excludeDefaultDirectories>true</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>${project.generated.sources}/entity</directory>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
4 changes: 2 additions & 2 deletions tci-advanced-demo/persistence/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@

<!-- Database Migration -->
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<groupId>software.xdev</groupId>
<artifactId>flyway-core-slim</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package org.flywaydb.database.mysql.mariadb;

import org.flywaydb.core.api.configuration.Configuration;
import org.flywaydb.core.internal.jdbc.JdbcConnectionFactory;
import org.flywaydb.core.internal.jdbc.StatementInterceptor;
import org.flywaydb.database.mysql.MySQLDatabase;


/**
* Fork of default MariaDBDatabase
*/
public class MariaDBDatabase extends MySQLDatabase
{
public MariaDBDatabase(
final Configuration configuration,
final JdbcConnectionFactory jdbcConnectionFactory,
final StatementInterceptor statementInterceptor)
{
super(configuration, jdbcConnectionFactory, statementInterceptor);
}

@Override
protected String getConstraintName(final String tableName)
{
return "";
}

@Override
public void ensureSupported(final Configuration configuration)
{
// YES it is supported for what we do - stop spamming the log
}
}
25 changes: 15 additions & 10 deletions tci-advanced-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<org.springframework.boot.version>3.3.5</org.springframework.boot.version>
<org.springframework.boot.version>3.4.0</org.springframework.boot.version>
</properties>

<modules>
Expand Down Expand Up @@ -99,7 +99,7 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-dependencies-bom</artifactId>
<version>4.25.0</version>
<version>4.27.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -113,15 +113,15 @@
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.6.0</version>
<version>2.7.0</version>
</dependency>

<!-- Tests -->
<!-- Unit-Tests -->
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.11.3</version>
<version>5.11.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -145,7 +145,7 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>1.20.3</version>
<version>1.20.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -154,7 +154,7 @@
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>3.5.0</version>
<version>3.5.1</version>
<!-- https://mariadb.com/kb/en/about-mariadb-connector-j/#size-consideration -->
<exclusions>
<exclusion>
Expand All @@ -163,6 +163,11 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>software.xdev</groupId>
<artifactId>flyway-core-slim</artifactId>
<version>1.0.0</version>
</dependency>

<!-- Utility for proxies in tests -->
<dependency>
Expand Down Expand Up @@ -205,7 +210,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.1</version>
<version>3.5.2</version>
</plugin>

<plugin>
Expand Down Expand Up @@ -264,7 +269,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.19.0</version>
<version>10.21.0</version>
</dependency>
</dependencies>
<configuration>
Expand Down Expand Up @@ -304,12 +309,12 @@
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>7.7.0</version>
<version>7.8.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>7.7.0</version>
<version>7.8.0</version>
</dependency>
</dependencies>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package software.xdev.tci.demo;

import java.util.Optional;
import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
Expand All @@ -14,12 +16,15 @@ public static void main(final String[] args)
{
System.setProperty(
"spring.config.additional-location",
"optional:"
+ "classpath:/application-add.yml,"
+ "classpath:/application-add-log.yml"
+ Optional.ofNullable(System.getProperty("spring.config.additional-location"))
.map(s -> "," + s)
.orElse(""));
Stream.of(
"optional:classpath:/application-add.yml",
"classpath:/application-add-log.yml",
System.getProperty("spring.config.additional-location"),
// [Deployment] Also consider ENV variable since it has a lower priority and is otherwise ignored
// See https://docs.spring.io/spring-boot/reference/features/external-config.html
System.getenv("SPRING_CONFIG_ADDITIONAL-LOCATION"))
.filter(Objects::nonNull)
.collect(Collectors.joining(",")));
SpringApplication.run(Application.class, args);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ private AuthenticationProvider getActuatorAuthProvider()
@Override
public boolean matches(final CharSequence rawPassword, final String encodedPassword)
{
if(rawPassword == null || rawPassword.isEmpty() || !pwHash.equals(encodedPassword))
if(rawPassword == null || rawPassword.isEmpty() || rawPassword.length() > 1000)
{
OtherWebSecurity.this.actuatorLoginFailed.increment();
return false;
}

final boolean success = SHA256Hashing.hash(rawPassword.toString()).equals(encodedPassword);
final boolean success = SHA256Hashing.hash(rawPassword.toString()).equals(pwHash);
if(success)
{
OtherWebSecurity.this.actuatorLoginSuccess.increment();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

public final class SHA256Hashing
{

private static final String SHA_256 = "SHA-256";

private static final char[] HEX_DIGITS = "0123456789abcdef".toCharArray();
Expand All @@ -16,6 +15,9 @@ private SHA256Hashing()
{
}

/**
* @apiNote Note that SHA256 gets slower the longer the input is. Ensure that the input length is limited.
*/
@SuppressWarnings("checkstyle:MagicNumber")
public static String hash(final String input)
{
Expand Down
4 changes: 2 additions & 2 deletions tci-base-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.11.3</version>
<version>5.11.4</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -69,7 +69,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.1</version>
<version>3.5.2</version>
<configuration>
<!-- Test need to be executed individually -->
<skipTests>true</skipTests>
Expand Down
Loading

0 comments on commit 5b56a29

Please sign in to comment.