Skip to content

Commit

Permalink
Merge pull request #370 from wultra/develop
Browse files Browse the repository at this point in the history
Merge develop to master
  • Loading branch information
banterCZ authored Apr 10, 2024
2 parents aa99b1d + 2e6bd13 commit 9fc53e1
Show file tree
Hide file tree
Showing 75 changed files with 3,728 additions and 976 deletions.
48 changes: 37 additions & 11 deletions .github/workflows/develop_pa-test-internal-testserver-app.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy container app to Azure Web App - pa-test-internal-testserver-app
name: Build and deploy container app to Container Registries

on:
push:
branches:
- develop
workflow_dispatch:

inputs:
jfrog_deploy:
type: boolean
description: Check if build image should be uploaded to JFrog
default: false
required: false
jobs:
build:
runs-on: 'ubuntu-latest'
environment: test

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
server-id: jfrog-central
server-username: INTERNAL_USERNAME
server-password: INTERNAL_PASSWORD
cache: maven
- name: Set Timestamp for docker image tag
- name: Set Timestamp for docker image for development branch
if: github.ref == 'refs/heads/develop'
run: echo "TIMESTAMP=-$(date +%Y.%m.%d)" >> $GITHUB_ENV
- name: Get Powerauth Test Server version
run: |
Expand All @@ -42,9 +48,9 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to registry
- name: Log in to ACR
if: ${{ github.actor != 'dependabot[bot]' }}
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: https://powerauthextendedtest.azurecr.io/
username: ${{ secrets.AZUREAPPSERVICE_CONTAINERUSERNAME }}
Expand All @@ -53,12 +59,32 @@ jobs:
run: |
cd powerauth-test-server
./copy_liquibase.sh
- name: Build and push container image to registry
uses: docker/build-push-action@v2
- name: Build and push container image to ACR
uses: docker/build-push-action@v5
with:
push: ${{ github.actor != 'dependabot[bot]' }}
platforms: linux/amd64,linux/arm64
tags: powerauthextendedtest.azurecr.io/powerauth-test-server:${{ env.REVISION }}${{ env.TIMESTAMP }}-${{ github.sha }}
file: ./powerauth-test-server/Dockerfile
context: ./powerauth-test-server/

cache-from: type=gha
cache-to: type=gha,mode=max
- name: Log in to JFrog
if: ${{ github.event_name == 'workflow_dispatch' && inputs.jfrog_deploy == true }}
uses: docker/login-action@v3
with:
registry: https://wultra.jfrog.io/
username: ${{ secrets.JFROG_CONTAINER_REGISTRY_USERNAME }}
password: ${{ secrets.JFROG_CONTAINER_REGISTRY_PASSWORD }}
- name: Build and push container image to JFrog
if: ${{ github.event_name == 'workflow_dispatch' && inputs.jfrog_deploy == true }}
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name == 'workflow_dispatch' && inputs.jfrog_deploy == true }}
platforms: linux/amd64,linux/arm64
tags: wultra.jfrog.io/wultra-docker/powerauth-test-server:${{ env.REVISION }}${{ env.TIMESTAMP }}
file: ./powerauth-test-server/Dockerfile
context: ./powerauth-test-server/
cache-from: type=gha
cache-to: type=gha,mode=max

22 changes: 22 additions & 0 deletions .github/workflows/maven-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Deploy with Maven

on:
workflow_dispatch:
branches:
- 'develop'
- 'master'
- 'releases/*'

jobs:
maven-deploy-manual:
if: ${{ github.event_name == 'workflow_dispatch' }}
name: Manual deploy
uses: wultra/wultra-infrastructure/.github/workflows/maven-deploy.yml@develop
with:
environment: internal-publish
release_type: snapshot
directory_path: ./powerauth-test-server
java_version: 21
secrets:
username: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
10 changes: 5 additions & 5 deletions .github/workflows/maven-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
runs-on: ubuntu-latest
environment: ${{ inputs.environment || 'dev' }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'temurin'
server-id: jfrog-central
server-username: INTERNAL_USERNAME
Expand All @@ -46,7 +46,7 @@ jobs:
POWERAUTH_SERVICE_SECURITY_CLIENTSECRET: ${{ secrets.POWERAUTH_SERVICE_SECURITY_CLIENTSECRET }}
POWERAUTH_TEST_INCLUDECUSTOMTESTS: ${{ inputs.includeCustomTests == '' || inputs.includeCustomTests }} # default includeCustomTests=true even for 'schedule' event
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
uses: mikepenz/action-junit-report@v4
if: always()
with:
detailed_summary: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/maven-test-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK ${{ inputs.java_version }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
server-id: jfrog-central
server-username: INTERNAL_USERNAME
Expand Down
14 changes: 14 additions & 0 deletions .run/PowerauthFido2TestApplication.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="PowerauthFido2TestApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<option name="ACTIVE_PROFILES" value="dev" />
<option name="DEBUG_MODE" value="true" />
<module name="powerauth-fido2-tests" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.wultra.security.powerauth.fido2.PowerauthFido2TestApplication" />
<option name="VM_PARAMETERS" value="-Dserver.servlet.context-path=/powerauth-fido2-test -Dserver.port=8083" />
<option name="WORKING_DIRECTORY" value="file://$MODULE_WORKING_DIR$" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="true" file="$PROJECT_DIR$/pom.xml" goal="process-resources" />
</method>
</configuration>
</component>
9 changes: 9 additions & 0 deletions docs-private/Developer-How-To-Start.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ Others (like URL, username, password) depend on your environment.
```shell
liquibase --changelog-file=./docs/db/changelog/changesets/powerauth-test-server/db.changelog-module.xml --url=jdbc:postgresql://localhost:5432/powerauth --username=powerauth status
```

## PowerAuth FIDO2 Tests

### Standalone Run

- Enable maven profile `standalone`
- Use IntelliJ Idea run configuration at `../.run/PowerAuthFido2TestApplication.run.xml`
- Open [http://localhost:8083/powerauth-fido2-test/actuator/health](http://localhost:8083/powerauth-fido2-test/actuator/health) and you should get `{"status":"UP"}`

1 change: 1 addition & 0 deletions lombok.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lombok.log.fieldName=logger
40 changes: 26 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.6</version>
<version>3.2.4</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

<groupId>com.wultra</groupId>
<artifactId>powerauth-backend-tests-parent</artifactId>
<version>1.6.0</version>
<version>1.7.0</version>
<packaging>pom</packaging>

<description>Parent pom for backend tests</description>
Expand Down Expand Up @@ -45,22 +45,25 @@
</developers>

<properties>
<enrollment-server.version>1.6.0</enrollment-server.version>
<powerauth-cmd.version>1.6.0</powerauth-cmd.version>
<powerauth-crypto.version>1.6.0</powerauth-crypto.version>
<powerauth-restful-integration.version>1.6.0</powerauth-restful-integration.version>
<powerauth-webflow.version>1.6.0</powerauth-webflow.version>
<wultra-core.version>1.8.0</wultra-core.version>
<enrollment-server.version>1.7.0</enrollment-server.version>
<powerauth-cmd.version>1.7.0</powerauth-cmd.version>
<powerauth-crypto.version>1.7.0</powerauth-crypto.version>
<powerauth-restful-integration.version>1.7.0</powerauth-restful-integration.version>
<powerauth-server.version>1.7.0</powerauth-server.version>
<powerauth-webflow.version>1.7.0</powerauth-webflow.version>
<wultra-core.version>1.9.0</wultra-core.version>

<bc.version>1.77</bc.version>
<springdoc-openapi-starter-webmvc-ui.version>2.3.0</springdoc-openapi-starter-webmvc-ui.version>
<springdoc-openapi-starter-webmvc-ui.version>2.5.0</springdoc-openapi-starter-webmvc-ui.version>
<logstash.version>7.4</logstash.version>
<!-- TODO (racansky, 2023-12-08) temporarily override the version 1.4.11 from spring boot version because of CVE -->
<logback.version>1.4.14</logback.version>
<webauthn4j.version>0.23.0.RELEASE</webauthn4j.version>

<maven.deploy.skip>true</maven.deploy.skip>
</properties>

<modules>
<module>powerauth-backend-tests</module>
<module>powerauth-fido2-tests</module>
<module>powerauth-load-tests</module>
<module>powerauth-test-server</module>
<module>powerauth-webflow-tests</module>
Expand Down Expand Up @@ -183,6 +186,18 @@
<value>true</value>
</property>
</activation>
<distributionManagement>
<repository>
<id>jfrog-central</id>
<name>Wultra Artifactory-releases</name>
<url>https://wultra.jfrog.io/artifactory/internal-maven-repository</url>
</repository>
<snapshotRepository>
<id>jfrog-central</id>
<name>Wultra Artifactory-snapshots</name>
<url>https://wultra.jfrog.io/artifactory/internal-maven-repository</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<repository>
<id>jfrog-central</id>
Expand Down Expand Up @@ -218,9 +233,6 @@
<name>!useInternalRepo</name>
</property>
</activation>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
<repositories>
<repository>
<id>ossrh-snapshots</id>
Expand Down
2 changes: 0 additions & 2 deletions powerauth-backend-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ File `powerauth-java.server.xml`:
<Parameter name="spring.datasource.url" value="jdbc:postgresql://localhost:5432/powerauth"/>
<Parameter name="spring.datasource.username" value="powerauth"/>
<Parameter name="spring.datasource.password" value="[PASSWORD]"/>
<Parameter name="spring.datasource.driver-class-name" value="org.postgresql.Driver"/>
</Context>
```

Expand All @@ -71,7 +70,6 @@ File `enrollment-server.xml`:
<Parameter name="spring.datasource.url" value="jdbc:postgresql://localhost:5432/powerauth"/>
<Parameter name="spring.datasource.username" value="powerauth"/>
<Parameter name="spring.datasource.password" value="[PASSWORD]"/>
<Parameter name="spring.datasource.driver-class-name" value="org.postgresql.Driver"/>
<Parameter name="spring.jpa.database-platform" value="org.hibernate.dialect.PostgreSQLDialect"/>
<Parameter name="powerauth.service.url" value="http://localhost:8080/powerauth-java-server/rest"/>
<Parameter name="enrollment-server.activation-spawn.enabled" value="true"/>
Expand Down
2 changes: 1 addition & 1 deletion powerauth-backend-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>com.wultra</groupId>
<artifactId>powerauth-backend-tests-parent</artifactId>
<version>1.6.0</version>
<version>1.7.0</version>
</parent>

<groupId>com.wultra</groupId>
Expand Down
Loading

0 comments on commit 9fc53e1

Please sign in to comment.