Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop to master #1578

Merged
merged 75 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
1b345db
Bump com.github.eirslett:frontend-maven-plugin from 1.11.2 to 1.15.0
dependabot[bot] Dec 11, 2023
496806a
Bump org.springframework.boot:spring-boot-starter-parent
dependabot[bot] Jan 2, 2024
aa25927
Revert "Fix #1493: Update logback"
banterCZ Jan 2, 2024
f5c69ed
Fix #1535: Remove Guava dependency
banterCZ Jan 5, 2024
aa246d6
Fix #1541: Update Wultra dependencies to SNAPSHOT
banterCZ Jan 8, 2024
13d2bfd
Fix #1507: Set develop version to 1.7.0-SNAPSHOT
banterCZ Jan 16, 2024
c8a8962
Merge pull request #1547 from wultra/issues/1507-version-1.7.0-SNAPSHOT
banterCZ Jan 16, 2024
196aa34
Merge pull request #1542 from wultra/issues/1541-wultra-snapshots
banterCZ Jan 16, 2024
ab8e87a
Merge pull request #1536 from wultra/dependabot/maven/org.springframe…
dependabot[bot] Jan 16, 2024
ba2301a
Merge pull request #1537 from wultra/issues/1535-remove-guava
banterCZ Jan 16, 2024
2750b57
Fix #1548: OTP cannot be created without userId (#1549)
zcgandcomp Jan 17, 2024
3214e0d
Fix #1548: OTP cannot be created without userId Oracle script
zcgandcomp Jan 17, 2024
e027831
Merge pull request #1551 from wultra/issues/1548-otp-nullable-oracle-…
zcgandcomp Jan 17, 2024
38d24d2
Bump org.springframework.boot:spring-boot-starter-parent
dependabot[bot] Jan 22, 2024
8bce232
Merge pull request #1553 from wultra/dependabot/maven/org.springframe…
dependabot[bot] Jan 22, 2024
faf65bd
Fix #1555: create_schema.sql in 1.6.0 branch is not valid
zcgandcomp Jan 25, 2024
750b1ab
Merge pull request #1556 from wultra/issues/1555-invalid-create-schem…
zcgandcomp Jan 25, 2024
b742e37
Fix #1561: Refactor CreateDeviceRequest#platform into enum
banterCZ Jan 29, 2024
46c19f1
Merge pull request #1562 from wultra/issues/1561-CreateDeviceRequest-…
banterCZ Jan 29, 2024
e789826
Bump org.javamoney.moneta:moneta-core from 1.4.2 to 1.4.4
dependabot[bot] Jan 29, 2024
2d96ff7
Merge pull request #1558 from wultra/dependabot/maven/org.javamoney.m…
dependabot[bot] Jan 29, 2024
189f878
Bump zxing.version from 3.5.2 to 3.5.3
dependabot[bot] Feb 5, 2024
4df4f3b
Merge pull request #1563 from wultra/dependabot/maven/zxing.version-3…
dependabot[bot] Feb 5, 2024
1de1a41
Fix #1564: Add TraceID/SpanID to Monitoring for Enhanced Observabilit…
jandusil Feb 6, 2024
9630485
Fix #1566: Remove spring.datasource.driverClassName from app props (#…
jandusil Feb 6, 2024
41a84d1
Fix #1572: Handle explicit null JSON value in final fields
banterCZ Feb 8, 2024
de5499f
Fix #1568: NextStep OpenID Connect (OIDC) Support (#1570)
banterCZ Feb 9, 2024
6ecf88c
Merge pull request #1573 from wultra/issues/1572-json-null
banterCZ Feb 9, 2024
aca4ad8
Fix #1574: Remove spring-ws-security dependency
banterCZ Feb 12, 2024
509b0c8
Merge pull request #1575 from wultra/issues/1574-remove-spring-ws-sec…
banterCZ Feb 13, 2024
2efd320
Fix #1576: UserProfileController returns Internal Server Error if Pri…
banterCZ Feb 13, 2024
117525f
Merge pull request #1577 from wultra/issues/1576-UserProfileControlle…
banterCZ Feb 13, 2024
58acf77
Fix #1569: NextStep Home Page (#1571)
jnpsk Feb 13, 2024
7250791
Fix #1583: Add Migration Guides 1.7.0
banterCZ Feb 22, 2024
c11da19
Merge pull request #1496 from wultra/dependabot/maven/com.github.eirs…
dependabot[bot] Feb 22, 2024
8d37bca
Bump de.skuzzle.enforcer:restrict-imports-enforcer-rule
dependabot[bot] Feb 22, 2024
2703153
Fix #1581: Set release version to 1.7.0
banterCZ Feb 22, 2024
4d7c738
Fix #1587: Remove maven implicit jar packaging
banterCZ Feb 22, 2024
a5a5644
Merge pull request #1559 from wultra/dependabot/maven/de.skuzzle.enfo…
dependabot[bot] Feb 22, 2024
1f09b84
Fix #1589: Error in Oracle from scratch script
zcgandcomp Feb 22, 2024
9cbb26b
Bump org.springframework.boot:spring-boot-starter-parent
dependabot[bot] Feb 23, 2024
4d2f545
Merge pull request #1588 from wultra/issues/1587-remove-jar-packaging
banterCZ Feb 23, 2024
15a5c7c
Merge pull request #1591 from wultra/dependabot/maven/org.springframe…
dependabot[bot] Feb 23, 2024
4f8b5bd
Merge pull request #1584 from wultra/issues/1583-migration-guides
banterCZ Feb 23, 2024
8ec69b7
Merge pull request #1590 from wultra/issues/1589-script-error
zcgandcomp Feb 23, 2024
b29dcbd
Fix #1593: Reconfigure OIDC to resource-server
banterCZ Feb 29, 2024
ad10a49
Merge pull request #1594 from wultra/issues/1593-oidc
banterCZ Feb 29, 2024
ce3fc35
Update GitHub Actions to JDK 21
banterCZ Mar 7, 2024
76f5b99
Update GitHub Actions checkout@v4, and setup-java@v4
banterCZ Mar 7, 2024
a34898d
Merge pull request #1598 from wultra/issues/update-gha
banterCZ Mar 7, 2024
9383620
Merge pull request #1597 from wultra/issues/gha-jdk-21
banterCZ Mar 7, 2024
6f45565
Bump com.google.guava:guava from 33.0.0-jre to 33.1.0-jre
dependabot[bot] Mar 18, 2024
c5b1d9f
Bump org.springdoc:springdoc-openapi-starter-webmvc-ui
dependabot[bot] Mar 18, 2024
057f9e8
Merge pull request #1605 from wultra/dependabot/maven/org.springdoc-s…
dependabot[bot] Mar 18, 2024
c58b6ce
Merge pull request #1604 from wultra/dependabot/maven/com.google.guav…
dependabot[bot] Mar 18, 2024
4f80833
Update Used-Push-Message-Extras.md (#1602)
petrdvorak Mar 21, 2024
d444b5f
Bump io.swagger.core.v3:swagger-annotations-jakarta
dependabot[bot] Mar 25, 2024
2b1ab13
Bump org.springframework.boot:spring-boot-starter-parent
dependabot[bot] Mar 25, 2024
0fc5809
Merge pull request #1608 from wultra/dependabot/maven/io.swagger.core…
dependabot[bot] Mar 25, 2024
98080ed
Merge pull request #1609 from wultra/dependabot/maven/org.springframe…
dependabot[bot] Mar 25, 2024
3397d6b
Downgrade JDK for Coverity GHA to 17
banterCZ Mar 28, 2024
41ed3dc
Fix #1611: 404 error is propagated as 500
banterCZ Mar 28, 2024
9e7513b
Merge pull request #1610 from wultra/issues/gha-coverity-jdk-17
banterCZ Mar 28, 2024
448e101
Bump com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer
dependabot[bot] Apr 1, 2024
0a5ea29
Merge pull request #1614 from wultra/dependabot/maven/com.googlecode.…
dependabot[bot] Apr 2, 2024
fd9d573
Merge pull request #1612 from wultra/issues/1611-not-found
banterCZ Apr 2, 2024
c798eaa
Fix #1615: Remove Guava dependency
banterCZ Apr 2, 2024
f178335
Merge pull request #1616 from wultra/issues/1615-remove-guava
banterCZ Apr 3, 2024
fbc6415
Bump org.springdoc:springdoc-openapi-starter-webmvc-ui
dependabot[bot] Apr 8, 2024
29621ca
Merge pull request #1619 from wultra/dependabot/maven/org.springdoc-s…
dependabot[bot] Apr 8, 2024
d992a41
Fix #1580: Update Wultra dependencies
banterCZ Feb 22, 2024
5e374b1
Merge pull request #1585 from wultra/issues/1580-wultra-dependencies
banterCZ Apr 9, 2024
468737f
Fix #1579: Update npm dependencies
romanstrobl Apr 9, 2024
d247448
Merge pull request #1620 from wultra/issues/1579-update-js-deps
romanstrobl Apr 10, 2024
55a9b81
Merge pull request #1586 from wultra/issues/1581-version-1.7.0
banterCZ Apr 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ jobs:
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
java_version: 21
2 changes: 2 additions & 0 deletions .github/workflows/maven-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
with:
environment: internal-publish
release_type: snapshot
java_version: 21
secrets:
username: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
Expand All @@ -45,6 +46,7 @@ jobs:
with:
environment: ${{ inputs.environment }}
release_type: ${{ inputs.release_type }}
java_version: 21
secrets:
username: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/maven-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ on:
jobs:
maven-tests:
uses: wultra/wultra-infrastructure/.github/workflows/maven-test.yml@develop
secrets: inherit
secrets: inherit
with:
java_version: 21
4 changes: 2 additions & 2 deletions .github/workflows/scp-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ jobs:
scp-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
Expand Down
2 changes: 2 additions & 0 deletions .run/NextStepApplication.run.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="NextStepApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<option name="ACTIVE_PROFILES" value="dev" />
<option name="DEBUG_MODE" value="true" />
<module name="powerauth-nextstep" />
<option name="SPRING_BOOT_MAIN_CLASS" value="io.getlime.security.powerauth.app.nextstep.NextStepApplication" />
<option name="VM_PARAMETERS" value="-Dserver.servlet.context-path=/powerauth-nextstep -Dserver.port=9082" />
<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$/powerauth-nextstep/pom.xml" goal="process-resources" />
Expand Down
2 changes: 2 additions & 0 deletions .run/TppEngineApplication.run.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="TppEngineApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<option name="ACTIVE_PROFILES" value="dev" />
<option name="DEBUG_MODE" value="true" />
<module name="powerauth-tpp-engine" />
<option name="SPRING_BOOT_MAIN_CLASS" value="io.getlime.security.powerauth.app.tppengine.TppEngineApplication" />
<option name="VM_PARAMETERS" value="-Dserver.servlet.context-path=/tpp-engine -Dserver.port=9081" />
<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$/powerauth-tpp-engine/pom.xml" goal="process-resources" />
Expand Down
1 change: 1 addition & 0 deletions docs/Migration-Instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

This page contains PowerAuth Web Flow migration instructions.

- [PowerAuth Web Flow 1.7.0](./Web-Flow-1.7.0.md)
- [PowerAuth Web Flow 1.6.0](./Web-Flow-1.6.0.md)
- [PowerAuth Web Flow 1.5.0](./Web-Flow-1.5.0.md)
- [PowerAuth Web Flow 1.4.0](./Web-Flow-1.4.0.md)
Expand Down
13 changes: 13 additions & 0 deletions docs/Next-Step-Server.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,16 @@ Next Step Server implements following functionality:
REST services are available for all Next Step functionality listed above.

The Next Step Server functionality is described in details in [Next Step Server REST API Reference](./Next-Step-Server-REST-API-Reference.md).


## OpenID Connect (OIDC)

You may configure OpenID Connect (OIDC) authentication.

| Property | Default value | Description |
|---------------------------------------------------------|---------------|---------------------------------------------------------------------------------------|
| `powerauth.nextstep.security.auth.type` | | `OIDC` for OpenID Connect. If OIDC enabled, the properties bellow must be configured. |
| `spring.security.oauth2.resource-server.jwt.issuer-uri` | | URL of the provider, e.g. `https://sts.windows.net/example/` |
| `spring.security.oauth2.resource-server.jwt.audiences` | | A comma-separated list of allowed `aud` JWT claim values to be validated. |

See the [Spring Security documentation](https://docs.spring.io/spring-security/reference/servlet/oauth2/index.html#oauth2-client-log-users-in) and [OpenID Connect UserInfo endpoint](https://connect2id.com/products/server/docs/api/userinfo) for details.
21 changes: 11 additions & 10 deletions docs/Used-Push-Message-Extras.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Used Push Message Extras

During the Mobile Token authentication and authorization, PowerAuth Web Flow may send following push messages to the Mobile Token app:
During the Mobile Token authentication and authorization, PowerAuth Web Flow may send the following push messages to the Mobile Token app:

- `messageType` (required) - message type, one of the following values:
- `mtoken.operationInit` - in case new operation was triggerred
- `mtoken.operationFinished` - in case operation was finished, successfully or non-successfully
- `mtoken.operationInit` - in case a new operation was triggered
- `mtoken.operationFinished` - in case the operation was finished, successfully or non-successfully
- `mtokenOperationResult` (required only in case of a finished operation, `messageType` = `mtoken.operationFinished`, otherwise ignored) - this key contains more information about the operation finish result, namely one of the following values:
- `authentication.success` - operation was successfully confirmed
- `authentication.fail` - operation failed to confirm
- `operation.timeout` - operation expired
- `operation.canceled` - operation was cancelled by the user
- `operation.methodNotAvailable` - (rare) mToken authentication method was removed from the user
- `authentication.success` - the operation was successfully confirmed
- `authentication.fail` - the operation failed to confirm
- `operation.timeout` - the operation expired
- `operation.canceled` - the operation was canceled by the user
- `operation.methodNotAvailable` - (rare) mobile token authentication method was removed from the user
- `operationId` (required) - operation ID, in UUID format
- `operationName` (required) - operation name, for example "login" or "authorize_payment"
- `operationName` (required) - operation name, for example, "login" or "authorize_payment"
- `activationId` (optional) - activation ID representing the activation to which the push notification was sent (if known)

Please note that push notifications work on "best effort" principle and therefore, application must not rely on them. It can use the notification for example to deliver more prompt response on events in desktop web browser.
Please note that push notifications work on the "best effort" principle, so applications must not rely on them. For example, apps can use notifications to respond more promptly to events on the desktop web browser (i.e., canceling the operation by clicking the "Cancel" button on the web).
14 changes: 13 additions & 1 deletion docs/Web-Flow-1.6.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,16 @@

This guide contains instructions for migration from PowerAuth WebFlow version `1.5.x` to version `1.6.0`.

No migration steps nor database changes are required.
## Database Changes

For convenience you can use liquibase for your database migration.

For manual changes use SQL scripts:

- [PostgreSQL script](./sql/postgresql/migration_1.5.1_1.6.0.sql)
- [Oracle script](./sql/oracle/migration_1.5.1_1.6.0.sql)

### Fix DB Bug for Creating OTP without User ID

The column `user_id` in table `ns_otp_storage` is nullable now.

5 changes: 5 additions & 0 deletions docs/Web-Flow-1.7.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Migration from 1.6.0 to 1.7.0

This guide contains instructions for migration from PowerAuth WebFlow version `1.6.x` to version `1.7.0`.

There are no database changes needed for this version.
6 changes: 0 additions & 6 deletions docs/Web-Flow-Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,13 @@ spring.datasource.url=jdbc:postgresql://localhost:5432/powerauth
spring.datasource.username=powerauth
spring.datasource.password=
spring.datasource.hikari.auto-commit=false
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.properties.hibernate.connection.characterEncoding=utf8
spring.jpa.properties.hibernate.connection.useUnicode=true

# Database Configuration - Oracle
#spring.datasource.url=jdbc:oracle:thin:@//localhost:1521/powerauth
#spring.datasource.username=powerauth
#spring.datasource.password=
#spring.datasource.driver-class-name=oracle.jdbc.OracleDriver

# Application Service Configuration
powerauth.webflow.service.applicationName=powerauth-webflow
Expand Down Expand Up @@ -181,15 +179,13 @@ spring.datasource.url=jdbc:postgresql://localhost:5432/powerauth
spring.datasource.username=powerauth
spring.datasource.password=
spring.datasource.hikari.auto-commit=false
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.properties.hibernate.connection.characterEncoding=utf8
spring.jpa.properties.hibernate.connection.useUnicode=true

# Database Configuration - Oracle
#spring.datasource.url=jdbc:oracle:thin:@//localhost:1521/powerauth
#spring.datasource.username=powerauth
#spring.datasource.password=
#spring.datasource.driver-class-name=oracle.jdbc.OracleDriver

# Data Adapter Server Service URL
powerauth.dataAdapter.service.url=http://localhost:8080/powerauth-data-adapter
Expand Down Expand Up @@ -281,15 +277,13 @@ spring.datasource.url=jdbc:postgresql://localhost:5432/powerauth
spring.datasource.username=powerauth
spring.datasource.password=
spring.datasource.hikari.auto-commit=false
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.properties.hibernate.connection.characterEncoding=utf8
spring.jpa.properties.hibernate.connection.useUnicode=true

# Database Configuration - Oracle
#spring.datasource.url=jdbc:oracle:thin:@//localhost:1521/powerauth
#spring.datasource.username=powerauth
#spring.datasource.password=
#spring.datasource.driver-class-name=oracle.jdbc.OracleDriver

# SMS OTP expiration time in seconds
powerauth.authorization.sms-otp.expiration-time-in-seconds=300
Expand Down
6 changes: 0 additions & 6 deletions docs/Web-Flow-Installation-Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ Note that the JDBC settings differ based on used database vendor and JDBC driver
<Parameter name="spring.datasource.url" value="jdbc:oracle:thin:@//hostname:1523/SID"/>
<Parameter name="spring.datasource.username" value="powerauth"/>
<Parameter name="spring.datasource.password" value="********"/>
<Parameter name="spring.datasource.driver-class-name" value="oracle.jdbc.OracleDriver"/>
<Parameter name="spring.jpa.hibernate.ddl-auto" value="none"/>
<Parameter name="spring.jpa.properties.hibernate.default_schema" value="powerauth"/>

Expand All @@ -162,7 +161,6 @@ Note that the JDBC settings differ based on used database vendor and JDBC driver
<Parameter name="spring.datasource.url" value="jdbc:oracle:thin:@//hostname:1523/SID"/>
<Parameter name="spring.datasource.username" value="powerauth"/>
<Parameter name="spring.datasource.password" value="********"/>
<Parameter name="spring.datasource.driver-class-name" value="oracle.jdbc.OracleDriver"/>
<Parameter name="spring.jpa.hibernate.ddl-auto" value="none"/>
<Parameter name="spring.jpa.properties.hibernate.default_schema" value="powerauth"/>

Expand Down Expand Up @@ -207,7 +205,6 @@ Note that the JDBC settings differ based on used database vendor and JDBC driver
<Parameter name="spring.datasource.url" value="jdbc:oracle:thin:@//hostname:1523/SID"/>
<Parameter name="spring.datasource.username" value="powerauth"/>
<Parameter name="spring.datasource.password" value="********"/>
<Parameter name="spring.datasource.driver-class-name" value="oracle.jdbc.OracleDriver"/>
<Parameter name="spring.jpa.hibernate.ddl-auto" value="none"/>
<Parameter name="spring.jpa.properties.hibernate.default_schema" value="powerauth"/>

Expand All @@ -232,7 +229,6 @@ Note that the JDBC settings differ based on used database vendor and JDBC driver
<Parameter name="spring.datasource.url" value="jdbc:oracle:thin:@//hostname:1523/SID"/>
<Parameter name="spring.datasource.username" value="powerauth"/>
<Parameter name="spring.datasource.password" value="********"/>
<Parameter name="spring.datasource.driver-class-name" value="oracle.jdbc.OracleDriver"/>
<Parameter name="spring.jpa.hibernate.ddl-auto" value="none"/>
<Parameter name="spring.jpa.properties.hibernate.default_schema" value="powerauth"/>

Expand All @@ -252,7 +248,6 @@ Note that the JDBC settings differ based on used database vendor and JDBC driver
<Parameter name="spring.datasource.url" value="jdbc:oracle:thin:@//hostname:1523/SID"/>
<Parameter name="spring.datasource.username" value="powerauth"/>
<Parameter name="spring.datasource.password" value="********"/>
<Parameter name="spring.datasource.driver-class-name" value="oracle.jdbc.OracleDriver"/>
<Parameter name="spring.jpa.hibernate.ddl-auto" value="none"/>
<Parameter name="spring.jpa.properties.hibernate.default_schema" value="powerauth"/>
Expand All @@ -279,7 +274,6 @@ Note that the JDBC settings differ based on used database vendor and JDBC driver
<Parameter name="spring.datasource.url" value="jdbc:oracle:thin:@//hostname:1523/SID"/>
<Parameter name="spring.datasource.username" value="powerauth"/>
<Parameter name="spring.datasource.password" value="********"/>
<Parameter name="spring.datasource.driver-class-name" value="oracle.jdbc.OracleDriver"/>
<Parameter name="spring.jpa.hibernate.ddl-auto" value="none"/>
<Parameter name="spring.jpa.properties.hibernate.default_schema" value="powerauth"/>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.9.xsd">

<changeSet id="1" logicalFilePath="powerauth-nextstep/1.6.x/20240116-add-tag-1.6.0.xml" author="Zdenek Cerny">
<tagDatabase tag="powerauth-nextstep/1.6.0"/>
</changeSet>

</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.9.xsd">

<changeSet id="1" logicalFilePath="powerauth-nextstep/1.6.x/20240116-correct-userid-nullable.xml" author="Zdenek Cerny">
<preConditions onFail="MARK_RAN">
<tableExists tableName="ns_otp_storage"/>
<columnExists tableName="ns_otp_storage" columnName="user_id"/>
</preConditions>
<comment>Make user_id column in table ns_otp_storage nullable</comment>
<dropNotNullConstraint tableName="ns_otp_storage" columnName="user_id" columnDataType="varchar(255)" />
</changeSet>

</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.9.xsd">

<include file="20240116-correct-userid-nullable.xml" relativeToChangelogFile="true" />
<include file="20240116-add-tag-1.6.0.xml" relativeToChangelogFile="true" />

</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@

<include file="1.4.x/db.changelog-version.xml" relativeToChangelogFile="true" />
<include file="1.5.x/db.changelog-version.xml" relativeToChangelogFile="true" />
<include file="1.6.x/db.changelog-version.xml" relativeToChangelogFile="true" />

</databaseChangeLog>
4 changes: 2 additions & 2 deletions docs/sql/oracle/create_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ CREATE TABLE oauth2_registered_client (
scopes VARCHAR(1000) NOT NULL,
client_settings VARCHAR(2000) NOT NULL,
token_settings VARCHAR(2000) NOT NULL,
PRIMARY KEY (id)
PRIMARY KEY (id),
CONSTRAINT client_id_unique UNIQUE (client_id)
);

-- Table oauth2_registered_client stores information about OAuth 2.1 consents
Expand Down Expand Up @@ -628,7 +629,6 @@ CREATE INDEX wf_websocket_session ON wf_operation_session (websocket_session_id)
CREATE INDEX ns_operation_pending ON ns_operation (user_id, result);
CREATE UNIQUE INDEX ns_operation_afs_unique on ns_operation_afs (operation_id, request_afs_action, request_step_index);
CREATE INDEX wf_certificate_operation ON wf_certificate_verification (operation_id);
CREATE UNIQUE INDEX oauth2_client_unique ON oauth2_registered_client (client_id);
CREATE UNIQUE INDEX ns_application_name ON ns_application (name);
CREATE UNIQUE INDEX ns_credential_policy_name ON ns_credential_policy (name);
CREATE UNIQUE INDEX ns_otp_policy_name ON ns_otp_policy (name);
Expand Down
3 changes: 3 additions & 0 deletions docs/sql/oracle/migration_1.5.1_1.6.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Changeset powerauth-nextstep/1.6.x/20240116-correct-userid-nullable.xml::1::Zdenek Cerny
-- Make user_id column in table ns_otp_storage nullable
ALTER TABLE ns_otp_storage MODIFY user_id NULL;
3 changes: 2 additions & 1 deletion docs/sql/postgresql/create_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ CREATE TABLE oauth2_registered_client (
PRIMARY KEY (id)
);

CREATE UNIQUE INDEX oauth2_client_unique ON oauth2_registered_client (client_id);

-- Table oauth2_registered_client stores information about OAuth 2.1 consents
-- Source: https://github.com/spring-projects/spring-authorization-server/blob/main/oauth2-authorization-server/src/main/resources/org/springframework/security/oauth2/server/authorization/oauth2-authorization-consent-schema.sql
CREATE TABLE oauth2_authorization_consent (
Expand Down Expand Up @@ -623,7 +625,6 @@ CREATE INDEX wf_websocket_session ON wf_operation_session (websocket_session_id)
CREATE INDEX ns_operation_pending ON ns_operation (user_id, result);
CREATE UNIQUE INDEX ns_operation_afs_unique ON ns_operation_afs (operation_id, request_afs_action, request_step_index);
CREATE INDEX wf_certificate_operation ON wf_certificate_verification (operation_id);
CREATE UNIQUE INDEX oauth2_client_unique ON oauth2_registered_client (client_id);
CREATE UNIQUE INDEX ns_application_name ON ns_application (name);
CREATE UNIQUE INDEX ns_credential_policy_name ON ns_credential_policy (name);
CREATE UNIQUE INDEX ns_otp_policy_name ON ns_otp_policy (name);
Expand Down
3 changes: 3 additions & 0 deletions docs/sql/postgresql/migration_1.5.1_1.6.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Changeset powerauth-nextstep/1.6.x/20240116-correct-userid-nullable.xml::1::Zdenek Cerny
-- Make user_id column in table ns_otp_storage nullable
ALTER TABLE ns_otp_storage ALTER COLUMN user_id DROP NOT NULL;
Loading
Loading