Skip to content

DEFRA/epr-re-ex-entra-stub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

epr-re-ex-entra-stub

Entra ID stub service providing OAuth 2.0/OIDC endpoints for RE EX EPR testing and development.

Based on fg-entra-stub-frontend with some changes to support RE EX EPR.

Requirements

Quick Start

Use supported version of Node:

nvm use

Install dependencies:

npm install

Run:

npm run dev

Clients and Users

Clients and users are defined in the codebase:

Public / Private Keys

Keys used to sign and verify tokens are defined in the codebase:

Endpoints

  • GET/POST /authorize - OAuth 2.0 authorization endpoint
  • POST /token - Token exchange endpoint
  • GET /jwks - JSON Web Key Set endpoint
  • POST /sign - Token signing endpoint
  • GET /.well-known/openid-configuration - OIDC discovery endpoint

Environment variables (For Docker tests)

STUB_EXTERNAL_URL = URL that is used to redirect to the Stub UI
STUB_INTERNAL_URL = URL that is used by calling service directly (via backend / HTTP calls)
CALLBACK_BASE_URL = Base URL for the callback (i.e. the calling service)

Override them as needed (e.g. Docker, or in environments).

Generate a token

curl -H 'Content-Type: application/json' -d '{"clientId":"clientId","username":"ea@test.gov.uk"}' http://localhost:3010/sign

Docker

Development

docker build --target development --tag epr-re-ex-entra-stub:dev .
docker run -p 3010:3010 epr-re-ex-entra-stub:dev

Production

docker build --tag epr-re-ex-entra-stub .
docker run -p 3010:3010 epr-re-ex-entra-stub

With Docker Compose

docker compose up --build -d

Licence

THIS INFORMATION IS LICENSED UNDER THE CONDITIONS OF THE OPEN GOVERNMENT LICENCE found at:

http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3

The following attribution statement MUST be cited in your products and applications when using this information.

Contains public sector information licensed under the Open Government license v3

About the licence

The Open Government Licence (OGL) was developed by the Controller of Her Majesty's Stationery Office (HMSO) to enable information providers in the public sector to license the use and re-use of their information under a common open licence.

It is designed to encourage use and re-use of information freely and flexibly, with only a few conditions.

About

Git repository for service epr-re-ex-entra-stub

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors