Skip to content

Commit

Permalink
Merge pull request #677 from /issues/676-prepare-release
Browse files Browse the repository at this point in the history
Fix #676: Prepare release 1.2.5
  • Loading branch information
romanstrobl authored Apr 1, 2022
2 parents bf3862e + 364b343 commit f097c7e
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 13 deletions.
143 changes: 142 additions & 1 deletion docs/PowerAuth-Server-1.3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,145 @@ ALTER TABLE pa_operation ADD template_name VARCHAR(255) NULL;
ALTER TABLE pa_operation ADD activation_flag VARCHAR(255) NULL;

ALTER TABLE pa_operation ADD additional_data TEXT NULL;
```
```

## Create Auditing Tables

Create tables for auditing:
- `audit_log` - table used to store audit logs
- `audit_param` - table used to store detailed parameters for audit logs

### Oracle

```sql
--
-- Create audit log table.
--
CREATE TABLE audit_log (
audit_log_id VARCHAR2(36 CHAR) PRIMARY KEY,
application_name VARCHAR2(256 CHAR) NOT NULL,
audit_level VARCHAR2(32 CHAR) NOT NULL,
audit_type VARCHAR2(256 CHAR),
timestamp_created TIMESTAMP,
message CLOB NOT NULL,
exception_message CLOB,
stack_trace CLOB,
param CLOB,
calling_class VARCHAR2(256 CHAR) NOT NULL,
thread_name VARCHAR2(256 CHAR) NOT NULL,
version VARCHAR2(256 CHAR),
build_time TIMESTAMP
);

--
-- Create audit parameters table.
--
CREATE TABLE audit_param (
audit_log_id VARCHAR2(36 CHAR),
timestamp_created TIMESTAMP,
param_key VARCHAR2(256 CHAR),
param_value VARCHAR2(4000 CHAR)
);

--
-- Create indexes.
--
CREATE INDEX audit_log_timestamp ON audit_log (timestamp_created);
CREATE INDEX audit_log_application ON audit_log (application_name);
CREATE INDEX audit_log_level ON audit_log (audit_level);
CREATE INDEX audit_log_type ON audit_log (audit_type);
CREATE INDEX audit_param_log ON audit_param (audit_log_id);
CREATE INDEX audit_param_timestamp ON audit_param (timestamp_created);
CREATE INDEX audit_param_key ON audit_param (param_key);
CREATE INDEX audit_param_value ON audit_param (param_value);
```

### PostgreSQL

```sql
--
-- Create audit log table.
--
CREATE TABLE audit_log (
audit_log_id VARCHAR(36) PRIMARY KEY,
application_name VARCHAR(256) NOT NULL,
audit_level VARCHAR(32) NOT NULL,
audit_type VARCHAR(256),
timestamp_created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
message TEXT NOT NULL,
exception_message TEXT,
stack_trace TEXT,
param TEXT,
calling_class VARCHAR(256) NOT NULL,
thread_name VARCHAR(256) NOT NULL,
version VARCHAR(256),
build_time TIMESTAMP
);

--
-- Create audit parameters table.
--
CREATE TABLE audit_param (
audit_log_id VARCHAR(36),
timestamp_created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
param_key VARCHAR(256),
param_value VARCHAR(4000)
);

--
-- Create indexes.
--
CREATE INDEX audit_log_timestamp ON audit_log (timestamp_created);
CREATE INDEX audit_log_application ON audit_log (application_name);
CREATE INDEX audit_log_level ON audit_log (audit_level);
CREATE INDEX audit_log_type ON audit_log (audit_type);
CREATE INDEX audit_param_log ON audit_param (audit_log_id);
CREATE INDEX audit_param_timestamp ON audit_param (timestamp_created);
CREATE INDEX audit_param_key ON audit_param (param_key);
CREATE INDEX audit_param_value ON audit_param (param_value);
```

### MySQL

```sql
--
-- Create audit log table.
--
CREATE TABLE audit_log (
audit_log_id VARCHAR(36) PRIMARY KEY,
application_name VARCHAR(256) NOT NULL,
audit_level VARCHAR(32) NOT NULL,
audit_type VARCHAR(256),
timestamp_created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
message TEXT NOT NULL,
exception_message TEXT,
stack_trace TEXT,
param TEXT,
calling_class VARCHAR(256) NOT NULL,
thread_name VARCHAR(256) NOT NULL,
version VARCHAR(256),
build_time TIMESTAMP NULL
) ENGINE=InnoDB AUTO_INCREMENT=1 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

--
-- Create audit parameters table.
--
CREATE TABLE audit_param (
audit_log_id VARCHAR(36),
timestamp_created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
param_key VARCHAR(256),
param_value VARCHAR(3072)
) ENGINE=InnoDB AUTO_INCREMENT=1 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

--
-- Create indexes.
--
CREATE INDEX audit_log_timestamp ON audit_log (timestamp_created);
CREATE INDEX audit_log_application ON audit_log (application_name);
CREATE INDEX audit_log_level ON audit_log (audit_level);
CREATE INDEX audit_log_type ON audit_log (audit_type);
CREATE INDEX audit_param_log ON audit_param (audit_log_id);
CREATE INDEX audit_param_timestamp ON audit_param (timestamp_created);
CREATE INDEX audit_param_key ON audit_param (param_key);
CREATE FULLTEXT INDEX audit_param_value ON audit_param (param_value);
```
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@

<groupId>io.getlime.security</groupId>
<artifactId>powerauth-server-parent</artifactId>
<version>1.2.5-SNAPSHOT</version>
<version>1.2.5</version>
<packaging>pom</packaging>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.5</version>
<version>2.6.6</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

Expand Down Expand Up @@ -114,10 +114,10 @@

<!-- Test Dependencies -->
<junit-jupiter-engine.version>5.8.2</junit-jupiter-engine.version>
<h2.version>1.4.197</h2.version> <!-- Tests fail in version 1.4.200, upgrade reverted -->
<h2.version>2.1.210</h2.version>

<!-- Other Dependencies -->
<jackson.version>2.13.2.1</jackson.version>
<jackson.version>2.13.2.2</jackson.version>
<commons-text.version>1.9</commons-text.version>

</properties>
Expand Down
4 changes: 2 additions & 2 deletions powerauth-client-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>powerauth-client-model</artifactId>
<version>1.2.5-SNAPSHOT</version>
<version>1.2.5</version>
<name>powerauth-client-model</name>
<description>PowerAuth Server Client Model</description>

<parent>
<groupId>io.getlime.security</groupId>
<artifactId>powerauth-server-parent</artifactId>
<version>1.2.5-SNAPSHOT</version>
<version>1.2.5</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
6 changes: 3 additions & 3 deletions powerauth-java-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
<name>powerauth-java-server</name>
<description>PowerAuth Server</description>
<artifactId>powerauth-java-server</artifactId>
<version>1.2.5-SNAPSHOT</version>
<version>1.2.5</version>
<packaging>war</packaging>

<parent>
<groupId>io.getlime.security</groupId>
<artifactId>powerauth-server-parent</artifactId>
<version>1.2.5-SNAPSHOT</version>
<version>1.2.5</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -112,7 +112,7 @@
<dependency>
<groupId>io.getlime.security</groupId>
<artifactId>powerauth-client-model</artifactId>
<version>1.2.5-SNAPSHOT</version>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>io.getlime.security</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ spring.datasource.url=jdbc:h2:file:~/powerauth
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.driver-class-name=org.h2.Driver
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect

# Hibernate Configuration
spring.jpa.hibernate.ddl-auto=create-drop
Expand Down
6 changes: 3 additions & 3 deletions powerauth-rest-client-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>powerauth-rest-client-spring</artifactId>
<version>1.2.5-SNAPSHOT</version>
<version>1.2.5</version>
<name>powerauth-rest-client-spring</name>
<description>PowerAuth Server REST Service Client</description>

<parent>
<groupId>io.getlime.security</groupId>
<artifactId>powerauth-server-parent</artifactId>
<version>1.2.5-SNAPSHOT</version>
<version>1.2.5</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -38,7 +38,7 @@
<dependency>
<groupId>io.getlime.security</groupId>
<artifactId>powerauth-client-model</artifactId>
<version>1.2.5-SNAPSHOT</version>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>io.getlime.core</groupId>
Expand Down

0 comments on commit f097c7e

Please sign in to comment.