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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/check-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ jobs:
${{ runner.os }}-pmd-

- name: Run PMD
run: ./mvnw -B test pmd:aggregate-pmd-no-fork pmd:check -P pmd -DskipTests -T2C
run: ./mvnw -B test pmd:aggregate-pmd-no-fork pmd:check -P pmd -T2C

- name: Run CPD (Copy Paste Detector)
run: ./mvnw -B pmd:aggregate-cpd pmd:cpd-check -P pmd -DskipTests -T2C
run: ./mvnw -B pmd:aggregate-cpd pmd:cpd-check -P pmd -T2C

- name: Upload report
if: ${{ !cancelled() }}
Expand Down
73 changes: 45 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
push:
branches: [ master ]

permissions:
contents: write
pull-requests: write

# DO NOT RESTORE CACHE for critical release steps to prevent a (extremely unlikely) scenario
# where a supply chain attack could be achieved due to poisoned cache
jobs:
Expand All @@ -34,7 +30,8 @@ jobs:
${{ runner.os }}-mvn-build-

- name: Build with Maven
run: ./mvnw -B clean package -T2C
run: ../mvnw -B clean package -T2C
working-directory: src

- name: Check for uncommited changes
run: |
Expand All @@ -58,6 +55,8 @@ jobs:
runs-on: ubuntu-latest
needs: [check-code]
timeout-minutes: 10
permissions:
contents: write
outputs:
upload_url: ${{ steps.create-release.outputs.upload_url }}
steps:
Expand All @@ -74,7 +73,7 @@ jobs:
- name: Get version
id: version
run: |
version=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
version=$(./mvnw -B help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "release=$version" >> $GITHUB_OUTPUT
echo "releasenumber=${version//[!0-9]/}" >> $GITHUB_OUTPUT

Expand Down Expand Up @@ -133,13 +132,8 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once

- name: Publish to GitHub Packages Central
run: |
modules=("bom")
dependency_management_block=$(grep -ozP '<dependencyManagement>(\r|\n|.)*<\/dependencyManagement>' 'bom/pom.xml' | tr -d '\0')
modules+=($(echo $dependency_management_block | grep -oP '(?<=<artifactId>)[^<]+'))
printf -v modules_joined '%s,' "${modules[@]}"
modules_arg=$(echo "${modules_joined%,}")
./mvnw -B deploy -pl "$modules_arg" -am -T2C -P publish -DskipTests -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
run: ../mvnw -B deploy -P publish -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
working-directory: src
env:
PACKAGES_CENTRAL_TOKEN: ${{ secrets.PACKAGES_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
Expand All @@ -155,19 +149,14 @@ jobs:
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Publish to Central Portal
run: |
modules=("bom")
dependency_management_block=$(grep -ozP '<dependencyManagement>(\r|\n|.)*<\/dependencyManagement>' 'bom/pom.xml' | tr -d '\0')
modules+=($(echo $dependency_management_block | grep -oP '(?<=<artifactId>)[^<]+'))
printf -v modules_joined '%s,' "${modules[@]}"
modules_arg=$(echo "${modules_joined%,}")
./mvnw -B deploy -pl "$modules_arg" -am -T2C -P publish,publish-sonatype-central-portal -DskipTests
run: ../mvnw -B deploy -P publish,publish-sonatype-central-portal
working-directory: src
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

publish-pages:
build-pages:
runs-on: ubuntu-latest
needs: [prepare-release]
timeout-minutes: 15
Expand Down Expand Up @@ -196,29 +185,57 @@ jobs:
${{ runner.os }}-mvn-build-

- name: Build site
run: ./mvnw -B compile site -DskipTests -T2C
run: ../mvnw -B compile site -P site -T2C
working-directory: src

- name: Aggregate site
run: |
modules=($(grep -ozP '(?<=module>)[^<]+' 'pom.xml' | tr -d '\0'))
for m in "${modules[@]}"
module_dirs=$(../mvnw -B -q --also-make exec:exec -Dexec.executable="pwd")
for m in "${module_dirs[@]}"
do
echo "$m/target/site -> ./target/$m"
mkdir -p ./target/$m
cp -r $m/target/site ./target/$m
echo "$m/target/site -> ./target/$m"
mkdir -p ./target/$m
cp -r $m/target/site ./target/$m
done
working-directory: src

- name: Upload pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: src/target/site

- name: Deploy to Github pages
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/site
publish_dir: ./src/target/site
force_orphan: true

deploy-pages:
runs-on: ubuntu-latest
needs: [build-pages]
timeout-minutes: 10
concurrency:
group: 'pages'
cancel-in-progress: false
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5

after-release:
runs-on: ubuntu-latest
needs: [publish-maven]
timeout-minutes: 10
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v7

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
echo "Java UseAVX: ${java_useavx}"

./mvnw -B test \
-pl "demo/integration-tests/${{ matrix.project }}" -am \
-pl "demos/demo/integration-tests/${{ matrix.project }}" -am \
-P run-it \
-Dlicense.skip \
-Dtci.image-build.delete-on-exit=true \
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
uses: actions/upload-artifact@v7
with:
name: test-fail-videos-${{ matrix.java }}-${{ env.PROJECT_NORMALIZED }}-${{ matrix.parallel }}-${{ matrix.pre-start }}
path: demo/integration-tests/${{ matrix.project }}/target/records
path: demos/demo/integration-tests/${{ matrix.project }}/target/records
if-no-files-found: ignore

- name: Wait for async jobs to finish
Expand Down
18 changes: 4 additions & 14 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,8 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once

- name: Publish to GitHub Packages Central
run: |
modules=("bom")
dependency_management_block=$(grep -ozP '<dependencyManagement>(\r|\n|.)*<\/dependencyManagement>' 'bom/pom.xml' | tr -d '\0')
modules+=($(echo $dependency_management_block | grep -oP '(?<=<artifactId>)[^<]+'))
printf -v modules_joined '%s,' "${modules[@]}"
modules_arg=$(echo "${modules_joined%,}")
./mvnw -B deploy -pl "$modules_arg" -am -T2C -P publish -DskipTests -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
run: ../mvnw -B deploy -P publish -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
working-directory: src
env:
PACKAGES_CENTRAL_TOKEN: ${{ secrets.PACKAGES_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
Expand All @@ -43,13 +38,8 @@ jobs:
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Publish to Central Portal
run: |
modules=("bom")
dependency_management_block=$(grep -ozP '<dependencyManagement>(\r|\n|.)*<\/dependencyManagement>' 'bom/pom.xml' | tr -d '\0')
modules+=($(echo $dependency_management_block | grep -oP '(?<=<artifactId>)[^<]+'))
printf -v modules_joined '%s,' "${modules[@]}"
modules_arg=$(echo "${modules_joined%,}")
./mvnw -B deploy -pl "$modules_arg" -am -T2C -P publish,publish-sonatype-central-portal -DskipTests
run: ../mvnw -B deploy -P publish,publish-sonatype-central-portal
working-directory: src
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_TOKEN }}
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,34 @@ Nearly everything can be overridden with a custom implementation or disabled if

Please note that more detailed descriptions are available in the individual modules.

* [bom](./bom/)
* [bom](./src/bom/)
* Bill of Materials for easier version management
* [oauth2-oidc](./oauth2-oidc/)
* [oauth2-oidc](./src/oauth2-oidc/)
* Revalidates the login periodically
* Communicates logouts to the frontend
* Makes it possible to automatically reselect the last login provider
* [oauth2-oidc-remember-me](./oauth2-oidc-remember-me/)
* [oauth2-oidc-remember-me](./src/oauth2-oidc-remember-me/)
* Stores, manages and encrypts OIDC login information safely in a distributed system
* [vaadin](./vaadin/)
* [vaadin](./src/vaadin/)
* Full Spring Security control before Vaadin handles requests
* Creates Vaadin sessions only when needed
* CSRF request whitelisting
* Built-in Content Security Policy
* [web](./web/)
* [web](./src/web/)
* Stores the used login url
* Determines if Cookies should be secured
* [web-sidecar-actuator](./web-sidecar-actuator/)
* [web-sidecar-actuator](./src/web-sidecar-actuator/)
* Secures Spring Boot's Actuator
* Multi-User support
* Allows securing different endpoints per user
* Only password hashes are stored on the server side
* [web-sidecar-common](./web-sidecar-common/)
* [web-sidecar-common](./src/web-sidecar-common/)
* Host static resources without creating sessions
* Prevent unwanted requests from reaching the underlying app/servlet
* Ensures that error pages are accessible

## Usage
Some example use-cases (with integration tests) are available in the [demo](./demo).
Some example use-cases (with integration tests) are available in the [demo](./demos/demo).

Otherwise please have a look at the corresponding modules and their (Java) docs.

Expand Down
Loading
Loading