mirror of
				https://github.com/Alfresco/alfresco-community-repo.git
				synced 2025-10-29 15:21:53 +00:00 
			
		
		
		
	Compare commits
	
		
			48 Commits
		
	
	
		
			23.1.0.244
			...
			hack-build
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					a99e5cdde9 | ||
| 
						 | 
					7bc6dd142b | ||
| 
						 | 
					6cbd2d7d50 | ||
| 
						 | 
					1786cbec99 | ||
| 
						 | 
					e16a53a23e | ||
| 
						 | 
					21fb85f2a9 | ||
| 
						 | 
					7dfd41997a | ||
| 
						 | 
					6374aa30d6 | ||
| 
						 | 
					ed8bdc87da | ||
| 
						 | 
					5b8d758947 | ||
| 
						 | 
					ed3f170d05 | ||
| 
						 | 
					8d51e9885a | ||
| 
						 | 
					a61faaece5 | ||
| 
						 | 
					30de66257f | ||
| 
						 | 
					ae1f955cc2 | ||
| 
						 | 
					452db9a963 | ||
| 
						 | 
					4eeb7feb74 | ||
| 
						 | 
					5aa8c37c53 | ||
| 
						 | 
					aafdd3c46a | ||
| 
						 | 
					f73cf70cbb | ||
| 
						 | 
					dd0e0626bd | ||
| 
						 | 
					e4a5c1a38e | ||
| 
						 | 
					c698ed1d6d | ||
| 
						 | 
					2632486e0f | ||
| 
						 | 
					ea24992b57 | ||
| 
						 | 
					e6b35b7f66 | ||
| 
						 | 
					0aa5fd7f59 | ||
| 
						 | 
					55862fc394 | ||
| 
						 | 
					f942c7b9df | ||
| 
						 | 
					585111602f | ||
| 
						 | 
					473942f3ba | ||
| 
						 | 
					99905d349b | ||
| 
						 | 
					4f1efa183c | ||
| 
						 | 
					141c5f3b34 | ||
| 
						 | 
					7c863be25e | ||
| 
						 | 
					ad6354bd32 | ||
| 
						 | 
					30e191a8cd | ||
| 
						 | 
					b2bcfd72c1 | ||
| 
						 | 
					698ca01778 | ||
| 
						 | 
					e16a0820ee | ||
| 
						 | 
					1f99216d37 | ||
| 
						 | 
					3c60415ea0 | ||
| 
						 | 
					e749ac6478 | ||
| 
						 | 
					6cdcf7928a | ||
| 
						 | 
					542230764d | ||
| 
						 | 
					878cd3ceee | ||
| 
						 | 
					582fc8ec2d | ||
| 
						 | 
					53c99a0ba4 | 
							
								
								
									
										144
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										144
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							@@ -37,8 +37,10 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Init"
 | 
			
		||||
        run: bash ./scripts/ci/init.sh
 | 
			
		||||
      - name: "Prepare maven cache and check compilation"
 | 
			
		||||
@@ -57,8 +59,8 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
      - name: "Init"
 | 
			
		||||
        run: bash ./scripts/ci/init.sh
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.35.2
 | 
			
		||||
@@ -80,8 +82,8 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: Alfresco/ya-pmd-scan@v2.0.5
 | 
			
		||||
 | 
			
		||||
  all_unit_tests_suite:
 | 
			
		||||
    name: "Core, Data-Model, Repository - AllUnitTestsSuite - Build and test"
 | 
			
		||||
  core_datamodel_tests:
 | 
			
		||||
    name: "Core, Data-Model - Build and test"
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    needs: [prepare]
 | 
			
		||||
    if: >
 | 
			
		||||
@@ -91,14 +93,36 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Init"
 | 
			
		||||
        run: bash ./scripts/ci/init.sh
 | 
			
		||||
      - name: "Run tests"
 | 
			
		||||
        run: |
 | 
			
		||||
          mvn -B test -pl core,data-model -am -DfailIfNoTests=false
 | 
			
		||||
          mvn -B test -pl "repository,mmt" -am "-Dtest=AllUnitTestsSuite,AllMmtUnitTestSuite" -DfailIfNoTests=false
 | 
			
		||||
        run: mvn -B test -pl core,data-model -am -DfailIfNoTests=false
 | 
			
		||||
      - name: "Clean Maven cache"
 | 
			
		||||
        run: bash ./scripts/ci/cleanup_cache.sh
 | 
			
		||||
 | 
			
		||||
  all_unit_tests_suite:
 | 
			
		||||
    name: "Repository - AllUnitTestsSuite - Build and test"
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    needs: [prepare]
 | 
			
		||||
    if: >
 | 
			
		||||
      !contains(github.event.head_commit.message, '[skip repo]') &&
 | 
			
		||||
      !contains(github.event.head_commit.message, '[skip tests]') &&
 | 
			
		||||
      !contains(github.event.head_commit.message, '[force')
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Init"
 | 
			
		||||
        run: bash ./scripts/ci/init.sh
 | 
			
		||||
      - name: "Run tests"
 | 
			
		||||
        run: mvn -B test -pl repository,mmt  -am -Dtest=AllUnitTestsSuite,AllMmtUnitTestSuite -DfailIfNoTests=false
 | 
			
		||||
      - name: "Clean Maven cache"
 | 
			
		||||
        run: bash ./scripts/ci/cleanup_cache.sh
 | 
			
		||||
 | 
			
		||||
@@ -129,8 +153,10 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Build"
 | 
			
		||||
        timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
 | 
			
		||||
        run: |
 | 
			
		||||
@@ -159,12 +185,14 @@ jobs:
 | 
			
		||||
    strategy:
 | 
			
		||||
      fail-fast: false
 | 
			
		||||
      matrix:
 | 
			
		||||
        version: ['10.2.18', '10.4', '10.5']
 | 
			
		||||
        version: ["10.2.18", "10.4", "10.5"]
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Init"
 | 
			
		||||
        run: bash ./scripts/ci/init.sh
 | 
			
		||||
      - name: Run MariaDB ${{ matrix.version }} database
 | 
			
		||||
@@ -190,8 +218,10 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Init"
 | 
			
		||||
        run: bash ./scripts/ci/init.sh
 | 
			
		||||
      - name: "Run MariaDB 10.6 database"
 | 
			
		||||
@@ -217,8 +247,10 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Init"
 | 
			
		||||
        run: bash ./scripts/ci/init.sh
 | 
			
		||||
      - name: "Run MySQL 8 database"
 | 
			
		||||
@@ -243,8 +275,10 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Init"
 | 
			
		||||
        run: bash ./scripts/ci/init.sh
 | 
			
		||||
      - name: "Run PostgreSQL 13.12 database"
 | 
			
		||||
@@ -269,8 +303,10 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Init"
 | 
			
		||||
        run: bash ./scripts/ci/init.sh
 | 
			
		||||
      - name: "Run PostgreSQL 14.9 database"
 | 
			
		||||
@@ -295,8 +331,10 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Init"
 | 
			
		||||
        run: bash ./scripts/ci/init.sh
 | 
			
		||||
      - name: "Run PostgreSQL 15.4 database"
 | 
			
		||||
@@ -319,8 +357,10 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Init"
 | 
			
		||||
        run: bash ./scripts/ci/init.sh
 | 
			
		||||
      - name: "Run ActiveMQ"
 | 
			
		||||
@@ -361,17 +401,19 @@ jobs:
 | 
			
		||||
            compose-profile: with-transform-core-aio
 | 
			
		||||
          - testSuite: SearchTestSuite
 | 
			
		||||
            compose-profile: default
 | 
			
		||||
            mvn-options: '-Dindex.subsystem.name=solr6'
 | 
			
		||||
            mvn-options: "-Dindex.subsystem.name=solr6"
 | 
			
		||||
          - testSuite: MTLSTestSuite
 | 
			
		||||
            compose-profile: with-mtls-transform-core-aio
 | 
			
		||||
            mtls: true
 | 
			
		||||
            disabledHostnameVerification: false
 | 
			
		||||
            mvn-options: '-Dencryption.ssl.keystore.location=${CI_WORKSPACE}/keystores/alfresco/alfresco.keystore -Dencryption.ssl.truststore.location=${CI_WORKSPACE}/keystores/alfresco/alfresco.truststore'
 | 
			
		||||
            mvn-options: "-Dencryption.ssl.keystore.location=${CI_WORKSPACE}/keystores/alfresco/alfresco.keystore -Dencryption.ssl.truststore.location=${CI_WORKSPACE}/keystores/alfresco/alfresco.truststore"
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Init"
 | 
			
		||||
        run: bash ./scripts/ci/init.sh
 | 
			
		||||
      - name: "Set transformers tag"
 | 
			
		||||
@@ -441,8 +483,10 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Build"
 | 
			
		||||
        timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
 | 
			
		||||
        run: |
 | 
			
		||||
@@ -479,8 +523,10 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Init"
 | 
			
		||||
        run: bash ./scripts/ci/init.sh
 | 
			
		||||
      - name: "Run Postgres 15.4 database"
 | 
			
		||||
@@ -509,8 +555,10 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Build"
 | 
			
		||||
        timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
 | 
			
		||||
        run: |
 | 
			
		||||
@@ -541,8 +589,10 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Build"
 | 
			
		||||
        timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
 | 
			
		||||
        run: |
 | 
			
		||||
@@ -569,8 +619,10 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Build"
 | 
			
		||||
        timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
 | 
			
		||||
        run: |
 | 
			
		||||
@@ -605,7 +657,7 @@ jobs:
 | 
			
		||||
  ags_start_api_explorer:
 | 
			
		||||
    name: "Test Tomcat deployment of api explorer"
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    needs: [ prepare ]
 | 
			
		||||
    needs: [prepare]
 | 
			
		||||
    if: >
 | 
			
		||||
      (((github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
 | 
			
		||||
      !contains(github.event.head_commit.message, '[skip ags]')) ||
 | 
			
		||||
@@ -615,8 +667,10 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2      
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
 | 
			
		||||
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
 | 
			
		||||
        with:
 | 
			
		||||
          build-cache: "true"
 | 
			
		||||
      - name: "Build"
 | 
			
		||||
        timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
 | 
			
		||||
        run: |
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
   <parent>
 | 
			
		||||
      <groupId>org.alfresco</groupId>
 | 
			
		||||
      <artifactId>alfresco-community-repo-amps</artifactId>
 | 
			
		||||
      <version>23.1.0.244</version>
 | 
			
		||||
      <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
   </parent>
 | 
			
		||||
 | 
			
		||||
   <modules>
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
   <parent>
 | 
			
		||||
      <groupId>org.alfresco</groupId>
 | 
			
		||||
      <artifactId>alfresco-governance-services-community-parent</artifactId>
 | 
			
		||||
      <version>23.1.0.244</version>
 | 
			
		||||
      <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
   </parent>
 | 
			
		||||
 | 
			
		||||
   <modules>
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
   <parent>
 | 
			
		||||
      <groupId>org.alfresco</groupId>
 | 
			
		||||
      <artifactId>alfresco-governance-services-automation-community-repo</artifactId>
 | 
			
		||||
      <version>23.1.0.244</version>
 | 
			
		||||
      <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
   </parent>
 | 
			
		||||
 | 
			
		||||
   <build>
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
   <parent>
 | 
			
		||||
      <groupId>org.alfresco</groupId>
 | 
			
		||||
      <artifactId>alfresco-governance-services-community-parent</artifactId>
 | 
			
		||||
      <version>23.1.0.244</version>
 | 
			
		||||
      <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
   </parent>
 | 
			
		||||
 | 
			
		||||
   <modules>
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
   <parent>
 | 
			
		||||
      <groupId>org.alfresco</groupId>
 | 
			
		||||
      <artifactId>alfresco-governance-services-community-repo-parent</artifactId>
 | 
			
		||||
      <version>23.1.0.244</version>
 | 
			
		||||
      <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
   </parent>
 | 
			
		||||
 | 
			
		||||
   <properties>
 | 
			
		||||
 
 | 
			
		||||
@@ -61,6 +61,7 @@ public class RFC822MetadataExtracter extends org.alfresco.repo.content.metadata.
 | 
			
		||||
    public void setNodeService(NodeService nodeService)
 | 
			
		||||
    {
 | 
			
		||||
        this.nodeService = nodeService;
 | 
			
		||||
        super.setNodeService(nodeService);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-governance-services-community-repo-parent</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <build>
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <modules>
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo-amps</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <properties>
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
   <parent>
 | 
			
		||||
      <groupId>org.alfresco</groupId>
 | 
			
		||||
      <artifactId>alfresco-community-repo</artifactId>
 | 
			
		||||
      <version>23.1.0.244</version>
 | 
			
		||||
      <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
   </parent>
 | 
			
		||||
 | 
			
		||||
   <dependencies>
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <properties>
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <dependencies>
 | 
			
		||||
 
 | 
			
		||||
@@ -9,6 +9,6 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo-packaging</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
</project>
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo-packaging</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <properties>
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <modules>
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo-packaging</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <modules>
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo-tests</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <organization>
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo-tests</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <developers>
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo-tests</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <developers>
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo-tests</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <properties>
 | 
			
		||||
 
 | 
			
		||||
@@ -45,6 +45,9 @@ public class RestRequestFieldsModel extends TestModel implements IRestModel<Rest
 | 
			
		||||
    private String field;
 | 
			
		||||
    private String prefix;
 | 
			
		||||
    private String postfix;
 | 
			
		||||
    private Integer snippetCount;
 | 
			
		||||
    private Integer fragmentSize;
 | 
			
		||||
    private Boolean mergeContiguous;
 | 
			
		||||
 | 
			
		||||
    public RestRequestFieldsModel() {
 | 
			
		||||
        super();
 | 
			
		||||
@@ -102,6 +105,36 @@ public class RestRequestFieldsModel extends TestModel implements IRestModel<Rest
 | 
			
		||||
        this.postfix = postfix;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getSnippetCount()
 | 
			
		||||
    {
 | 
			
		||||
        return snippetCount;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setSnippetCount(Integer snippetCount)
 | 
			
		||||
    {
 | 
			
		||||
        this.snippetCount = snippetCount;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getFragmentSize()
 | 
			
		||||
    {
 | 
			
		||||
        return fragmentSize;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setFragmentSize(Integer fragmentSize)
 | 
			
		||||
    {
 | 
			
		||||
        this.fragmentSize = fragmentSize;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Boolean getMergeContiguous()
 | 
			
		||||
    {
 | 
			
		||||
        return mergeContiguous;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setMergeContiguous(Boolean mergeContiguous)
 | 
			
		||||
    {
 | 
			
		||||
        this.mergeContiguous = mergeContiguous;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static Builder builder()
 | 
			
		||||
    {
 | 
			
		||||
        return new Builder();
 | 
			
		||||
@@ -112,6 +145,9 @@ public class RestRequestFieldsModel extends TestModel implements IRestModel<Rest
 | 
			
		||||
        private String field;
 | 
			
		||||
        private String prefix;
 | 
			
		||||
        private String postfix;
 | 
			
		||||
        private Integer snippetCount;
 | 
			
		||||
        private Integer fragmentSize;
 | 
			
		||||
        private Boolean mergeContiguous;
 | 
			
		||||
 | 
			
		||||
        public Builder field(String field)
 | 
			
		||||
        {
 | 
			
		||||
@@ -131,14 +167,33 @@ public class RestRequestFieldsModel extends TestModel implements IRestModel<Rest
 | 
			
		||||
            return this;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public Builder snippetCount(Integer snippetCount)
 | 
			
		||||
        {
 | 
			
		||||
            this.snippetCount = snippetCount;
 | 
			
		||||
            return this;
 | 
			
		||||
        }
 | 
			
		||||
        public Builder fragmentSize(Integer fragmentSize)
 | 
			
		||||
        {
 | 
			
		||||
            this.fragmentSize = fragmentSize;
 | 
			
		||||
            return this;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public Builder mergeContiguous(Boolean mergeContiguous)
 | 
			
		||||
        {
 | 
			
		||||
            this.mergeContiguous = mergeContiguous;
 | 
			
		||||
            return this;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public RestRequestFieldsModel build()
 | 
			
		||||
        {
 | 
			
		||||
            RestRequestFieldsModel fieldModel = new RestRequestFieldsModel();
 | 
			
		||||
            fieldModel.setField(field);
 | 
			
		||||
            fieldModel.setPrefix(prefix);
 | 
			
		||||
            fieldModel.setPostfix(postfix);
 | 
			
		||||
            fieldModel.setSnippetCount(snippetCount);
 | 
			
		||||
            fieldModel.setFragmentSize(fragmentSize);
 | 
			
		||||
            fieldModel.setMergeContiguous(mergeContiguous);
 | 
			
		||||
            return fieldModel;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
@@ -11,6 +11,7 @@ import org.alfresco.utility.testrail.ExecutionType;
 | 
			
		||||
import org.alfresco.utility.testrail.annotation.TestRail;
 | 
			
		||||
import org.springframework.http.HttpStatus;
 | 
			
		||||
import org.testng.annotations.BeforeClass;
 | 
			
		||||
import org.testng.annotations.Ignore;
 | 
			
		||||
import org.testng.annotations.Test;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
@@ -47,8 +48,9 @@ public class GetProcessesCoreTests extends RestTest
 | 
			
		||||
 | 
			
		||||
    @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW,TestGroup.PROCESSES }, executionType = ExecutionType.REGRESSION, 
 | 
			
		||||
            description = "Verify user gets all processes started by him ordered descending by id")
 | 
			
		||||
    @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.PROCESSES, TestGroup.REGRESSION })
 | 
			
		||||
    public void getProcessesOrderedByIdDESC() throws Exception
 | 
			
		||||
    @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.PROCESSES, TestGroup.REGRESSION }, enabled = false)
 | 
			
		||||
    @Ignore("Until ACS-6234 is done")
 | 
			
		||||
    public void getProcessesOrderedByIdDESC()
 | 
			
		||||
    {
 | 
			
		||||
        RestProcessModelsCollection processes = restClient.authenticateUser(userWhoStartsTask).withParams("orderBy=id DESC")
 | 
			
		||||
                .withWorkflowAPI().getProcesses();
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo-tests</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <developers>
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo-packaging</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <properties>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								pom.xml
									
									
									
									
									
								
							@@ -2,7 +2,7 @@
 | 
			
		||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 | 
			
		||||
    <modelVersion>4.0.0</modelVersion>
 | 
			
		||||
    <artifactId>alfresco-community-repo</artifactId>
 | 
			
		||||
    <version>23.1.0.244</version>
 | 
			
		||||
    <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    <packaging>pom</packaging>
 | 
			
		||||
    <name>Alfresco Community Repo Parent</name>
 | 
			
		||||
 | 
			
		||||
@@ -51,8 +51,8 @@
 | 
			
		||||
        <dependency.alfresco-server-root.version>7.0.1</dependency.alfresco-server-root.version>
 | 
			
		||||
        <dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version>
 | 
			
		||||
        <dependency.activiti.version>5.23.0</dependency.activiti.version>
 | 
			
		||||
        <dependency.alfresco-transform-core.version>5.0.0-A3</dependency.alfresco-transform-core.version>
 | 
			
		||||
        <dependency.alfresco-transform-service.version>4.0.0-A3</dependency.alfresco-transform-service.version>
 | 
			
		||||
        <dependency.alfresco-transform-core.version>5.0.0</dependency.alfresco-transform-core.version>
 | 
			
		||||
        <dependency.alfresco-transform-service.version>4.0.0</dependency.alfresco-transform-service.version>
 | 
			
		||||
        <dependency.alfresco-greenmail.version>7.0</dependency.alfresco-greenmail.version>
 | 
			
		||||
        <dependency.acs-event-model.version>0.0.24</dependency.acs-event-model.version>
 | 
			
		||||
 | 
			
		||||
@@ -67,7 +67,7 @@
 | 
			
		||||
        <dependency.bouncycastle.version>1.76</dependency.bouncycastle.version>
 | 
			
		||||
        <dependency.mockito-core.version>5.4.0</dependency.mockito-core.version>
 | 
			
		||||
        <dependency.assertj.version>3.24.2</dependency.assertj.version>
 | 
			
		||||
        <dependency.org-json.version>20230618</dependency.org-json.version>
 | 
			
		||||
        <dependency.org-json.version>20231013</dependency.org-json.version>
 | 
			
		||||
        <dependency.commons-dbcp.version>2.9.0</dependency.commons-dbcp.version>
 | 
			
		||||
        <dependency.commons-io.version>2.14.0</dependency.commons-io.version>
 | 
			
		||||
        <dependency.gson.version>2.10.1</dependency.gson.version>
 | 
			
		||||
@@ -113,9 +113,9 @@
 | 
			
		||||
        <dependency.jakarta-ee-json-impl.version>1.1.4</dependency.jakarta-ee-json-impl.version>
 | 
			
		||||
        <dependency.jakarta-json-path.version>2.8.0</dependency.jakarta-json-path.version>
 | 
			
		||||
        <dependency.json-smart.version>2.5.0</dependency.json-smart.version>
 | 
			
		||||
        <alfresco.googledrive.version>4.0.0-M1</alfresco.googledrive.version>
 | 
			
		||||
        <alfresco.aos-module.version>2.0.0-M1</alfresco.aos-module.version>
 | 
			
		||||
        <alfresco.api-explorer.version>23.1.0-A1</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
 | 
			
		||||
        <alfresco.googledrive.version>4.0.0</alfresco.googledrive.version>
 | 
			
		||||
        <alfresco.aos-module.version>2.0.0</alfresco.aos-module.version>
 | 
			
		||||
        <alfresco.api-explorer.version>23.1.0</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
 | 
			
		||||
 | 
			
		||||
        <alfresco.maven-plugin.version>2.2.0</alfresco.maven-plugin.version>
 | 
			
		||||
        <license-maven-plugin.version>2.0.1</license-maven-plugin.version>
 | 
			
		||||
@@ -152,7 +152,7 @@
 | 
			
		||||
        <connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
 | 
			
		||||
        <developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
 | 
			
		||||
        <url>https://github.com/Alfresco/alfresco-community-repo</url>
 | 
			
		||||
        <tag>23.1.0.244</tag>
 | 
			
		||||
        <tag>HEAD</tag>
 | 
			
		||||
    </scm>
 | 
			
		||||
 | 
			
		||||
    <distributionManagement>
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <dependencies>
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo</artifactId>
 | 
			
		||||
        <version>23.1.0.244</version>
 | 
			
		||||
        <version>23.1.0.256-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <dependencies>
 | 
			
		||||
 
 | 
			
		||||
@@ -57,6 +57,7 @@ import com.nimbusds.jose.proc.JWSVerificationKeySelector;
 | 
			
		||||
import com.nimbusds.jose.proc.SecurityContext;
 | 
			
		||||
import com.nimbusds.jose.util.ResourceRetriever;
 | 
			
		||||
import com.nimbusds.jwt.proc.ConfigurableJWTProcessor;
 | 
			
		||||
import com.nimbusds.oauth2.sdk.id.Issuer;
 | 
			
		||||
import com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata;
 | 
			
		||||
 | 
			
		||||
import org.alfresco.repo.security.authentication.identityservice.IdentityServiceFacade.IdentityServiceFacadeException;
 | 
			
		||||
@@ -91,7 +92,9 @@ import org.springframework.security.oauth2.core.ClientAuthenticationMethod;
 | 
			
		||||
import org.springframework.security.oauth2.core.DelegatingOAuth2TokenValidator;
 | 
			
		||||
import org.springframework.security.oauth2.core.OAuth2AuthenticationException;
 | 
			
		||||
import org.springframework.security.oauth2.core.OAuth2Error;
 | 
			
		||||
import org.springframework.security.oauth2.core.OAuth2ErrorCodes;
 | 
			
		||||
import org.springframework.security.oauth2.core.OAuth2TokenValidator;
 | 
			
		||||
import org.springframework.security.oauth2.core.OAuth2TokenValidatorResult;
 | 
			
		||||
import org.springframework.security.oauth2.core.converter.ClaimTypeConverter;
 | 
			
		||||
import org.springframework.security.oauth2.core.http.converter.OAuth2AccessTokenResponseHttpMessageConverter;
 | 
			
		||||
import org.springframework.security.oauth2.jose.jws.SignatureAlgorithm;
 | 
			
		||||
@@ -99,7 +102,6 @@ import org.springframework.security.oauth2.jwt.Jwt;
 | 
			
		||||
import org.springframework.security.oauth2.jwt.JwtClaimNames;
 | 
			
		||||
import org.springframework.security.oauth2.jwt.JwtClaimValidator;
 | 
			
		||||
import org.springframework.security.oauth2.jwt.JwtDecoder;
 | 
			
		||||
import org.springframework.security.oauth2.jwt.JwtIssuerValidator;
 | 
			
		||||
import org.springframework.security.oauth2.jwt.JwtTimestampValidator;
 | 
			
		||||
import org.springframework.security.oauth2.jwt.NimbusJwtDecoder;
 | 
			
		||||
import org.springframework.web.client.RestOperations;
 | 
			
		||||
@@ -375,12 +377,18 @@ public class IdentityServiceFacadeFactoryBean implements FactoryBean<IdentitySer
 | 
			
		||||
                                           .map(OIDCProviderMetadata::getAuthorizationEndpointURI)
 | 
			
		||||
                                           .map(URI::toASCIIString)
 | 
			
		||||
                                           .orElse(null);
 | 
			
		||||
 | 
			
		||||
            final String issuerUri = Optional.of(metadata)
 | 
			
		||||
                    .map(OIDCProviderMetadata::getIssuer)
 | 
			
		||||
                    .map(Issuer::getValue)
 | 
			
		||||
                    .orElseGet(config::getIssuerUrl);
 | 
			
		||||
 | 
			
		||||
            return ClientRegistration
 | 
			
		||||
                    .withRegistrationId("ids")
 | 
			
		||||
                    .authorizationUri(authUri)
 | 
			
		||||
                    .tokenUri(metadata.getTokenEndpointURI().toASCIIString())
 | 
			
		||||
                    .jwkSetUri(metadata.getJWKSetURI().toASCIIString())
 | 
			
		||||
                    .issuerUri(config.getIssuerUrl())
 | 
			
		||||
                    .issuerUri(issuerUri)
 | 
			
		||||
                    .authorizationGrantType(AuthorizationGrantType.PASSWORD);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@@ -565,6 +573,34 @@ public class IdentityServiceFacadeFactoryBean implements FactoryBean<IdentitySer
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static class JwtIssuerValidator implements OAuth2TokenValidator<Jwt>
 | 
			
		||||
    {
 | 
			
		||||
        private final String requiredIssuer;
 | 
			
		||||
 | 
			
		||||
        public JwtIssuerValidator(String issuer)
 | 
			
		||||
        {
 | 
			
		||||
            this.requiredIssuer = requireNonNull(issuer, "issuer cannot be null");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @Override
 | 
			
		||||
        public OAuth2TokenValidatorResult validate(Jwt token)
 | 
			
		||||
        {
 | 
			
		||||
            requireNonNull(token, "token cannot be null");
 | 
			
		||||
            final Object issuer = token.getClaim(JwtClaimNames.ISS);
 | 
			
		||||
            if (issuer != null && requiredIssuer.equals(issuer.toString()))
 | 
			
		||||
            {
 | 
			
		||||
                return OAuth2TokenValidatorResult.success();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            final OAuth2Error error = new OAuth2Error(
 | 
			
		||||
                    OAuth2ErrorCodes.INVALID_TOKEN,
 | 
			
		||||
                    "The iss claim is not valid. Expected `%s` but got `%s`.".formatted(requiredIssuer, issuer),
 | 
			
		||||
                    "https://tools.ietf.org/html/rfc6750#section-3.1");
 | 
			
		||||
            return OAuth2TokenValidatorResult.failure(error);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private static boolean isDefined(String value)
 | 
			
		||||
    {
 | 
			
		||||
        return value != null && !value.isBlank();
 | 
			
		||||
 
 | 
			
		||||
@@ -31,15 +31,20 @@ import static org.mockito.Mockito.mock;
 | 
			
		||||
import static org.mockito.Mockito.when;
 | 
			
		||||
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.UUID;
 | 
			
		||||
 | 
			
		||||
import org.alfresco.repo.security.authentication.identityservice.IdentityServiceFacadeFactoryBean.JwtDecoderProvider;
 | 
			
		||||
import org.alfresco.repo.security.authentication.identityservice.IdentityServiceFacadeFactoryBean.JwtIssuerValidator;
 | 
			
		||||
import org.junit.Test;
 | 
			
		||||
import org.springframework.security.oauth2.client.registration.ClientRegistration.ProviderDetails;
 | 
			
		||||
import org.springframework.security.oauth2.core.OAuth2Error;
 | 
			
		||||
import org.springframework.security.oauth2.core.OAuth2TokenValidatorResult;
 | 
			
		||||
import org.springframework.security.oauth2.jwt.Jwt;
 | 
			
		||||
import org.springframework.security.oauth2.jwt.JwtDecoder;
 | 
			
		||||
 | 
			
		||||
public class IdentityServiceFacadeFactoryBeanTest
 | 
			
		||||
{
 | 
			
		||||
    private static final String EXPECTED_ISSUER = "expected-issuer";
 | 
			
		||||
    @Test
 | 
			
		||||
    public void shouldCreateJwtDecoderWithoutIDSWhenPublicKeyIsProvided()
 | 
			
		||||
    {
 | 
			
		||||
@@ -62,4 +67,53 @@ public class IdentityServiceFacadeFactoryBeanTest
 | 
			
		||||
                          .containsEntry(USERNAME_CLAIM, "piotrek");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Test
 | 
			
		||||
    public void shouldFailWithNotMatchingIssuerURIs()
 | 
			
		||||
    {
 | 
			
		||||
        final JwtIssuerValidator issuerValidator = new JwtIssuerValidator(EXPECTED_ISSUER);
 | 
			
		||||
 | 
			
		||||
        final OAuth2TokenValidatorResult validationResult = issuerValidator.validate(tokenWithIssuer("different-issuer"));
 | 
			
		||||
        assertThat(validationResult).isNotNull();
 | 
			
		||||
        assertThat(validationResult.hasErrors()).isTrue();
 | 
			
		||||
        assertThat(validationResult.getErrors()).hasSize(1);
 | 
			
		||||
 | 
			
		||||
        final OAuth2Error error = validationResult.getErrors().iterator().next();
 | 
			
		||||
        assertThat(error).isNotNull();
 | 
			
		||||
        assertThat(error.getDescription()).contains(EXPECTED_ISSUER, "different-issuer");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Test
 | 
			
		||||
    public void shouldFailWithNullIssuerURI()
 | 
			
		||||
    {
 | 
			
		||||
        final JwtIssuerValidator issuerValidator = new JwtIssuerValidator(EXPECTED_ISSUER);
 | 
			
		||||
 | 
			
		||||
        final OAuth2TokenValidatorResult validationResult = issuerValidator.validate(tokenWithIssuer(null));
 | 
			
		||||
        assertThat(validationResult).isNotNull();
 | 
			
		||||
        assertThat(validationResult.hasErrors()).isTrue();
 | 
			
		||||
        assertThat(validationResult.getErrors()).hasSize(1);
 | 
			
		||||
 | 
			
		||||
        final OAuth2Error error = validationResult.getErrors().iterator().next();
 | 
			
		||||
        assertThat(error).isNotNull();
 | 
			
		||||
        assertThat(error.getDescription()).contains(EXPECTED_ISSUER, "null");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Test
 | 
			
		||||
    public void shouldSucceedWithMatchingIssuerURI()
 | 
			
		||||
    {
 | 
			
		||||
        final JwtIssuerValidator issuerValidator = new JwtIssuerValidator(EXPECTED_ISSUER);
 | 
			
		||||
 | 
			
		||||
        final OAuth2TokenValidatorResult validationResult = issuerValidator.validate(tokenWithIssuer(EXPECTED_ISSUER));
 | 
			
		||||
        assertThat(validationResult).isNotNull();
 | 
			
		||||
        assertThat(validationResult.hasErrors()).isFalse();
 | 
			
		||||
        assertThat(validationResult.getErrors()).isEmpty();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private Jwt tokenWithIssuer(String issuer)
 | 
			
		||||
    {
 | 
			
		||||
        return Jwt.withTokenValue(UUID.randomUUID().toString())
 | 
			
		||||
                  .issuer(issuer)
 | 
			
		||||
                  .header("JUST", "FOR TESTING")
 | 
			
		||||
                  .build();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user