Skip to content

Commit

Permalink
Fix #1016: Inconsistent columns for signature metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
romanstrobl committed Sep 7, 2023
1 parent 2ca408c commit 994a1ac
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
9 changes: 3 additions & 6 deletions docs/PowerAuth-Server-1.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,20 @@ In 1.5.x, we definitely removed the legacy V2 protocol support and only support
### Add Signature Data in an Easy to Parse Structure

Add following columns:
- `signature_data_method` - HTTP method used for the signature verification
- `signature_data_uri_id` - identifier of given URI of the resource used for the signature verification
- `signature_metadata` - metadata related to the signature calculation
- `signature_data_body` - data used for the signature verification

#### PostgreSQL

```sql
ALTER TABLE pa_signature_audit ADD COLUMN signature_data_method VARCHAR(32);
ALTER TABLE pa_signature_audit ADD COLUMN signature_data_uri_id VARCHAR(255);
ALTER TABLE pa_signature_audit ADD COLUMN signature_metadata TEXT;
ALTER TABLE pa_signature_audit ADD COLUMN signature_data_body TEXT;
```

#### Oracle

```sql
ALTER TABLE PA_SIGNATURE_AUDIT ADD COLUMN SIGNATURE_DATA_METHOD VARCHAR2(32 CHAR);
ALTER TABLE PA_SIGNATURE_AUDIT ADD COLUMN SIGNATURE_DATA_URI_ID VARCHAR2(255 CHAR);
ALTER TABLE PA_SIGNATURE_AUDIT ADD COLUMN SIGNATURE_METADATA CLOB;
ALTER TABLE PA_SIGNATURE_AUDIT ADD COLUMN SIGNATURE_DATA_BODY CLOB;
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<columnExists tableName="pa_operation" columnName="totp_seed"/>
</not>
</preConditions>
<comment>Add signature_data_method column</comment>
<comment>Add totp_seed column</comment>
<addColumn tableName="pa_operation">
<column name="totp_seed" type="varchar(24)" />
</addColumn>
Expand All @@ -21,7 +21,7 @@
<columnExists tableName="pa_operation_template" columnName="proximity_check_enabled"/>
</not>
</preConditions>
<comment>Add signature_data_method column</comment>
<comment>Add proximity_check_enabled column</comment>
<addColumn tableName="pa_operation_template">
<column name="proximity_check_enabled" type="boolean" defaultValueBoolean="false">
<constraints nullable="false" />
Expand Down
3 changes: 1 addition & 2 deletions docs/sql/oracle/create_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ CREATE TABLE "PA_SIGNATURE_AUDIT"
"NOTE" VARCHAR2(255 CHAR),
"SIGNATURE_TYPE" VARCHAR2(255 CHAR) NOT NULL,
"SIGNATURE" VARCHAR2(255 CHAR) NOT NULL,
"SIGNATURE_DATA_METHOD" VARCHAR2(32 CHAR),
"SIGNATURE_DATA_URI_ID" VARCHAR2(255 CHAR),
"SIGNATURE_METADATA" CLOB,
"SIGNATURE_DATA_BODY" CLOB,
"TIMESTAMP_CREATED" TIMESTAMP (6) NOT NULL,
"VALID" NUMBER(1,0) DEFAULT 0 NOT NULL,
Expand Down
3 changes: 1 addition & 2 deletions docs/sql/postgresql/create_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ CREATE TABLE pa_signature_audit
note VARCHAR(255),
signature_type VARCHAR(255) NOT NULL,
signature VARCHAR(255) NOT NULL,
signature_data_method VARCHAR(32),
signature_data_uri_id VARCHAR(255),
signature_metadata TEXT,
signature_data_body TEXT,
timestamp_created TIMESTAMP (6) NOT NULL,
valid BOOLEAN,
Expand Down

0 comments on commit 994a1ac

Please sign in to comment.