Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/civ 11894 #3647

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a1ea398
CIV-11894 Switched call to IDAM endpoint
German-A-Amoros Jan 19, 2024
f717577
CIV-11894 Fix tests
German-A-Amoros Jan 19, 2024
11a8c46
CIV-11894 Fix tests
German-A-Amoros Jan 19, 2024
5427f3d
CIV-11894 Fix tests
German-A-Amoros Jan 19, 2024
fbbbe64
Update Chart
German-A-Amoros Jan 25, 2024
817f93f
Revert "Update Chart"
German-A-Amoros Jan 30, 2024
e975430
CIV-11894 Update semver
German-A-Amoros Feb 1, 2024
324de23
Update preview chart secrets & alias' to reflect latest in claim-store
Andrew-McMahon7 Feb 5, 2024
ea8cd80
CIV-11894 Update preview chart secrets & alias' to reflect latest in …
German-A-Amoros Feb 6, 2024
6cd089f
Attempt docker uninstall
Andrew-McMahon7 Feb 6, 2024
f7a4999
Attempt docker uninstall
Andrew-McMahon7 Feb 6, 2024
7052757
Remove sudo
Andrew-McMahon7 Feb 6, 2024
0adec7a
Revert to old and test changing docker-compose version
Andrew-McMahon7 Feb 7, 2024
ee543ad
Revert to original docker-compose and upgrade python library
Andrew-McMahon7 Feb 7, 2024
b68d794
pin docker version
Andrew-McMahon7 Feb 7, 2024
d248c4e
Update yarn lock file
Andrew-McMahon7 Feb 7, 2024
e55f9b4
CIV-11894 Apply Andrew's fix
German-A-Amoros Feb 8, 2024
54a6ccd
CIV-11894 Updated semver
German-A-Amoros Feb 8, 2024
962b12b
Merge branch 'aks-deploy-fix' of github.com:hmcts/cmc-citizen-fronten…
German-A-Amoros Feb 8, 2024
7f78ac6
CIV-11894 updated yarn audit
German-A-Amoros Feb 8, 2024
a9b9e53
Merge branch 'master' into feature/CIV-11894
linusnorton Feb 12, 2024
53ec273
CIV-11894 Added scope
German-A-Amoros Feb 12, 2024
5496b13
CIV-11894 Fix url
German-A-Amoros Feb 12, 2024
089d0a6
CIV-11894 Fix tests
German-A-Amoros Feb 12, 2024
13cd770
CIV-11894 Fix test
German-A-Amoros Feb 12, 2024
46ec8f6
CIV-11894 Updated yarn-audit
German-A-Amoros Feb 14, 2024
c45a145
CIV-11894 Reverted changes for endpoints /login/pin and /login/uplift
German-A-Amoros Feb 19, 2024
fed288f
CIV-11894 Fix functional tests
German-A-Amoros Mar 19, 2024
06a7684
Merge branch 'master' of github.com:hmcts/cmc-citizen-frontend into f…
German-A-Amoros Mar 19, 2024
90b6266
CIV-11894 Fix yarn audit
German-A-Amoros Mar 19, 2024
d4f2e70
CIV-11894 Test fix for functional tests
German-A-Amoros Mar 22, 2024
29017f9
Civ-11894 Fix yarn audit
German-A-Amoros Mar 22, 2024
f5728a1
CIV-11894 Fix typo
German-A-Amoros Mar 22, 2024
3e9d73b
CIV-11894 Revert codecept version
German-A-Amoros Mar 22, 2024
d6a779d
CIV-11894 fix yarn.lock
German-A-Amoros Mar 22, 2024
c02d37e
CIV-11894 fix yarn-audit
German-A-Amoros Mar 22, 2024
aadb833
CIV-11894 Fix yarn-audit
German-A-Amoros Mar 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions audit.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
"10055_CSP: style-src unsafe-inline_https://moneyclaims.aat.platform.hmcts.net/terms-and-conditions_GET": "ignore",
"10055_CSP: style-src unsafe-inline_https://moneyclaims.aat.platform.hmcts.net/ruxitagentjs_ICA2QSVfqru_10193200616095656.js_GET": "ignore",
"10055_CSP: style-src unsafe-inline_https://moneyclaims.aat.platform.hmcts.net/ruxitagentjs_ICA2QSVfjqru_10193200616095656.js_GET": "ignore",
"90011_Charset Mismatch (Header Versus Meta Content-Type Charset)_https://idam-web-public.aat.platform.hmcts.net/login?response_type=code&state=f869bd5d-d7bf-4e72-a652-657aa70cb30b&client_id=cmc_citizen&redirect_uri=https://moneyclaims.aat.platform.hmcts.net/receiver_GET": "ignore",
"90011_Charset Mismatch (Header Versus Meta Content-Type Charset)_https://idam-web-public.aat.platform.hmcts.net/login?response_type=code\\u0026state=ac635d10-d8cf-42ea-82bf-fe357defdc77\\u0026client_id=cmc_citizen\\u0026redirect_uri=https://moneyclaims.aat.platform.hmcts.net/receiver_GET": "ignore",
"10038_Content Security Policy (CSP) Header Not Set_https://idam-web-public.aat.platform.hmcts.net/login?response_type=code&state=f869bd5d-d7bf-4e72-a652-657aa70cb30b&client_id=cmc_citizen&redirect_uri=https://moneyclaims.aat.platform.hmcts.net/receiver_GET": "ignore",
"90011_Charset Mismatch (Header Versus Meta Content-Type Charset)_https://idam-web-public.aat.platform.hmcts.net/o/authorize?response_type=code&state=f869bd5d-d7bf-4e72-a652-657aa70cb30b&client_id=cmc_citizen&redirect_uri=https://moneyclaims.aat.platform.hmcts.net/receiver_GET&scope=openid%20profile%20roles": "ignore",
"90011_Charset Mismatch (Header Versus Meta Content-Type Charset)_https://idam-web-public.aat.platform.hmcts.net/o/authorize?response_type=code\\u0026state=ac635d10-d8cf-42ea-82bf-fe357defdc77\\u0026client_id=cmc_citizen\\u0026redirect_uri=https://moneyclaims.aat.platform.hmcts.net/receiver_GET&scope=openid%20profile%20roles": "ignore",
"10038_Content Security Policy (CSP) Header Not Set_https://idam-web-public.aat.platform.hmcts.net/o/authorize?response_type=code&state=f869bd5d-d7bf-4e72-a652-657aa70cb30b&client_id=cmc_citizen&redirect_uri=https://moneyclaims.aat.platform.hmcts.net/receiver_GET&scope=openid%20profile%20roles": "ignore",
"10010_Cookie No HttpOnly Flag_https://moneyclaims.aat.platform.hmcts.net/_GET": "ignore",
"10010_Cookie No HttpOnly Flag_https://moneyclaims.aat.platform.hmcts.net/accessibility-statement_GET": "ignore",
"10010_Cookie No HttpOnly Flag_https://moneyclaims.aat.platform.hmcts.net/contact-us_GET": "ignore",
Expand Down Expand Up @@ -133,7 +133,7 @@
"90027_Cookie Slack Detector_https://moneyclaims.aat.platform.hmcts.net/webchat/javascript/webchart-init.js_GET": "ignore",
"90027_Cookie Slack Detector_https://moneyclaims.aat.platform.hmcts.net/webchat_GET": "ignore",
"90027_Cookie Slack Detector_https://moneyclaims.aat.platform.hmcts.net_GET": "ignore",
"10054_Cookie Without SameSite Attribute_https://idam-web-public.aat.platform.hmcts.net/login?response_type=code&state=f869bd5d-d7bf-4e72-a652-657aa70cb30b&client_id=cmc_citizen&redirect_uri=https://moneyclaims.aat.platform.hmcts.net/receiver_GET": "ignore",
"10054_Cookie Without SameSite Attribute_https://idam-web-public.aat.platform.hmcts.net/o/authorize?response_type=code&state=f869bd5d-d7bf-4e72-a652-657aa70cb30b&client_id=cmc_citizen&redirect_uri=https://moneyclaims.aat.platform.hmcts.net/receiver_GET&scope=openid%20profile%20roles": "ignore",
"10054_Cookie Without SameSite Attribute_https://moneyclaims.aat.platform.hmcts.net/_GET": "ignore",
"10054_Cookie Without SameSite Attribute_https://moneyclaims.aat.platform.hmcts.net/accessibility-statement_GET": "ignore",
"10054_Cookie Without SameSite Attribute_https://moneyclaims.aat.platform.hmcts.net/contact-us_GET": "ignore",
Expand Down Expand Up @@ -180,7 +180,7 @@
"10011_Cookie Without Secure Flag_https://moneyclaims.aat.platform.hmcts.net/receiver_GET": "ignore",
"10098_Cross-Domain Misconfiguration_https://moneyclaims.aat.platform.hmcts.net/ruxitagentjs_ICA2QSVfqru_10193200616095656.js_GET": "ignore",
"10098_Cross-Domain Misconfiguration_https://moneyclaims.aat.platform.hmcts.net/ruxitagentjs_ICA2QSVfjqru_10193200616095656.js_GET": "ignore",
"10015_Incomplete or No Cache-control and Pragma HTTP Header Set_https://idam-web-public.aat.platform.hmcts.net/login?response_type=code&state=f869bd5d-d7bf-4e72-a652-657aa70cb30b&client_id=cmc_citizen&redirect_uri=https://moneyclaims.aat.platform.hmcts.net/receiver_GET": "ignore",
"10015_Incomplete or No Cache-control and Pragma HTTP Header Set_https://idam-web-public.aat.platform.hmcts.net/o/authorize?response_type=code&state=f869bd5d-d7bf-4e72-a652-657aa70cb30b&client_id=cmc_citizen&redirect_uri=https://moneyclaims.aat.platform.hmcts.net/receiver_GET&scope=openid%20profile%20roles": "ignore",
"10015_Incomplete or No Cache-control and Pragma HTTP Header Set_https://moneyclaims.aat.platform.hmcts.net/img/lib/gov.uk_logotype_crown.svg?0.26.0_GET": "ignore",
"10015_Incomplete or No Cache-control and Pragma HTTP Header Set_https://moneyclaims.aat.platform.hmcts.net/stylesheets/application.css_GET": "ignore",
"10015_Incomplete or No Cache-control and Pragma HTTP Header Set_https://moneyclaims.aat.platform.hmcts.net/stylesheets/lib/fonts.css?0.26.0_GET": "ignore",
Expand Down Expand Up @@ -262,7 +262,7 @@
"40025_Proxy Disclosure_https://moneyclaims.aat.platform.hmcts.net/webchat/javascript_GET": "ignore",
"40025_Proxy Disclosure_https://moneyclaims.aat.platform.hmcts.net/webchat_GET": "ignore",
"40025_Proxy Disclosure_https://moneyclaims.aat.platform.hmcts.net_GET": "ignore",
"10108_Reverse Tabnabbing_https://idam-web-public.aat.platform.hmcts.net/login?response_type=code&state=f869bd5d-d7bf-4e72-a652-657aa70cb30b&client_id=cmc_citizen&redirect_uri=https://moneyclaims.aat.platform.hmcts.net/receiver_GET": "ignore",
"10108_Reverse Tabnabbing_https://idam-web-public.aat.platform.hmcts.net/o/authorize?response_type=code&state=f869bd5d-d7bf-4e72-a652-657aa70cb30b&client_id=cmc_citizen&redirect_uri=https://moneyclaims.aat.platform.hmcts.net/receiver_GET&scope=openid%20profile%20roles": "ignore",
"10035_Strict-Transport-Security Header Not Set_https://moneyclaims.aat.platform.hmcts.net/ruxitagentjs_ICA2QSVfqru_10193200616095656.js_GET": "ignore",
"10035_Strict-Transport-Security Header Not Set_https://moneyclaims.aat.platform.hmcts.net/ruxitagentjs_ICA2QSVfjqru_10193200616095656.js_GET": "ignore",
"10096_Timestamp Disclosure - Unix_https://moneyclaims.aat.platform.hmcts.net/accessibility-statement_GET": "ignore",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
},
"dependencies": {
"@analytics/google-tag-manager": "^0.5.3",
"@codeceptjs/configure": "^0.10.0",
"@hmcts/class-validator": "^0.9.1-e",
"@hmcts/cmc-draft-store-middleware": "^2.0.1",
"@hmcts/cmc-validators": "^0.2.6",
Expand Down
5 changes: 4 additions & 1 deletion src/integration-test/tests/citizen/home/pages/login.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import I = CodeceptJS.I
import * as codeceptjs from 'codeceptjs'

const I: I = actor()
const I = codeceptjs.actor()

const fields = {
username: { css: '#username' },
Expand All @@ -17,6 +18,8 @@ export class LoginPage {
}

login (email: string, password: string): void {
I.waitForText('Email address', 60)
I.waitForVisible(fields.username)
I.fillField(fields.username, email)
I.fillField(fields.password, password)
I.click(buttons.submit)
Expand Down
3 changes: 2 additions & 1 deletion src/main/app/idam/oAuthHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { User } from 'idam/user'
const clientId = config.get<string>('oauth.clientId')

const loginPath = `${config.get('idam.authentication-web.url')}/login`
const authorizePath = `${config.get('idam.authentication-web.url')}/o/authorize`

export class OAuthHelper {

Expand All @@ -20,7 +21,7 @@ export class OAuthHelper {
const state = uuid()
OAuthHelper.storeStateCookie(req, res, state)

return `${loginPath}?response_type=code&state=${state}&client_id=${clientId}&redirect_uri=${redirectUri}`
return `${authorizePath}?response_type=code&state=${state}&client_id=${clientId}&redirect_uri=${redirectUri}&scope=openid profile roles`
}

static forPin (req: express.Request, res: express.Response, claimReference: string): string {
Expand Down
2 changes: 1 addition & 1 deletion src/test/routes/authorization-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'test/routes/expectations'
import * as idamServiceMock from 'test/http-mocks/idam'

const cookieName: string = config.get<string>('session.cookieName')
export const defaultAccessDeniedPagePattern = new RegExp(`${config.get('idam.authentication-web.url')}/login\\?response_type=code&state=[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}&client_id=cmc_citizen&redirect_uri=https://127.0.0.1:[0-9]{1,5}/receiver`)
export const defaultAccessDeniedPagePattern = new RegExp(`${config.get('idam.authentication-web.url')}/o/authorize\\?response_type=code&state=[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}&client_id=cmc_citizen&redirect_uri=https://127.0.0.1:[0-9]{1,5}/receiver&scope=openid%20profile%20roles`)

export function checkAuthorizationGuards (app: any,
method: string,
Expand Down
4 changes: 2 additions & 2 deletions src/test/routes/receiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ describe('Login receiver', async () => {
await request(app)
.get(`${AppPaths.receiver.uri}?code=ABC&state=123`)
.set('Cookie', 'state=123')
.expect(res => expect(res).to.be.redirect.toLocation(/.*\/login.*/))
.expect(res => expect(res).to.be.redirect.toLocation(/.*\/o\/authorize.*/))
})

it('For expired user credentials should return error otherwise', async () => {
Expand Down Expand Up @@ -242,7 +242,7 @@ describe('Defendant link receiver', () => {

await request(app)
.get(`${pagePath}?code=123`)
.expect(res => expect(res).to.be.redirect.toLocation(/.*\/login.*/))
.expect(res => expect(res).to.be.redirect.toLocation(/.*\/o\/authorize.*/))
})
})
})
Expand Down
Loading
Loading