Fix auth -> authentication in some props in SDK (#2839)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2025-11-28 09:13:41 +02:00
committed by GitHub
parent 42384b7e31
commit 203598f3a4
29 changed files with 129 additions and 121 deletions

View File

@@ -31,10 +31,10 @@ import org.springframework.security.core.authority.SimpleGrantedAuthority;
public interface Authenticator {
/**
* If the auth mechanism is not enabled for the tenant - it just returns null.
* If the auth mechanism is supported, the filter extracts from the security token the related credentials,
* If the authentication mechanism is not enabled for the tenant - it just returns null.
* If the authentication mechanism is supported, the filter extracts from the security token the related credentials,
* validate them (do authenticate the caller).
* If validation / auth is successful returns an authenticated auth object. Otherwise,
* If validation / authentication is successful returns an authenticated authentication object. Otherwise,
* throws BadCredentialsException.
*
* @param controllerSecurityToken the securityToken

View File

@@ -89,7 +89,7 @@ public class DdiSecurityProperties {
public static class Gatewaytoken {
/**
* Gateway token based auth enabled.
* Gateway token based authentication enabled.
*/
private boolean enabled = false;

View File

@@ -43,7 +43,7 @@ public class GatewayTokenAuthenticator extends Authenticator.AbstractAuthenticat
}
if (!isEnabled(controllerSecurityToken)) {
log.debug("The gateway token auth is disabled");
log.debug("The gateway token authentication is disabled");
return null;
}

View File

@@ -67,7 +67,7 @@ public class SecurityHeaderAuthenticator extends Authenticator.AbstractAuthentic
}
if (!isEnabled(controllerSecurityToken)) {
log.debug("The gateway header auth is disabled");
log.debug("The gateway header authentication is disabled");
return null;
}

View File

@@ -47,7 +47,7 @@ public class SecurityTokenAuthenticator extends Authenticator.AbstractAuthentica
}
if (!isEnabled(controllerSecurityToken)) {
log.debug("The target security token auth is disabled");
log.debug("The target security token authentication is disabled");
return null;
}

View File

@@ -26,7 +26,7 @@ import org.mockito.junit.jupiter.MockitoExtension;
/**
* Feature: Unit Tests - Security<br/>
* Story: Gateway token auth
* Story: Gateway token authentication
*/
@ExtendWith(MockitoExtension.class)
class GatewayTokenAuthenticatorTest {
@@ -54,7 +54,7 @@ class GatewayTokenAuthenticatorTest {
}
/**
* Tests successful auth with gateway token
* Tests successful authentication with gateway token
*/
@Test
void testWithGwToken() {
@@ -70,7 +70,7 @@ class GatewayTokenAuthenticatorTest {
}
/**
* Tests that if gateway token doesn't match, the auth fails
* Tests that if gateway token doesn't match, the authentication fails
*/
@Test
void testWithBadGwToken() {
@@ -84,7 +84,7 @@ class GatewayTokenAuthenticatorTest {
}
/**
* Tests that if gateway token miss, the auth fails
* Tests that if gateway token miss, the authentication fails
*/
@Test
void testWithoutGwToken() {
@@ -92,7 +92,7 @@ class GatewayTokenAuthenticatorTest {
}
/**
* Tests that if disabled, the auth fails
* Tests that if disabled, the authentication fails
*/
@Test
void testWithGwTokenButDisabled() {

View File

@@ -63,7 +63,7 @@ class SecurityHeaderAuthenticatorTest {
}
/**
* Tests successful auth with multiple a single hashes
* Tests successful authentication with multiple a single hashes
*/
@Test
void testWithSingleKnownHash() {
@@ -79,7 +79,7 @@ class SecurityHeaderAuthenticatorTest {
}
/**
* Tests successful auth with multiple hashes
* Tests successful authentication with multiple hashes
*/
@Test
void testWithMultipleKnownHashes() {
@@ -100,7 +100,7 @@ class SecurityHeaderAuthenticatorTest {
}
/**
* Tests that if the hash is unknown, the auth fails
* Tests that if the hash is unknown, the authentication fails
*/
@Test
void testWithUnknownHash() {
@@ -114,7 +114,7 @@ class SecurityHeaderAuthenticatorTest {
}
/**
* Tests that if CN doesn't match the CN in the security token, the auth fails
* Tests that if CN doesn't match the CN in the security token, the authentication fails
*/
@Test
void testWithNonMatchingCN() {
@@ -126,7 +126,7 @@ class SecurityHeaderAuthenticatorTest {
}
/**
* Tests that if the hash miss, the auth fails
* Tests that if the hash miss, the authentication fails
*/
@Test
void testWithoutHash() {
@@ -134,7 +134,7 @@ class SecurityHeaderAuthenticatorTest {
}
/**
* Tests that if disabled, the auth fails
* Tests that if disabled, the authentication fails
*/
@Test
void testWithSingleKnownHashButDisabled() {

View File

@@ -29,7 +29,7 @@ import org.mockito.junit.jupiter.MockitoExtension;
/**
* Feature: Unit Tests - Security<br/>
* Story: Gateway token auth
* Story: Gateway token authentication
*/
@ExtendWith(MockitoExtension.class)
class SecurityTokenAuthenticatorTest {
@@ -57,7 +57,7 @@ class SecurityTokenAuthenticatorTest {
}
/**
* Tests successful auth with gateway token
* Tests successful authentication with gateway token
*/
@Test
void testWithSecToken() {
@@ -76,7 +76,7 @@ class SecurityTokenAuthenticatorTest {
}
/**
* Tests that if gateway token doesn't match, the auth fails
* Tests that if gateway token doesn't match, the authentication fails
*/
@Test
void testWithBadSecToken() {
@@ -88,7 +88,7 @@ class SecurityTokenAuthenticatorTest {
}
/**
* Tests that if gateway token miss, the auth fails
* Tests that if gateway token miss, the authentication fails
*/
@Test
void testWithoutSecToken() {
@@ -96,7 +96,7 @@ class SecurityTokenAuthenticatorTest {
}
/**
* Tests that if disabled, the auth fails
* Tests that if disabled, the authentication fails
*/
@Test
void testWithSecTokenButDisabled() {