diff --git a/__tests__/setup/.test-env b/__tests__/setup/.test-env index 4120ccb9cb..552f85f4b1 100644 --- a/__tests__/setup/.test-env +++ b/__tests__/setup/.test-env @@ -81,7 +81,7 @@ INTRANET_IP_LIST_PATH=__tests__/setup/mock-intranet-ips.txt MOCKPASS_NRIC=S9812379B MOCKPASS_UID=S8979373D # Not used by mockpass but keep in sync with MOCKPASS_UEN for Corppass tests MOCKPASS_UEN=123456789A -SP_RP_JWKS_ENDPOINT=http://localhost:5000/singpass/.well-known/jwks.json +SP_RP_JWKS_ENDPOINT=http://localhost:5000/sp/.well-known/jwks.json CP_RP_JWKS_ENDPOINT=http://localhost:5000/api/v3/corppass/.well-known/jwks.json # Payment env vars diff --git a/docker-compose.yml b/docker-compose.yml index b2723c3ea2..0a91a3a175 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -145,7 +145,7 @@ services: - MOCKPASS_NRIC=S6005038D - MOCKPASS_UEN=123456789A - SHOW_LOGIN_PAGE=true - - SP_RP_JWKS_ENDPOINT=http://localhost:5000/singpass/.well-known/jwks.json + - SP_RP_JWKS_ENDPOINT=http://localhost:5000/sp/.well-known/jwks.json - CP_RP_JWKS_ENDPOINT=http://localhost:5000/api/v3/corppass/.well-known/jwks.json network_mode: 'service:backend' # reuse backend service's network stack so that it can resolve localhost:5156 to mockpass:5156 diff --git a/docs/DEPLOYMENT_SETUP.md b/docs/DEPLOYMENT_SETUP.md index 3fe0ef2f13..1b73198ca0 100644 --- a/docs/DEPLOYMENT_SETUP.md +++ b/docs/DEPLOYMENT_SETUP.md @@ -297,7 +297,7 @@ Note that MyInfo is currently not supported for storage mode forms and enabling | `SP_OIDC_NDI_JWKS_ENDPOINT` | NDI's Singpass OIDC JWKS Endpoint | | `SP_OIDC_RP_CLIENT_ID` | The Relying Party's Singpass Client ID as registered with NDI | | `SP_OIDC_RP_REDIRECT_URL` | The Relying Party's Singpass Redirect URL | -| `SP_OIDC_RP_JWKS_PUBLIC_PATH` | Path to the Relying Party's Public Json Web Key Set used for Singpass-related communication with NDI. This will be hosted at /singpass/.well-known/jwks.json endpoint. | +| `SP_OIDC_RP_JWKS_PUBLIC_PATH` | Path to the Relying Party's Public Json Web Key Set used for Singpass-related communication with NDI. This will be hosted at /sp/.well-known/jwks.json endpoint. | | `SP_OIDC_RP_JWKS_SECRET_PATH` | Path to the Relying Party's Secret Json Web Key Set used for Singpass-related communication with NDI | | `CP_OIDC_NDI_DISCOVERY_ENDPOINT` | NDI's Corppass OIDC Discovery Endpoint | | `CP_OIDC_NDI_JWKS_ENDPOINT` | NDI's Corppass OIDC JWKS Endpoint | diff --git a/src/app/config/features/spcp-myinfo.config.ts b/src/app/config/features/spcp-myinfo.config.ts index b2833789dd..4ef81c78df 100644 --- a/src/app/config/features/spcp-myinfo.config.ts +++ b/src/app/config/features/spcp-myinfo.config.ts @@ -154,7 +154,7 @@ const spcpMyInfoSchema: Schema = { env: 'SP_OIDC_RP_REDIRECT_URL', }, spOidcRpJwksPublicPath: { - doc: "Path to the Relying Party's Public Json Web Key Set used for Singpass-related communication with NDI. This will be hosted at /singpass/.well-known/jwks.json endpoint.", + doc: "Path to the Relying Party's Public Json Web Key Set used for Singpass-related communication with NDI. This will be hosted at /sp/.well-known/jwks.json endpoint.", format: String, default: null, env: 'SP_OIDC_RP_JWKS_PUBLIC_PATH', diff --git a/src/app/routes/singpass/__tests__/sp.oidc.jwks.routes.spec.ts b/src/app/routes/singpass/__tests__/sp.oidc.jwks.routes.spec.ts index d0dbd77802..0fdc7ff2f9 100644 --- a/src/app/routes/singpass/__tests__/sp.oidc.jwks.routes.spec.ts +++ b/src/app/routes/singpass/__tests__/sp.oidc.jwks.routes.spec.ts @@ -5,7 +5,7 @@ import session, { Session } from 'supertest-session' import { MOCK_SERVICE_PARAMS } from '../../../modules/spcp/__tests__/spcp.test.constants' import { SpOidcJwksRouter } from '../sp.oidc.jwks.routes' -const app = setupApp('/singpass/.well-known/jwks.json', SpOidcJwksRouter) +const app = setupApp('/sp/.well-known/jwks.json', SpOidcJwksRouter) describe('sp.oidc.jwks.router', () => { let request: Session @@ -14,10 +14,10 @@ describe('sp.oidc.jwks.router', () => { request = session(app) }) - describe('GET /singpass/.well-known/jwks.json', () => { + describe('GET /sp/.well-known/jwks.json', () => { it('should return 200 with the public jwks', async () => { // Act - const response = await request.get('/singpass/.well-known/jwks.json') + const response = await request.get('/sp/.well-known/jwks.json') const responseJson = JSON.parse(response.text) const expectedJson = JSON.parse( diff --git a/src/app/routes/singpass/sp.oidc.jwks.routes.ts b/src/app/routes/singpass/sp.oidc.jwks.routes.ts index d304a95441..4aab12a8b9 100644 --- a/src/app/routes/singpass/sp.oidc.jwks.routes.ts +++ b/src/app/routes/singpass/sp.oidc.jwks.routes.ts @@ -7,7 +7,7 @@ export const SpOidcJwksRouter = Router() /** * Returns the RP's public json web key set (JWKS) for communication with NDI - * @route GET /singpass/.well-known/jwks.json + * @route GET /sp/.well-known/jwks.json * @returns 200 */