Skip to content

Commit

Permalink
Merge branch 'beta' into feat/generate-openapi
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-mader committed Dec 3, 2024
2 parents 20d09a5 + e225131 commit 91fd64e
Show file tree
Hide file tree
Showing 143 changed files with 4,840 additions and 1,503 deletions.
15 changes: 9 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
UNICORE__LOG_FORMAT=text
UNICORE__EVENT_STORE__TYPE=postgres
UNICORE__EVENT_STORE__CONNECTION_STRING="postgresql://demo_user:demo_pass@cqrs-postgres-db:5432/demo"
UNICORE__EVENT_STORE__TYPE=in_memory

UNICORE__SECRET_MANAGER__STRONGHOLD_PATH="agent_secret_manager/tests/res/test.stronghold"
UNICORE__URL="http://localhost:3033"

UNICORE__SECRET_MANAGER__STRONGHOLD_PATH="agent_secret_manager/tests/res/temp.stronghold"
UNICORE__SECRET_MANAGER__STRONGHOLD_PASSWORD="secure_password"
UNICORE__SECRET_MANAGER__ISSUER_EDDSA_KEY_ID="9O66nzWqYYy1LmmiOudOlh2SMIaUWoTS"
UNICORE__SECRET_MANAGER__ISSUER_DID="did:iota:rms:0x42ad588322e58b3c07aa39e4948d021ee17ecb5747915e9e1f35f028d7ecaf90"
UNICORE__SECRET_MANAGER__ISSUER_FRAGMENT="bQKQRzaop7CgEvqVq8UlgLGsdF-R-hnLFkKFZqW2VN0"
# Uncomment to enable DID IOTA for testing purposes
# UNICORE__SECRET_MANAGER__STRONGHOLD_PATH="agent_secret_manager/tests/res/test.stronghold"
# UNICORE__SECRET_MANAGER__ISSUER_EDDSA_KEY_ID="9O66nzWqYYy1LmmiOudOlh2SMIaUWoTS"
# UNICORE__SECRET_MANAGER__ISSUER_DID="did:iota:rms:0x42ad588322e58b3c07aa39e4948d021ee17ecb5747915e9e1f35f028d7ecaf90"
# UNICORE__SECRET_MANAGER__ISSUER_FRAGMENT="bQKQRzaop7CgEvqVq8UlgLGsdF-R-hnLFkKFZqW2VN0"
10 changes: 6 additions & 4 deletions .github/workflows/build-push-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ name: Build and push Docker image
on:
# TODO: `workflow_dispatch` should be removed once manual docker builds from branches are not needed anymore
workflow_dispatch:
push:
branches: ["dev"]

env:
REGISTRY_IMAGE: impiercetechnologies/ssi-agent
Expand Down Expand Up @@ -50,7 +48,7 @@ jobs:

- name: Build and push by digest
id: build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: agent_application/docker/Dockerfile
Expand Down Expand Up @@ -93,7 +91,11 @@ jobs:
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
type=sha,prefix=
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=sha
- name: Login to Docker Hub
uses: docker/login-action@v3
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/format-lint-test.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Format, Lint, Test

on:
push:
branches: ["dev"]
pull_request:
branches: ["dev"]
branches:
- main
- next
- beta
- alpha

jobs:
build:
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/lint-pr-title.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# The title of the pull request is used as the commit message when working with a squash-based merging style.
# This project also follows semantic versioning, so it is important that the title follows conventional commits and should therefore be checked.

name: Lint PR title

on:
pull_request:
branches:
- main
- next
- beta
- alpha
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
types: [opened, synchronize, reopened, edited]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: "lts/*"

- run: npm install -g @commitlint/config-angular

- run: echo $TITLE | npx commitlint
env:
# Security: we mitigate script injections by using an intermediate environment variable
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
TITLE: ${{ github.event.pull_request.title }}
41 changes: 41 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
# TODO: Refine release triggers
# Triggering a new release manually allows the team to "collect changes" before publishing a new version.
# We have not yet decided, if we want to trigger a release manually or automatically.
# - Pushes to the release channels (main, next) will automatically release.
# - Pushes to the pre-release channels (beta, alpha) need to be manually triggered.
workflow_dispatch:
push:
branches:
- main
- next
# - beta
# - alpha

permissions:
contents: read # for checkout

jobs:
release:
runs-on: ubuntu-latest

permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: semantic-release
run: npx semantic-release@24
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@

**/*.env
!**/.env.example

.DS_Store
4 changes: 4 additions & 0 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- "@semantic-release/github"
73 changes: 1 addition & 72 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,72 +1 @@
### 07-08-2024
- Renamed the display `url` property in the `credential_configurations` in the Configuration to `uri`, e.g.:
```yaml
# agent_application/config.yaml
credential_configurations:
- credential_configuration_id: w3c_vc_credential
format: jwt_vc_json
credential_definition:
type:
- VerifiableCredential
display:
- name: Verifiable Credential
locale: en
logo:
# The property below has been renamed from `url` to `uri`
uri: https://www.impierce.com/external/impierce-logo.png
alt_text: UniCore Logo
```
### 29-07-2024
- Renamed env variable prefix from `AGENT` to `UNICORE`.
- Refactored the environment variables separators from `_` to `__` to support nested configuration values. As an example, `AGENT_LOG_FORMAT` now becomes `UNICORE__LOG_FORMAT`.
- Merged all per-module configuration files into a single `config.yaml` file.

### 24-06-2024
- Reverted the API version to V0, which means that all endpoints previously prefixed with `/v1` are now prefixed with `/v0`.
- Changed `AGENT_APPLICATION_URL` to `AGENT_CONFIG_URL`.

### 20-06-2024
Deprecated the following environment variables:
* `AGENT_ISSUANCE_CREDENTIAL_NAME`
* `AGENT_ISSUANCE_CREDENTIAL_LOGO_URL`

Both can now be dynamically configured through the `/v1/configurations/credential_configurations` endpoint. Example:
```json
// HTTP POST: /v1/configurations/credential_configurations
{
"display": [{
"name": "Identity Credential", // <-- Credential Name
"locale": "en",
"logo": {
"url": "https://impierce.com/images/logo-blue.png", // <-- Credential Logo URL
"alt_text": "UniCore Logo"
}
}],
"credentialConfigurationId": ...,
"format": ...,
"credential_definition": ...
}
```

### 18-06-2024
Deprecated the following environment variables, which can now be configured in the `agent_application/config.yml` file:
* `AGENT_CONFIG_DEFAULT_DID_METHOD`: The first item in the `subject_syntax_types_supported` sequence will be used as the
default DID Method
* `AGENT_CONFIG_DISPLAY_NAME`: The display name can now be configured through `display` -> `name` in the `agent_application/config.yml` file
* `AGENT_CONFIG_DISPLAY_LOGO_URI`": The display logo URI can now be configured through `display` -> `logo` -> `uri` in the `agent_application/config.yml` file

### 23-04-2024
Renamed `subjectId` to `offerId`. This has effect on both the `/v1/credentials` and `/v2/offers` endpoints.

The `/v1/credentials` endpoint now accepts an object or a string as the `credential` value (previously it accepted only
objects). It also accepts an optional `isSigned` parameter, which indicates that the credential is already signed and
does not need to be signed in UniCore.

### 11-04-2024
`/v1/offers` incorrectly returned with Content-Type `application/json`. The Content-Type has now been changed to `application/x-www-form-urlencoded`.

### 24-01-2024

Environment variable `AGENT_APPLICATION_HOST` has changed to `AGENT_APPLICATION_URL` and requires the complete URL. e.g.:
`https://my.domain.com/unicore`. In case you don't have rewrite root enabled on your reverse proxy, you will have to set `AGENT_CONFIG_BASE_PATH` as well. e.g.: `unicore`.
Please check https://github.com/impierce/ssi-agent/releases for release notes.
Loading

0 comments on commit 91fd64e

Please sign in to comment.