Skip to content

Commit 551a58f

Browse files
authored
Merge pull request #388 from openwallet-foundation-labs/fix/dpop
fix: apply correct url for dpop check
2 parents 0f12c71 + 093135f commit 551a58f

File tree

136 files changed

+224
-22389
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+224
-22389
lines changed

.codecov.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ ignore:
2626
- "dist/"
2727
- "apps/client/**"
2828
- "apps/dcapi/**"
29-
- "apps/webhook/**"
30-
- "apps/verifier-app/**"
29+
- "apps/webhook/**"
3130
- "apps/tmp/**"
3231
- "monitor/**"
3332
- "packages/**"

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Copilot Instructions for EUDIPLO
22

33
## Project Architecture
4-
- **Monorepo**: Contains multiple apps (backend, client, dcapi, verifier-app, webhook) and shared packages.
4+
- **Monorepo**: Contains multiple apps (backend, client, dcapi, webhook) and shared packages.
55
- **Backend**: [apps/backend](../apps/backend) — NestJS API server, main business logic, protocol abstraction.
66
- **Client**: [apps/client](../apps/client) — Angular web UI for managing credentials, keys, and sessions.
7-
- **Other Apps**: [apps/dcapi](../apps/dcapi) (Cloudflare Worker demo), [apps/webhook](../apps/webhook) (webhook simulator), [apps/verifier-app](../apps/verifier-app) (Angular verifier demo).
7+
- **Other Apps**: [apps/dcapi](../apps/dcapi) (Cloudflare Worker demo), [apps/webhook](../apps/webhook) (webhook simulator).
88
- **Deployment**: [deployment/](../deployment) — Docker Compose configs for minimal/full setups. See [deployment/README.md](../deployment/README.md).
99
- **Monitoring**: [monitor/](../monitor) — Prometheus & Grafana stack for observability.
1010

.github/workflows/ci-and-release.yml

Lines changed: 5 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ jobs:
5454
working-directory: apps/client
5555
run: pnpm dlx license-checker --production --onlyAllow "MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;0BSD;ISC"
5656

57-
- name: Run license check (verifier-app, production)
58-
working-directory: apps/verifier-app
59-
run: pnpm dlx license-checker --production --onlyAllow "MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;0BSD;ISC"
60-
6157
build-sdk-core:
6258
name: Build SDK Core
6359
permissions:
@@ -139,38 +135,12 @@ jobs:
139135
- name: Run linter
140136
run: pnpm run lint
141137

138+
- name: Build sdk core
139+
run: pnpm --filter @eudiplo/sdk-core build
140+
142141
- name: Build client
143142
run: pnpm --filter @eudiplo/client build
144143

145-
build-verifier:
146-
name: Build Verifier App
147-
permissions:
148-
contents: read
149-
runs-on: ubuntu-latest
150-
needs: [lint]
151-
steps:
152-
- uses: actions/checkout@v6
153-
154-
- uses: pnpm/action-setup@v4
155-
name: Install pnpm
156-
with:
157-
run_install: false
158-
159-
- name: Install Node.js
160-
uses: actions/setup-node@v6
161-
with:
162-
node-version: 24
163-
cache: 'pnpm'
164-
165-
- name: Install dependencies
166-
run: pnpm install
167-
168-
- name: Run linter
169-
run: pnpm run lint
170-
171-
- name: Build verifier
172-
run: pnpm --filter verifier-app build
173-
174144
build-webhook:
175145
name: Build Webhook
176146
permissions:
@@ -248,7 +218,7 @@ jobs:
248218
contents: read
249219
name: E2E Tests
250220
runs-on: ubuntu-latest
251-
needs: [build-backend, build-client, build-verifier, build-webhook]
221+
needs: [build-backend, build-client, build-webhook]
252222
steps:
253223
- uses: actions/checkout@v6
254224

@@ -446,37 +416,6 @@ jobs:
446416
cache-from: type=gha
447417
cache-to: type=gha,mode=max
448418

449-
docker-verifier:
450-
name: Build & Push Verifier Docker Image
451-
needs: [build-verifier]
452-
runs-on: ubuntu-latest
453-
permissions:
454-
contents: read
455-
packages: write
456-
steps:
457-
- uses: actions/checkout@v6
458-
459-
- name: Set up Docker Buildx
460-
uses: docker/setup-buildx-action@v3
461-
462-
- name: Log in to GitHub Container Registry
463-
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
464-
uses: docker/login-action@v3
465-
with:
466-
registry: ghcr.io
467-
username: ${{ github.actor }}
468-
password: ${{ secrets.GITHUB_TOKEN }}
469-
470-
- name: Build and push Verifier Docker image
471-
uses: docker/build-push-action@v6
472-
with:
473-
context: .
474-
target: verifier
475-
push: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
476-
tags: ghcr.io/openwallet-foundation-labs/eudiplo-verifier:main
477-
cache-from: type=gha
478-
cache-to: type=gha,mode=max
479-
480419
# =============================================================================
481420
# NPM Pre-release (Main Branch Only)
482421
# Publishes @eudiplo/sdk-core with a "main" tag as a pre-release version.
@@ -532,7 +471,7 @@ jobs:
532471
release:
533472
name: Create Versioned Release
534473
if: github.event_name == 'workflow_dispatch' && inputs.release == true
535-
needs: [test-e2e, docker-backend, docker-client, docker-verifier]
474+
needs: [test-e2e, docker-backend, docker-client]
536475
runs-on: ubuntu-latest
537476
permissions:
538477
contents: write

Dockerfile

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ RUN pnpm --filter @eudiplo/backend build
1414
RUN pnpm deploy --filter=@eudiplo/backend --prod /prod/backend
1515

1616
FROM build AS build-frontend
17-
# Build SDK first (required by both Angular apps), then both frontend apps
18-
RUN pnpm --filter @eudiplo/sdk build
19-
RUN pnpm --filter @eudiplo/client --filter verifier-app build
17+
# Build SDK first (required by both Angular apps), then client
18+
RUN pnpm --filter @eudiplo/sdk-core build
19+
RUN pnpm --filter @eudiplo/client build
2020

2121
FROM base AS eudiplo
2222
# Copy production dependencies for backend and built dist
@@ -95,50 +95,3 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=20s --retries=3 \
9595
# Use our custom entrypoint script
9696
ENTRYPOINT ["/docker-entrypoint.sh"]
9797
CMD ["nginx", "-g", "daemon off;"]
98-
99-
FROM nginx:alpine AS verifier
100-
# Copy the Angular build output into the nginx html directory.
101-
COPY --from=build-frontend /usr/src/app/apps/verifier-app/dist/verifier-app/browser /usr/share/nginx/html
102-
103-
# Copy nginx configuration (using client's nginx config as template)
104-
COPY apps/client/nginx.conf /etc/nginx/nginx.conf
105-
106-
# Copy entrypoint script
107-
COPY apps/client/docker-entrypoint.sh /docker-entrypoint.sh
108-
RUN chmod +x /docker-entrypoint.sh
109-
110-
# Accept VERSION as build argument and set as environment variable
111-
ARG VERSION=latest
112-
ENV VERSION=$VERSION
113-
114-
# Environment variables with defaults
115-
ENV API_BASE_URL=http://localhost:3000
116-
117-
# --- Security: Run as non-root user ---
118-
# Create nginx user/group and fix permissions
119-
RUN addgroup -g 101 -S nginx || true && \
120-
adduser -S -D -H -u 101 -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx || true && \
121-
chown -R nginx:nginx /usr/share/nginx/html && \
122-
chown -R nginx:nginx /var/cache/nginx && \
123-
chown -R nginx:nginx /var/log/nginx && \
124-
chown -R nginx:nginx /etc/nginx/conf.d && \
125-
touch /var/run/nginx.pid && \
126-
chown -R nginx:nginx /var/run/nginx.pid
127-
128-
USER nginx
129-
130-
# Expose port 80
131-
EXPOSE 80
132-
133-
# --- Healthcheck dependencies ---
134-
USER root
135-
RUN apk add --no-cache curl
136-
USER nginx
137-
138-
# --- HEALTHCHECK (Verifier / Nginx) ---
139-
HEALTHCHECK --interval=30s --timeout=10s --start-period=20s --retries=3 \
140-
CMD curl -f http://localhost/ || exit 1
141-
142-
# Use our custom entrypoint script
143-
ENTRYPOINT ["/docker-entrypoint.sh"]
144-
CMD ["nginx", "-g", "daemon off;"]

apps/backend/src/issuer/configuration/issuance/issuance.service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ export class IssuanceService {
127127
*/
128128
async storeIssuanceConfiguration(tenantId: string, value: IssuanceDto) {
129129
value.display = await this.replaceUrl(value.display, tenantId);
130-
console.log(value);
131130
return this.issuanceConfigRepo.save({
132131
...value,
133132
tenantId,

apps/backend/src/issuer/issuance/oid4vci/oid4vci.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ export class Oid4vciService {
354354
const { tokenPayload } = await resourceServer.verifyResourceRequest({
355355
authorizationServers: issuerMetadata.authorizationServers,
356356
request: {
357-
url: `${protocol}//${req.host}${req.url}`,
357+
url: `${this.configService.getOrThrow<string>("PUBLIC_URL")}${req.url}`,
358358
method: req.method as HttpMethod,
359359
headers,
360360
},
@@ -509,7 +509,7 @@ export class Oid4vciService {
509509
const { tokenPayload } = await resourceServer.verifyResourceRequest({
510510
authorizationServers: issuerMetadata.authorizationServers,
511511
request: {
512-
url: `${protocol}//${req.host}${req.url}`,
512+
url: `${this.configService.getOrThrow<string>("PUBLIC_URL")}${req.url}`,
513513
method: req.method as HttpMethod,
514514
headers,
515515
},

apps/backend/src/verifier/oid4vp/oid4vp.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class Oid4vpService {
8585
return rest;
8686
});
8787

88-
if (
88+
/* if (
8989
await this.registrarService.isEnabledForTenant(session.tenantId)
9090
) {
9191
const registrationCert = JSON.parse(
@@ -100,7 +100,7 @@ export class Oid4vpService {
100100
session.requestId!,
101101
session.tenantId,
102102
);
103-
}
103+
} */
104104
const nonce = randomUUID();
105105
await this.sessionService.add(session.id, {
106106
vp_nonce: nonce,

apps/client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@angular/platform-browser-dynamic": "^21.1.1",
2929
"@angular/router": "^21.1.1",
3030
"@badgateway/oauth2-client": "^3.3.1",
31-
"@eudiplo/sdk-angular": "workspace:*",
31+
"@eudiplo/sdk-core": "workspace:*",
3232
"@keycloak/keycloak-admin-client": "^26.5.1",
3333
"@ngx-formly/core": "^7.0.1",
3434
"@ngx-formly/material": "^7.0.1",
@@ -70,4 +70,4 @@
7070
"typescript-eslint": "8.53.1"
7171
},
7272
"packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad"
73-
}
73+
}

apps/client/src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { FlexLayoutModule } from 'ngx-flexible-layout';
1515
import { Subscription } from 'rxjs';
1616
import { filter } from 'rxjs/operators';
1717
import { JwtService, Role } from './services/jwt.service';
18-
import { ApiService } from '@eudiplo/sdk-angular';
18+
import { ApiService } from './core';
1919

2020
@Component({
2121
selector: 'app-root',

apps/client/src/app/app.config.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ import { ObjectTypeComponent } from './types/object.type';
1414
import { ArrayTypeComponent } from './types/array.type';
1515
import { provideMonacoEditor } from 'ngx-monaco-editor-v2';
1616
import schemas from './utils/schemas.json';
17-
import { provideHeyApiClient } from '@eudiplo/sdk-angular/api/client/client.gen';
18-
import { client } from '@eudiplo/sdk-angular/api/client.gen';
19-
import { authInterceptor } from '@eudiplo/sdk-angular';
17+
import { authInterceptor } from './core';
2018

2119
declare let monaco: any;
2220

@@ -34,7 +32,6 @@ export const appConfig: ApplicationConfig = {
3432
provideRouter(routes),
3533
importProvidersFrom(FlexLayoutModule),
3634
provideHttpClient(withInterceptors([authInterceptor]), withFetch()),
37-
provideHeyApiClient(client),
3835
provideMonacoEditor({
3936
baseUrl: window.location.origin + '/assets/monaco/min/vs',
4037
onMonacoLoad,

0 commit comments

Comments
 (0)