-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #257 from wultra/develop
Merge develop to master
- Loading branch information
Showing
37 changed files
with
395 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,22 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ develop, master ] | ||
branches: [ 'develop', 'master', 'releases/**' ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ develop ] | ||
branches: [ 'develop', 'master', 'releases/**' ] | ||
schedule: | ||
- cron: '19 8 * * 5' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'java' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] | ||
# Learn more: | ||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
codeql-analysis: | ||
uses: wultra/wultra-infrastructure/.github/workflows/codeql-analysis.yml@develop | ||
secrets: inherit | ||
with: | ||
languages: "['java']" | ||
# 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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="DataAdapterApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true"> | ||
<option name="ACTIVE_PROFILES" value="dev" /> | ||
<module name="powerauth-data-adapter" /> | ||
<option name="SPRING_BOOT_MAIN_CLASS" value="io.getlime.security.powerauth.app.dataadapter.DataAdapterApplication" /> | ||
<option name="VM_PARAMETERS" value="-Dserver.servlet.context-path=/powerauth-data-adapter -Dserver.port=9090" /> | ||
<method v="2"> | ||
<option name="Make" enabled="true" /> | ||
<option name="Maven.BeforeRunTask" enabled="true" file="$PROJECT_DIR$/powerauth-data-adapter/pom.xml" goal="process-resources" /> | ||
</method> | ||
</configuration> | ||
</component> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Developer - How to Start Guide | ||
|
||
|
||
## PowerAuth Data Adapter | ||
|
||
|
||
### Standalone Run | ||
|
||
- Enable maven profile `standalone` | ||
- Use IntelliJ Idea run configuration at `../.run/DataAdapterApplication.run.xml` | ||
- Open [http://localhost:9090/powerauth-data-adapter/actuator/health](http://localhost:9090/powerauth-data-adapter/actuator/health) and you should get `{"status":"UP"}` | ||
|
||
|
||
### Database | ||
|
||
Database changes are driven by Liquibase. | ||
|
||
This is an example how to manually check the Liquibase status. | ||
Important and fixed parameter is `changelog-file`. | ||
Others (like URL, username, password) depend on your environment. | ||
|
||
```shell | ||
liquibase --changelog-file=./docs/db/changelog/changesets/powerauth-data-adapter/db.changelog-module.xml --url=jdbc:postgresql://localhost:5432/powerauth --username=powerauth --hub-mode=off status | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
docs/db/changelog/changesets/powerauth-data-adapter/1.4.x/20230326-init-db.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?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-data-adapter/1.4.x/20230326-init-db.xml" author="Lubos Racansky"> | ||
<preConditions onFail="MARK_RAN"> | ||
<not> | ||
<tableExists tableName="da_sms_authorization"/> | ||
</not> | ||
</preConditions> | ||
<comment>Create a new table da_sms_authorization</comment> | ||
<createTable tableName="da_sms_authorization" remarks="Table da_sms_authorization stores data for SMS OTP authorization."> | ||
<column name="message_id" type="varchar(256)" remarks="SMS message ID, ID of SMS OTP."> | ||
<constraints primaryKey="true" /> | ||
</column> | ||
<column name="operation_id" type="varchar(256)" remarks="Operation ID."> | ||
<constraints nullable="false" /> | ||
</column> | ||
<column name="user_id" type="varchar(256)" remarks="User ID."> | ||
<constraints nullable="false" /> | ||
</column> | ||
<column name="organization_id" type="varchar(256)" remarks="Organization ID." /> | ||
<column name="operation_name" type="varchar(32)" remarks="Name of the operation that triggered the SMS (login, authorize_payment, ...)."> | ||
<constraints nullable="false" /> | ||
</column> | ||
<column name="authorization_code" type="varchar(32)" remarks="Value of the authorization code sent in the SMS."> | ||
<constraints nullable="false" /> | ||
</column> | ||
<column name="salt" type="${blob_type}" remarks="Salt used for authorization code calculation."> | ||
<constraints nullable="false" /> | ||
</column> | ||
<column name="message_text" type="text" remarks="Full SMS message text."> | ||
<constraints nullable="false" /> | ||
</column> | ||
<column name="verify_request_count" type="integer" remarks="Number of verification attempts." /> | ||
<column name="verified" type="boolean" defaultValueBoolean="false" remarks="Flag indicating if this SMS OTP was successfully verified." /> | ||
<column name="timestamp_created" type="timestamp" defaultValueDate="${now}" remarks="Timestamp when the SMS OTP was generated." /> | ||
<column name="timestamp_verified" type="timestamp" remarks="Timestamp when the SMS OTP was successfully validated." /> | ||
<column name="timestamp_expires" type="timestamp" remarks="Timestamp when the SMS OTP expires." /> | ||
</createTable> | ||
</changeSet> | ||
|
||
<changeSet id="2" logicalFilePath="powerauth-data-adapter/1.4.x/20230326-init-db.xml" author="Lubos Racansky"> | ||
<preConditions onFail="MARK_RAN"> | ||
<not> | ||
<tableExists tableName="da_user_credentials"/> | ||
</not> | ||
</preConditions> | ||
<comment>Create a new table da_user_credentials</comment> | ||
<createTable tableName="da_user_credentials" remarks="Table da_user_credentials stores built-in users for the data adapter."> | ||
<column name="user_id" type="varchar(128)" remarks="User ID. Technical identifier of the user."> | ||
<constraints primaryKey="true" /> | ||
</column> | ||
<column name="username" type="varchar(256)" remarks="Username, the displayable value that users use to sign in."> | ||
<constraints nullable="false" /> | ||
</column> | ||
<column name="password_hash" type="varchar(256)" remarks="Bcrypt hash of the password."> | ||
<constraints nullable="false" /> | ||
</column> | ||
<column name="family_name" type="varchar(256)" remarks="User family name."> | ||
<constraints nullable="false" /> | ||
</column> | ||
<column name="given_name" type="varchar(256)" remarks="User given name."> | ||
<constraints nullable="false" /> | ||
</column> | ||
<column name="organization_id" type="varchar(64)" remarks="User organization ID."> | ||
<constraints nullable="false" /> | ||
</column> | ||
<column name="phone_number" type="varchar(256)" remarks="Full phone number, should be stored in format that allows easy SMS message sending."> | ||
<constraints nullable="false" /> | ||
</column> | ||
</createTable> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |
10 changes: 10 additions & 0 deletions
10
docs/db/changelog/changesets/powerauth-data-adapter/1.4.x/20230327-add-tag-1.4.0.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-data-adapter/1.4.x/20230327-add-tag-1.4.0.xml" author="Lubos Racansky"> | ||
<tagDatabase tag="powerauth-data-adapter/1.4.0"/> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |
9 changes: 9 additions & 0 deletions
9
docs/db/changelog/changesets/powerauth-data-adapter/1.4.x/db.changelog-version.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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="20230326-init-db.xml" relativeToChangelogFile="true" /> | ||
<include file="20230327-add-tag-1.4.0.xml" relativeToChangelogFile="true" /> | ||
|
||
</databaseChangeLog> |
10 changes: 10 additions & 0 deletions
10
docs/db/changelog/changesets/powerauth-data-adapter/1.5.x/20230905-add-tag-1.5.0.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-data-adapter/1.5.x/20230905-add-tag-1.5.0.xml" author="Lubos Racansky"> | ||
<tagDatabase tag="powerauth-data-adapter/1.5.0"/> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |
8 changes: 8 additions & 0 deletions
8
docs/db/changelog/changesets/powerauth-data-adapter/1.5.x/db.changelog-version.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?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="20230905-add-tag-1.5.0.xml" relativeToChangelogFile="true" /> | ||
|
||
</databaseChangeLog> |
16 changes: 16 additions & 0 deletions
16
docs/db/changelog/changesets/powerauth-data-adapter/db.changelog-module.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?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"> | ||
|
||
<property name="now" value="now()" dbms="h2"/> | ||
<property name="now" value="current_timestamp" dbms="postgresql"/> | ||
<property name="now" value="sysdate" dbms="oracle"/> | ||
|
||
<property name="blob_type" value="bytea" dbms="postgresql"/> | ||
<property name="blob_type" value="blob" dbms="oracle"/> | ||
|
||
<include file="1.4.x/db.changelog-version.xml" relativeToChangelogFile="true" /> | ||
<include file="1.5.x/db.changelog-version.xml" relativeToChangelogFile="true" /> | ||
|
||
</databaseChangeLog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?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="changesets/powerauth-data-adapter/db.changelog-module.xml" relativeToChangelogFile="true" /> | ||
|
||
</databaseChangeLog> |
Oops, something went wrong.