consumerdataright / mock-data-holder Goto Github PK
View Code? Open in Web Editor NEWA mock version of a Consumer Data Right Data Holder solution that can be used in the development and testing of CDR solutions
License: MIT License
A mock version of a Consumer Data Right Data Holder solution that can be used in the development and testing of CDR solutions
License: MIT License
We have identified that the MockDataHolder currently only supports "form_post" and "fragment" for "response_mode" values. If we try to pass in "query" it returns an error via callback: "Invalid response_mode for response_type".
When we view the MockDataHolder's OIDC discovery endpoint on the sandbox (https://dh-bank.idp.cdrsandbox.gov.au/.well-known/openid-configuration) the claim "response_modes_support" is not supplied. Based on RFC 8414 (https://www.rfc-editor.org/rfc/rfc8414.html) it is an optional field, but if omitted the default is ["query", "fragment"].
We suggest that to make MockDataHolder compliant, since it only supports "form_post" and "fragment", it should include the claim "response_modes_support" with the value ["form_post", "fragment"].
Hi,
Do you know when the Energy API and FAPI 1.0 Advanced Final implementations will be available to utilise?
Thanks!
Describe the bug
I notice you've got Sonarqube setup as a workflow action however none of the identified issues (which also pinged on our internal SAST analyser) appear to have been fixed.
Consequently, I've forked the code and produced a public version of Sonarqube analysis which provides an overall score of E.
Notable concerns are:
I believe all 3 of these are OWASP baselines, there's a further 307 code smells noted: https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=perlboy_mock-data-holder
To Reproduce
Steps to reproduce the behavior:
Expected behaviour
Good code quality should be a prerequisite when promoting an example data holder within a highly secure ecosystem.
Screenshots
If applicable, add screenshots to help explain your problem.
Hi Team,
Thanks for this wonderful mocks utility. It's really helping us a lot.
There are some typos or mismatch between the Docker command, Docker Compose and the hosts entry file.
Here in docker command we are setting host -h as "mock-cdr-data-holder" but in host and docker compose as "mock-data-holder". The same issues is with register and data recipient as well.
Docker Command:
docker run -d -h mock-cdr-data-holder -p 8000:8000 -p 8001:8001 -p 8002:8002 -p 8005:8005 --name mock-cdr-data-holder consumerdataright/mock-data-holder
Docker Compose:
docker run -d -h mock-data-holder -p 8000:8000 -p 8001:8001 -p 8002:8002 -p 8003:8003 -p 8004:8004 -p 8005:8005 --name mock-data-holder consumerdataright/mock-data-holder
Host Entry:
127.0.0.1 mock-data-holder
127.0.0.1 mock-data-recipient
127.0.0.1 mock-register
Thanks,
Daniel Jeganathan
Describe the bug
I am receiving a 400 when hitting the PAR endpoint in the mock data holder:
{"error":"invalid_request","error_description":"Software Product Status is invalid"}
The logs are mentioning the software product is not available, but I run DCR immediately before the PAR.
To Reproduce
Steps to reproduce the behavior:
Expected behaviour
I don't think I should see an error?!
Additional context
I can hit the GET registration/{id} endpoint, so I assume my product should be active and available.
I can also get successful responses from the data recipients status endpoint.
Describe the bug
When the token endpoint (/connect/token
) is invoked with refresh_token
grant for the first time, it returns a new access token but the subsequent calls with the returned refresh_token fails (since it isn't a rotating refreshing token, same refresh_token is returned). Apparently, the code is revoking the refresh token from PersistedGrant DB but returning the same refresh_token.
To Reproduce
Steps to reproduce the behavior:
request_uri
using pushed_authorization_request_endpoint
(/connect/par
)/connect/token
) with the refresh token received in step-2Expected behaviour
Calling the token endpoint multiple times with the refresh token returned in step-3 should always generate a new access token unless the sharing_duration
has expired.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
I am not completely aware of the mock-data-holder code base but I suspect that the issue is caused because the refresh token's key is being revoked from PersistedGrant database when handling the ProcessRefreshTokenRequestAsync. As a hot-fix, I made a small change for my local development environment and it works as expected but I am not completely sure if this is the appropriate way. Any comments or suggestions from the mock-data-holder maintainers will be appreciated.
Describe the bug
The standard stipulates that if a http error code 400 is returned the body should contain an error object.
To Reproduce
Steps to reproduce the behavior:
Expected behaviour
If a 400 code is returned the body should have an error object
Screenshots
Additional context
If you hit this endpoint and change the x-v version to a higher number, the result is as expected. That is a 406 is returned with an appropriate error message. If you hit that endpoint with an invalid access token, the result is as expected, ie a 401 is returned
It would be good to be able to configure the validity period of the access token (currently 5 minutes). Currently this is configured in the start up configuration. However, it would be useful if the could be set somewhere in the UI.
Describe the bug
Docker image fails to build.
To Reproduce
cd Source
docker build -t daty .
Expected behaviour
A docker image should be built. (Logs below)
Screenshots
➜ Source git:(main) docker build -t daty .
[+] Building 1.2s (30/87)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 8.08kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 358B 0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0 0.2s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0 0.2s
=> [internal] load metadata for docker.io/library/node:14-alpine 0.7s
=> [build 1/3] FROM mcr.microsoft.com/dotnet/sdk:6.0@sha256:a3bbff689a86ba7f3ddcee5089a729b20e20e3b4dbfb9d0a43bb3284d 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 23.45kB 0.1s
=> CACHED [base 1/6] FROM mcr.microsoft.com/dotnet/aspnet:6.0@sha256:f76f95813a87d711928c6b02335614f328cc1c9c53315137 0.0s
=> CANCELED [ui-build 1/14] FROM docker.io/library/node:14-alpine@sha256:434215b487a329c9e867202ff89e704d3a75e554822 0.2s
=> => resolve docker.io/library/node:14-alpine@sha256:434215b487a329c9e867202ff89e704d3a75e554822e07f3e0c0f9e606121b3 0.1s
=> => sha256:434215b487a329c9e867202ff89e704d3a75e554822e07f3e0c0f9e606121b33 1.43kB / 1.43kB 0.0s
=> => sha256:4e84c956cd276af9ed14a8b2939a734364c2b0042485e90e1b97175e73dfd548 1.16kB / 1.16kB 0.0s
=> => sha256:0dac3dc27b1ad570e6c3a7f7cd29e88e7130ff0cad31b2ec5a0f222fbe971bdb 6.44kB / 6.44kB 0.0s
=> CANCELED [base 2/6] RUN apt-get update 0.3s
=> CACHED [ui-build 2/14] WORKDIR /app 0.0s
=> CACHED [ui-build 3/14] RUN npm install react-scripts@latest -g 0.0s
=> ERROR [ui-build 4/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/package.json package.json 0.0s
=> ERROR [ui-build 5/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/package-lock.json package-lock.json 0.0s
=> ERROR [ui-build 6/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/craco.config.js craco.config.js 0.0s
=> ERROR [ui-build 7/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/.env.production .env.local 0.0s
=> CACHED [ui-build 8/14] RUN npm ci 0.0s
=> ERROR [ui-build 9/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/. . 0.0s
=> CACHED [ui-build 10/14] RUN npm run build 0.0s
=> ERROR [ui-build 11/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/nginx/nginx.conf /etc/nginx/conf.d/default.c 0.0s
=> ERROR [ui-build 12/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/nginx/nginx.gzip.conf /etc/nginx/conf.d/gzip 0.0s
=> ERROR [ui-build 13/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/nginx/ssl/authserver-ui.crt /etc/nginx/ssl/a 0.0s
=> ERROR [ui-build 14/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/nginx/ssl/authserver-ui.key /etc/nginx/ssl/a 0.0s
=> CACHED [build 2/3] WORKDIR /src 0.0s
=> CACHED [build 3/3] COPY . ./ 0.0s
=> ERROR [publish 1/28] COPY ./cdr-auth-server/Source/CdrAuthServer.Domain/. /app/CdrAuthServer.Domain 0.0s
=> ERROR [publish 2/28] COPY ./cdr-auth-server/Source/CdrAuthServer.Repository/. /app/CdrAuthServer.Repository 0.0s
=> ERROR [publish 3/28] COPY ./cdr-auth-server/Source/CdrAuthServer/. /app/CdrAuthServer 0.0s
=> ERROR [publish 4/28] COPY ./cdr-auth-server/Source/CdrAuthServer.Infrastructure/. /app/CdrAuthServer.Infrastructu 0.0s
=> ERROR [publish 5/28] COPY ./cdr-auth-server/Source/CdrAuthServer.API.Logger/. /app/CdrAuthServer.API.Logger 0.0s
------
> [ui-build 4/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/package.json package.json:
------
------
> [ui-build 5/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/package-lock.json package-lock.json:
------
------
> [ui-build 6/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/craco.config.js craco.config.js:
------
------
> [ui-build 7/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/.env.production .env.local:
------
------
> [ui-build 9/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/. .:
------
------
> [ui-build 11/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/nginx/nginx.conf /etc/nginx/conf.d/default.conf:
------
------
> [ui-build 12/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/nginx/nginx.gzip.conf /etc/nginx/conf.d/gzip.conf:
------
------
> [ui-build 13/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/nginx/ssl/authserver-ui.crt /etc/nginx/ssl/authserver-ui.c
rt:
------
------
> [ui-build 14/14] COPY ./cdr-auth-server/Source/CdrAuthServer.UI/nginx/ssl/authserver-ui.key /etc/nginx/ssl/authserver-ui.k
ey:
------
------
> [publish 1/28] COPY ./cdr-auth-server/Source/CdrAuthServer.Domain/. /app/CdrAuthServer.Domain:
------
------
> [publish 2/28] COPY ./cdr-auth-server/Source/CdrAuthServer.Repository/. /app/CdrAuthServer.Repository:
------
------
> [publish 3/28] COPY ./cdr-auth-server/Source/CdrAuthServer/. /app/CdrAuthServer:
------
------
> [publish 4/28] COPY ./cdr-auth-server/Source/CdrAuthServer.Infrastructure/. /app/CdrAuthServer.Infrastructure:
------
------
> [publish 5/28] COPY ./cdr-auth-server/Source/CdrAuthServer.API.Logger/. /app/CdrAuthServer.API.Logger:
------
Dockerfile:61
--------------------
59 | COPY ./cdr-auth-server/Source/CdrAuthServer/. /app/CdrAuthServer
60 | COPY ./cdr-auth-server/Source/CdrAuthServer.Infrastructure/. /app/CdrAuthServer.Infrastructure
61 | >>> COPY ./cdr-auth-server/Source/CdrAuthServer.API.Logger/. /app/CdrAuthServer.API.Logger
62 |
63 | COPY ./CDR.DataHolder.API.Infrastructure/. /app/CDR.DataHolder.API.Infrastructure
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref b0441941-3dd2-46f7-8029-771f117b4352
::e9xuimlcijmziq6mydxpnm3x6: "/cdr-auth-server/Source/CdrAuthServer.API.Logger": not found
Additional context
Describe the bug
The mandatory header x-v is not being returned
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
Return the x-v header as per DSB published standard
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.