Skip to content

Commit

Permalink
chore: global replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
KenLSM committed Oct 28, 2024
1 parent 36751d7 commit 72e849e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion __tests__/setup/.test-env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/DEPLOYMENT_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion src/app/config/features/spcp-myinfo.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const spcpMyInfoSchema: Schema<ISpcpMyInfo> = {
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',
Expand Down
6 changes: 3 additions & 3 deletions src/app/routes/singpass/__tests__/sp.oidc.jwks.routes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/app/routes/singpass/sp.oidc.jwks.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

Expand Down

0 comments on commit 72e849e

Please sign in to comment.