Skip to content

Conversation

@crazyrokr
Copy link
Collaborator

@crazyrokr crazyrokr commented Dec 20, 2025

#67

The main goal of the PR is to prepare a module and class structures covering the most common authentication mechanisms, so it introduces the following entities:

  1. AuthRequest is a DTO containing all necessary authentication data
  2. AuthenticationService allows to authenticate incoming AuthRequest
  3. AuthenticationProvider provides an authentication mechanism (Basic, X509, JWT, etc.)
  4. CredentialsSource provides access to different authentication data storages (file, database, network, etc.)

crazyrokr and others added 29 commits December 5, 2025 00:01
# Conflicts:
#	acl-groovy-dsl/src/main/groovy/javasabr/mqtt/service/acl/AclRulesLoader.groovy
#	application/src/main/java/javasabr/mqtt/broker/application/config/MqttBrokerSpringConfig.java
…nto feature/142-integrate-acl-groovy-based-engine-part-2
# Conflicts:
#	acl-groovy-dsl/src/main/groovy/javasabr/mqtt/acl/groovy/dsl/loader/AclRulesLoader.groovy
…ing-with-flyway

# Conflicts:
#	application/build.gradle
#	application/src/main/java/javasabr/mqtt/broker/application/config/MqttBrokerSpringConfig.java
#	settings.gradle
# Conflicts:
#	application/build.gradle
#	application/src/main/java/javasabr/mqtt/broker/application/config/MqttBrokerSpringConfig.java
#	settings.gradle
…lyway

# Conflicts:
#	application/build.gradle
#	application/src/main/java/javasabr/mqtt/broker/application/config/MqttBrokerSpringConfig.java
#	settings.gradle
…ing-with-flyway

# Conflicts:
#	application/build.gradle
#	application/src/main/java/javasabr/mqtt/broker/application/config/MqttBrokerSpringConfig.java
#	settings.gradle
@crazyrokr crazyrokr linked an issue Dec 20, 2025 that may be closed by this pull request
@crazyrokr crazyrokr added the core label Dec 20, 2025
@crazyrokr crazyrokr changed the base branch from feature-broker-67 to develop December 20, 2025 15:00
@crazyrokr crazyrokr marked this pull request as draft December 20, 2025 15:01
@crazyrokr crazyrokr marked this pull request as ready for review December 20, 2025 15:02
@crazyrokr crazyrokr marked this pull request as draft December 20, 2025 15:02
@crazyrokr crazyrokr changed the base branch from develop to feature-broker-67 December 20, 2025 15:02
@crazyrokr crazyrokr changed the base branch from feature-broker-67 to develop December 20, 2025 18:45
@github-actions
Copy link

github-actions bot commented Dec 20, 2025

Test Coverage Report

Overall Project 86.09% -0.64% 🍏
Files changed 77.42% 🍏

File Coverage
BasicAuthenticationProvider.java 100% 🍏
AuthRequest.java 100% 🍏
AnonymousAuthenticationProvider.java 100% 🍏
DatabaseConnectionProperties.java 100% 🍏
DefaultAuthenticationService.java 100% 🍏
AllOfBuilder.groovy 98.13% 🍏
MqttBrokerSpringConfig.java 90.15% 🍏
InMemoryCredentialsSource.java 81.25% -18.75% 🍏
ConnectInMqttInMessageHandler.java 80.95% 🍏
BasicAuthenticationSpringConfig.java 76.84% -23.16% 🍏
DatabaseSpringConfig.java 41.23% -58.77%
AuthenticationConfigException.java 0%
CredentialsSourceException.java 0% -44.44%

@crazyrokr crazyrokr changed the title #141 Implement DB vesioning with Flyway #67+#141 Implement Authentication Service and DB versioning with Flyway Dec 20, 2025
@crazyrokr crazyrokr marked this pull request as ready for review December 20, 2025 23:46
@crazyrokr crazyrokr requested a review from JavaSaBr December 20, 2025 23:47
# https://mvnrepository.com/artifact/org.springframework/spring-core
spring = '6.2.15'
# https://mvnrepository.com/artifact/org.assertj/assertj-core
assertj = '3.24.2'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to have assertJ? When we write all trests on spock?


import static javasabr.mqtt.broker.application.MqttClientFactory.generateClientId

abstract class ContextRunnerSpecification extends Specification {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need it here?

import static io.r2dbc.spi.ConnectionFactoryOptions.USER

@Configuration
class DatabaseTestSpringConfig {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have it here?

import java.nio.charset.StandardCharsets
import java.util.concurrent.CompletionException

class AuthenticationServiceTest extends ContextRunnerSpecification {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WTF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement DB vesioning with Flyway

3 participants