Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/idrepo/console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ under the License.
<properties>
<maven.build.cache.skipCache>true</maven.build.cache.skipCache>
<skipTests>true</skipTests>
<skipITs>true</skipITs>
</properties>

<build>
Expand Down
1 change: 1 addition & 0 deletions client/idrepo/enduser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ under the License.
<properties>
<maven.build.cache.skipCache>true</maven.build.cache.skipCache>
<skipTests>true</skipTests>
<skipITs>true</skipITs>
</properties>

<build>
Expand Down
1 change: 1 addition & 0 deletions core/self-keymaster-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ under the License.
<properties>
<maven.build.cache.skipCache>true</maven.build.cache.skipCache>
<skipTests>true</skipTests>
<skipITs>true</skipITs>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ public DefaultCredentialChecker(
final String anonymousKey,
final boolean productionMode) throws IOException {

try (InputStream in = getClass().getResourceAsStream("/META-INF/default-credentials.properties")) {
try (InputStream in = DefaultCredentialChecker.class.getResourceAsStream(
"/META-INF/default-credentials.properties")) {

Properties defaultCredentials = new Properties();
defaultCredentials.load(in);
defaultAesKeyInUse = defaultCredentials.getProperty("default.aesSecretKey").equals(aesKey);
Expand Down
1 change: 1 addition & 0 deletions ext/openfga/client-openfga/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ under the License.

<properties>
<skipTests>true</skipTests>
<skipITs>true</skipITs>
<rootpom.basedir>${basedir}/../../..</rootpom.basedir>
</properties>

Expand Down
5 changes: 1 addition & 4 deletions fit/console-reference/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,12 @@ under the License.
</build>

<profiles>
<profile>
<id>skipTests</id>
</profile>

<profile>
<id>debug</id>

<properties>
<skipTests>true</skipTests>
<skipITs>true</skipITs>
</properties>

<build>
Expand Down
4 changes: 3 additions & 1 deletion fit/core-reference/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1723,7 +1723,7 @@ under the License.
<artifactId>maven-failsafe-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<skipTests>${skipTests}</skipTests>
<skipITs>${skipITs}</skipITs>
</configuration>
</plugin>
</plugins>
Expand All @@ -1735,6 +1735,7 @@ under the License.

<properties>
<skipTests>true</skipTests>
<skipITs>true</skipITs>
</properties>

<build>
Expand Down Expand Up @@ -1765,6 +1766,7 @@ under the License.

<properties>
<skipTests>true</skipTests>
<skipITs>true</skipITs>
</properties>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public abstract class AbstractUIITCase {

protected static boolean IS_EXT_SEARCH_ENABLED = false;

protected static boolean IS_NEO4J_PERSISTENCE = false;

@BeforeAll
public static void anonymousSetup() throws IOException {
try (InputStream propStream = AbstractITCase.class.getResourceAsStream("/core.properties")) {
Expand Down Expand Up @@ -114,6 +116,8 @@ public static void anonymousSetup() throws IOException {
JsonNode anySearchDAO = beans.findValues("anySearchDAO").getFirst();
IS_EXT_SEARCH_ENABLED = anySearchDAO.get("type").asString().contains("Elasticsearch")
|| anySearchDAO.get("type").asString().contains("OpenSearch");

IS_NEO4J_PERSISTENCE = anySearchDAO.get("resource").asString().contains("neo4j");
}

protected static <V extends Serializable> Component findComponentByProp(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package org.apache.syncope.fit.core;

import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
Expand Down Expand Up @@ -224,23 +225,21 @@ public void invalidIssuer() throws ParseException, JOSEException {
@Test
public void expiredToken() throws ParseException, JOSEException {
// Get an initial token
SyncopeClient localClient = CLIENT_FACTORY.create(ADMIN_UNAME, ADMIN_PWD);
UserCR userCR = UserITCase.getUniqueSample("expired@syncope.apache.org");
assertDoesNotThrow(() -> createUser(userCR));
SyncopeClient localClient = CLIENT_FACTORY.create(userCR.getUsername(), userCR.getPassword());
AccessTokenService accessTokenService = localClient.getService(AccessTokenService.class);

Response response = accessTokenService.login();
String token = response.getHeaderString(RESTHeaders.TOKEN);
assertNotNull(token);
SignedJWT jwt = SignedJWT.parse(token);
String tokenId = jwt.getJWTClaimsSet().getJWTID();

// Create a new token using the Id of the first token
Date currentTime = new Date();

JWTClaimsSet.Builder claimsSet = new JWTClaimsSet.Builder().
jwtID(tokenId).
subject(ADMIN_UNAME).
JWTClaimsSet.Builder claimsSet = new JWTClaimsSet.Builder(jwt.getJWTClaimsSet()).
issueTime(currentTime).
issuer(JWT_ISSUER).
expirationTime(new Date(currentTime.getTime() - 5000L)).
notBeforeTime(currentTime);
jwt = new SignedJWT(new JWSHeader(JWS_SIGNER.getJwsAlgorithm()), claimsSet.build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,14 @@
import org.identityconnectors.framework.common.objects.Name;
import org.identityconnectors.framework.common.objects.Uid;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.springframework.core.task.SimpleAsyncTaskExecutor;
import org.springframework.jdbc.core.JdbcTemplate;

@TestMethodOrder(OrderAnnotation.class)
public class PullTaskITCase extends AbstractTaskITCase {

private static final String LDAP_PULL_TASK = "1e419ca4-ea81-4493-a14f-28b90113686d";
Expand Down Expand Up @@ -239,6 +243,7 @@ public void create() {
assertEquals(groupTemplate, task.getTemplates().get(AnyTypeKind.GROUP.name()));
}

@Order(1)
@Test
public void fromCSV() throws Exception {
assumeFalse(IS_EXT_SEARCH_ENABLED);
Expand Down Expand Up @@ -408,6 +413,7 @@ public void reconcileFromDB() {
}
}

@Order(2)
@Test
public void reconcileFromLDAP() {
assumeFalse(IS_NEO4J_PERSISTENCE);
Expand Down Expand Up @@ -779,6 +785,7 @@ public void syncTokenWithErrors() {
}
}

@Order(3)
@Test
public void remediation() {
// First of all, clear any potential conflict with existing user / group
Expand Down Expand Up @@ -865,6 +872,7 @@ public void remediation() {
}
}

@Order(4)
@Test
public void remediationSinglePull() throws IOException {
// First of all, clear any potential conflict with existing user / group
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,8 @@ public void updateInvalidPassword() {

@Test
public void updateSamePassword() {
assumeFalse(IS_NEO4J_PERSISTENCE);

assertThrows(SyncopeClientException.class, () -> {
UserCR userCR = getUniqueSample("updatesame@password.com");
userCR.setRealm("/even/two");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assumptions.assumeFalse;

import org.apache.syncope.client.enduser.pages.Login;
import org.apache.syncope.client.enduser.pages.SelfPasswordReset;
Expand All @@ -40,6 +41,8 @@ public class AnonymousITCase extends AbstractEnduserITCase {

@Test
public void selfCreate() {
assumeFalse(IS_NEO4J_PERSISTENCE);

String username = "testUser";

TESTER.startPage(Login.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assumptions.assumeFalse;

import java.io.IOException;
import org.apache.syncope.client.enduser.pages.Dashboard;
Expand Down Expand Up @@ -88,6 +89,8 @@ public void mustChangePassword() {

@Test
public void selfUpdate() {
assumeFalse(IS_NEO4J_PERSISTENCE);

String username = "selfupdate";
String newEmail = "selfupdate@email.com";

Expand Down
5 changes: 1 addition & 4 deletions fit/enduser-reference/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,12 @@ under the License.
</build>

<profiles>
<profile>
<id>skipTests</id>
</profile>

<profile>
<id>debug</id>

<properties>
<skipTests>true</skipTests>
<skipITs>true</skipITs>
</properties>

<build>
Expand Down
5 changes: 1 addition & 4 deletions fit/wa-reference/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -393,15 +393,12 @@ under the License.
</build>

<profiles>
<profile>
<id>skipTests</id>
</profile>

<profile>
<id>debug</id>

<properties>
<skipTests>true</skipTests>
<skipITs>true</skipITs>
</properties>

<build>
Expand Down
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1799,7 +1799,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.6</version>
<version>3.6.0</version>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<encoding>utf-8</encoding>
Expand All @@ -1809,7 +1809,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.6</version>
<version>3.6.0</version>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<runOrder>alphabetical</runOrder>
Expand Down Expand Up @@ -2423,6 +2423,7 @@ under the License.
<properties>
<maven.build.cache.skipCache>true</maven.build.cache.skipCache>
<skipTests>true</skipTests>
<skipITs>true</skipITs>
<ianal.phase>none</ianal.phase>
<modernizer.skip>true</modernizer.skip>
<rat.skip>true</rat.skip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public ReactiveJwtDecoder oauth2JWTDecoder(
String jwkSetUri = oauth2ClientRegistration.getProviderDetails().getJwkSetUri();
if (StringUtils.isBlank(jwkSetUri)) {
throw new IllegalStateException(
"sra.oauth2.jwkSetUri must be configured for OAuth2 JWT verification."
"sra.oauth2.jwkSetUri must be configured for OAuth2 JWT verification. "
+ "SRA cannot securely operate without JWT signature verification.");
}

Expand Down
Loading