Skip to content

Commit

Permalink
Merge pull request #1577 from wultra/develop
Browse files Browse the repository at this point in the history
Merge develop to master
  • Loading branch information
banterCZ authored Jul 26, 2024
2 parents 0a67979 + 2bbe65f commit c299762
Show file tree
Hide file tree
Showing 270 changed files with 11,036 additions and 11,302 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ updates:
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
# Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.)
directory: "/"
schedule:
interval: "weekly"
3 changes: 0 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
workflow_dispatch:
push:
branches: [ 'develop', 'master', 'releases/**' ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ 'develop', 'master', 'releases/**' ]
schedule:
- cron: '0 2 * * 4'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scp-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
cache: maven
- name: Run Maven Package Step
run: |
mvn -B -U package -Dmaven.test.skip=true
mvn -B -U package -Dmaven.test.skip=true -DuseInternalRepo=true
env:
INTERNAL_USERNAME: ${{ secrets.JFROG_USERNAME }}
INTERNAL_PASSWORD: ${{ secrets.JFROG_PASSWORD }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ dist/

### JRebel
rebel.xml

docs-private/schema_crawler/
70 changes: 70 additions & 0 deletions docs-private/Developer-How-To-Start.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,81 @@ liquibase --changelog-file=./docs/db/changelog/changesets/powerauth-java-server/

To generate SQL script run this command.


#### Oracle

```shell
liquibase --changeLogFile=./docs/db/changelog/changesets/powerauth-java-server/db.changelog-module.xml --output-file=./docs/sql/oracle/generated-oracle-script.sql updateSQL --url=offline:oracle
```


#### MS SQL

```shell
liquibase --changeLogFile=./docs/db/changelog/changesets/powerauth-java-server/db.changelog-module.xml --output-file=./docs/sql/mssql/generated-mssql-script.sql updateSQL --url=offline:mssql
```


#### PostgreSQL

```shell
liquibase --changeLogFile=./docs/db/changelog/changesets/powerauth-java-server/db.changelog-module.xml --output-file=./docs/sql/postgresql/generated-postgresql-script.sql updateSQL --url=offline:postgresql
```

### Schema Diagram

To generate diagram of the database schema, use [SchemaCrawler](https://www.schemacrawler.com/) tool. Unfortunately,
the SchemaCrawler cannot be installed via a package manager for MacOS. You can either use the [docker image](https://www.schemacrawler.com/docker-image.html)
or get the tool from their [releases page](https://github.com/schemacrawler/SchemaCrawler/releases). Note, that
the SchemaCrawler diagram generation depends on `graphviz`, which is available via `brew` package manager.

To install graphviz and download SchemaCrawler run:

```shell
SC_VERSION='16.21.4' && \
brew install graphviz && \
curl -Lo schemacrawler.zip "https://github.com/schemacrawler/SchemaCrawler/releases/download/v${SC_VERSION}/schemacrawler-${SC_VERSION}-distribution.zip" && \
unzip schemacrawler.zip && \
rm schemacrawler.zip && \
mv "schemacrawler-${SC_VERSION}-distribution" schema_crawler
```

There are two config files for the SchemaCrawler, which should be modified.
To modify the configuration, run:

```shell
SC_CONFIG_DIR="./schema_crawler/_schemacrawler/config" && \
SC_CONFIG='
# Hide public. prefix from the table names
schemacrawler.format.show_unqualified_names=true
# Hide SchemaCrawler details
schemacrawler.format.no_schemacrawler_info=true
# Output PNG resolution
schemacrawler.graph.graphviz_opts=-Gsize=7 -Gdpi=300' && \
SC_COLORMAP='
# Set header color for all tables
0099FF=.*' && \
echo "$SC_CONFIG" >> "${SC_CONFIG_DIR}/schemacrawler.config.properties" && \
echo "$SC_COLORMAP" >> "${SC_CONFIG_DIR}/schemacrawler.colormap.properties"
```

Then to generate the schema diagram, run following:

```shell
./schema_crawler/_schemacrawler/bin/schemacrawler.sh \
--server=postgresql \
--host=localhost \
--port=5432 \
--database=powerauth \
--schemas=public \
--user=powerauth \
--info-level=standard \
--command=schema \
--output-format=png \
--output-file="../docs/images/arch_db_structure.png" \
--tables='public.pa_(?!cloud|test).*'
```

## PowerAuth Admin Server


Expand Down
2 changes: 1 addition & 1 deletion docs/Admin-Deploying-Wildfly.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PowerAuth Admin contains the following configuration in `jboss-deployment-struct

```xml
<?xml version="1.0"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.3">
<deployment>
<exclude-subsystems>
<!-- disable the logging subsystem because the application manages its own logging independently -->
Expand Down
4 changes: 4 additions & 0 deletions docs/Configuration-Properties-Admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,9 @@ The PowerAuth Admin application uses the following public configuration properti

## Monitoring and Observability

| Property | Default | Note |
|-------------------------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `management.tracing.sampling.probability` | `1.0` | Specifies the proportion of requests that are sampled for tracing. A value of 1.0 means that 100% of requests are sampled, while a value of 0 effectively disables tracing. |

The WAR file includes the `micrometer-registry-prometheus` dependency.
Discuss its configuration with the [Spring Boot documentation](https://docs.spring.io/spring-boot/docs/3.1.x/reference/html/actuator.html#actuator.metrics).
2 changes: 2 additions & 0 deletions docs/Configuration-Properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ The PowerAuth Server uses the following public configuration properties:


## Monitoring and Observability

| Property | Default | Note |
|-------------------------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `management.tracing.sampling.probability` | `1.0` | Specifies the proportion of requests that are sampled for tracing. A value of 1.0 means that 100% of requests are sampled, while a value of 0 effectively disables tracing. |
Expand All @@ -82,6 +83,7 @@ Discuss its configuration with the [Spring Boot documentation](https://docs.spri
| Property | Default | Note |
|-----------------------------------------------------------------------------|-----------|----------------------------------------------------------------------------------------------------|
| `powerauth.service.scheduled.job.operationCleanup` | `5000` | Time delay in milliseconds between two consecutive tasks that expire long pending operations. |
| `powerauth.service.scheduled.job.expireOperationsLimit` | `100` | Number of long pending operations that will be set expired in single scheduled job run. |
| `powerauth.service.scheduled.job.activationsCleanup` | `5000` | Time delay in milliseconds between two consecutive tasks that expire abandoned activations. |
| `powerauth.service.scheduled.job.activationsCleanup.lookBackInMilliseconds` | `3600000` | Number of milliseconds to look back in the past when looking for abandoned activations. |
| `powerauth.service.scheduled.job.uniqueValueCleanup` | `60000` | Time delay in milliseconds between two consecutive tasks that delete expired unique values. |
Expand Down
Loading

0 comments on commit c299762

Please sign in to comment.