Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into dev
Browse files Browse the repository at this point in the history
* upstream/dev: (23 commits)
  feat: add `issuance-config.yml` file, deprecate `/v0/configurations/credential_configurations` endpoint (impierce#91)
  chore: revert api version to `v0` (impierce#88)
  chore: improve Dockerfile and docker functionality  (impierce#89)
  feat: add support for multiple credential formats (impierce#85)
  fix: move dockerignore because it won't be respected otherwise (impierce#84)
  feat: add `/v1/configurations/credential_configurations` endpoint (impierce#83)
  feat: add Metadata `config.yml` file (impierce#82)
  chore: add tracing to `agent_event_publisher_http` (impierce#80)
  chore: use `domain-linkage` (no `-fetch`) feature in `identity_credential` (impierce#79)
  feat: create and serve `Domain Linkage Credential` (impierce#77)
  docs: list available events (impierce#78)
  feat: produce and serve `did:web` DID documents (impierce#31)
  feat: add support for `PresentationDefinition` by value (impierce#72)
  feat: use polling strategy for JIT credentials (impierce#71)
  ci: switch from manual triggers to pushes to `dev` (impierce#76)
  ci: use dedicated `arm64` runner (impierce#74)
  feat: add `offer_id` to all `OfferEvent` events (impierce#69)
  feat: enable `CorsLayer` (permissive) based on env variable (impierce#66)
  fix: add image `tags` in `merge` job (impierce#63)
  fix: add `state` to `AuthorizationResponseVerified` events (impierce#60)
  ...
  • Loading branch information
berkes committed Jun 26, 2024
2 parents 5007544 + c25f9da commit 43228a2
Show file tree
Hide file tree
Showing 70 changed files with 3,674 additions and 1,180 deletions.
File renamed without changes.
9 changes: 5 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
AGENT_CONFIG_LOG_FORMAT=json
AGENT_CONFIG_EVENT_STORE=postgres
AGENT_APPLICATION_URL=https://my-domain.example.org
AGENT_ISSUANCE_CREDENTIAL_NAME="Demo Credential"
AGENT_ISSUANCE_CREDENTIAL_LOGO_URL=https://my-domain.example.org/credential_logo.png
AGENT_CONFIG_URL=https://my-domain.example.org
AGENT_APPLICATION_ENABLE_CORS=false
AGENT_SECRET_MANAGER_STRONGHOLD_PATH="test.stronghold"
AGENT_SECRET_MANAGER_STRONGHOLD_PASSWORD="secure_password"
AGENT_SECRET_MANAGER_ISSUER_DID="did:key:z6Mkv5KkqNHuR6bPVT8fud3m9JaHBSEjEmiLp7HuGAwtbkk6"
AGENT_SECRET_MANAGER_ISSUER_FRAGMENT="key-0"
AGENT_SECRET_MANAGER_ISSUER_KEY_ID="9O66nzWqYYy1LmmiOudOlh2SMIaUWoTS"
AGENT_CONFIG_DEFAULT_DID_METHOD="did:key"
AGENT_CONFIG_DID_METHOD_WEB_ENABLED=false
AGENT_STORE_DB_CONNECTION_STRING=postgresql://demo_user:demo_pass@localhost:5432/demo
AGENT_API_REST_EXTERNAL_SERVER_RESPONSE_TIMEOUT_MS=500
AGENT_CONFIG_DOMAIN_LINKAGE_ENABLED=false
3 changes: 2 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ Add an `x` to the boxes that are relevant to your changes.
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] New and existing unit tests pass locally with my changes
- [ ] I have successfully tested this change in a docker environment
110 changes: 110 additions & 0 deletions .github/workflows/build-push-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners
name: Build and push Docker image

on:
push:
branches: ["dev"]

env:
REGISTRY_IMAGE: impiercetechnologies/ssi-agent

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- platform: linux/amd64
runs-on: ubuntu-latest
- platform: linux/arm64
runs-on: linux-arm64_4-core-16gb
runs-on: ${{ matrix.runs-on }}
steps:
- name: Prepare
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push by digest
id: build
uses: docker/build-push-action@v5
with:
context: .
file: agent_application/docker/Dockerfile
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-${{ env.PLATFORM_PAIR }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1

merge:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Download digests
uses: actions/download-artifact@v4
with:
path: /tmp/digests
pattern: digests-*
merge-multiple: true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
type=sha,prefix=
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Create manifest list and push
working-directory: /tmp/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
### 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.

Expand Down
Loading

0 comments on commit 43228a2

Please sign in to comment.