Skip to content

Commit

Permalink
Create/align the current preview with 2.1.0-RC1. (#372)
Browse files Browse the repository at this point in the history
* Sidm 4015 welsh functional tests (#352)

* Add functional tests: duplicate registration in different languages

* Welsh tests.

* Welsh tests.

* Welsh tests.

* Welsh tests.

* Merge demo to preview after merging master to demo (#365)

* Sidm 4015 welsh functional tests (#352) (#362)

* Add functional tests: duplicate registration in different languages

* Welsh tests.

* Welsh tests.

* Welsh tests.

* Welsh tests.

* merge master to demo (#364)

* Adding back the prod deployment blocker (#189)

* extra tests for code quality (#196)

* Removing blocker for go live

* Load vault secrets fix

* Security fix

* Adding go live blocker

* Securityscan master (#197)

* adding security scan config

* update public uRI

* adding fun-output dir to gitignore

* adding aat url

* Exclude jquery from the zap scanners.

* [PREVIEW] Fixing the pipeline (#211)

* [PREVIEW] SIDM-3007 SIDM-3089 SIDM-3090 Fix PR asp_name, update Dockerfile, add CVE suppression (#201)

* fix(local.asp_name): add conditional case for asp_name when running PRs

By using the asp_name_override for idam-api, idam-web-public and idam-web-admin for PRs, pipelines
cannot run in parallel as they clash with each other. Do not use asp_name_override for PRs.

* feat(security suppression): add suppression for pitest related to CVE-2019-15052

pitest 1.3.0 and 1.4.0 are flagged under CVE-2019-15052 but are only used in testing. 1.4.0 is the latest release

SIDM-3090

* fix(base image/insights agent): update Dockerfile as base image is no longer available

* Change ref in the terraform file.

* [PREVIEW] Minor content changes for 1.4.1 (#210)

* SIDM-3130 Contact Us screen - Update SSCS details.

* SIDM-2904 Update Survey feedback link across IDAM public screens.

* [PREVIEW] 1.4.1 Scope Change (#216) (#218)

* SIDM-2904 Manually revert SIDM-2904.

* SIDM-2757 Fix double apostrophe in a message. (#187)

* [PREVIEW] footer pages update (#194)

* Add 'Family Public Law' section to the 'Contact Us' page.

* Add Family Public Law Service info to cookies and privacy policy pages.

* A few adjustements.

* Remove repetition.

* Add a space.

* SIDM-2412 Remove records about 2 cookies which are not used in the Family Public Law Service. (#204)

* Add CVE-14540 and 16335 supressions

* Adding prod blocker

* Disable functional tests

* Web public tests 1.5 (#267)

* special character password test

* added password characters

* changed password characters

* redued wait time

* Sidm 3294 mfa e2e tests (#256)

* add mfa otp login tests

* add missing file

* fix typo

* add missing code

* fix test failures

* add more waits

* add more waits

* add exiplit wait

* add block policy scenario

* feat(SIDM-3410-ips): filter out internal ips from policy valuation (#270)

* feat(SIDM-3410-ips): filter out internal ips from policy valuation

* feat(SIDM-3410-ips): simplify and merge methods

* feat(SIDM-3410-ips): simplify regex

* This should fix the ArrAffinity token problem (#277)

* feat(SIDM-3441-sso): Policy eval: remove bearer auth token (#283)

* Include fix for 1.5 (#275)

* feat(SIDM-3410-ips-preview): remove filter pattern in preview (#272)

* Updating with for suggestions (#273)

* Updating with for suggestions

* Need to escape the dot

* feat(sidm-3410-rc2): merge 3410 preview into RC (#284)

* Updating with for suggestions (#273)

* fix(vnet_private_ip_pattern): update escape syntax (#281)

* feat(SIDM-3410-fix-def): use same escaping as preview which is tested (#285)

* feat(SIDM-3437-redir): login/mfa: redirecting using slash (#280) (#287)

* Adding prod blocker

* Duplicated code fix

* Enable functionals

* Update contact us details. (#253)

* Removing prod blocker

* Eliminating vulnerabilities

* Removing blocker

* Disable functionals

* Adding support for multiple affinity cookies (#332)

Co-authored-by: Nikola Naydenov <nikolanaydenov@AML0232.local>

* Apply suggestions from code review

* remove waits and add suggestions

* fix test failure

* add wait for failing tests

* ci(prod blocker): add

* fix hmcts policy set for block user test

* fix(aat deployment): add credential and environment overrides

* 2.0 RC (#330)

* Eliminating vulnerabilities

* fix unknown char in email links (#317)

* SIDM-3511 - Update chart-java release 2.16.0 (#318)

* build(chart-java): update chart-java release to 2.16.0

* refactor(cicd): remove deprecated enableDockerBuild()

* feat(staging deployment): add aat values for helm

* feat(sidm-3483-fr6): 6.5 web-public (#315) (#321)

* feat(sidm-3483-fr6): update test regex to extract activation parssword

* feat(sidm-3483-fr6): password reset working but had to change some of the codecepts waits

* feat(sidm-3483-fr6): add 2s wait after Sign In to fix flappy test

* feat(sidm-3483-fr6): remove waits because it was fixed by Shravs changes on codecept conf

* chore(ase asp): disable legacy deployments (#323)

* ci(env name): add override for env name for build with aks (#325)

* Sidm 3561 compare screenshot test (#308)

* screen shot compare test

* updated code

* updated cnp file

* added base screen shot folder to repo

* added functional-output to git ignore

* taking base screen shot is set to false

* added diff folder to screenshot folder

* added diff folder and ignore functional output

* removed some images from base folder

* added f-output folder to gitignore

* removed some images from base folder

* removed some images from base folder

* set base image to false in ui tests

* added foutput folder to gitignore

* update policy check test

* added foutput to gitignore

* updated code to run all functional tests

* updated policy check test

* added foutput to gitignore

* change name of base screen shot

* removed foutpit from gitignore

* added wait to failed tests

* added foitput to gitignore

* added ignore screen compare code

* added wait

* updates screen shot

* removed screen shot

* added foutput folder to gitignore

* applied retry

* added resemblence helper to package.json

* added resemblance helper

* enabled screen shot for visual testing

* cleaned up code

* added functional output folder to gitignore

* ingored package.lock.json

* Delete package-lock.json

* added dependencies

* added node fetch dependency

* updared lockout test

Co-authored-by: Shravan Mechineni <shravanmechineni5@gmail.com>

* Idam nightly tests (#326)

* Adding back the prod deployment blocker (#189)

* extra tests for code quality (#196)

* Removing blocker for go live

* Load vault secrets fix

* Security fix

* Adding go live blocker

* Securityscan master (#197)

* adding security scan config

* update public uRI

* adding fun-output dir to gitignore

* adding aat url

* Exclude jquery from the zap scanners.

* [PREVIEW] Fixing the pipeline (#211)

* [PREVIEW] SIDM-3007 SIDM-3089 SIDM-3090 Fix PR asp_name, update Dockerfile, add CVE suppression (#201)

* fix(local.asp_name): add conditional case for asp_name when running PRs

By using the asp_name_override for idam-api, idam-web-public and idam-web-admin for PRs, pipelines
cannot run in parallel as they clash with each other. Do not use asp_name_override for PRs.

* feat(security suppression): add suppression for pitest related to CVE-2019-15052

pitest 1.3.0 and 1.4.0 are flagged under CVE-2019-15052 but are only used in testing. 1.4.0 is the latest release

SIDM-3090

* fix(base image/insights agent): update Dockerfile as base image is no longer available

* Change ref in the terraform file.

* [PREVIEW] Minor content changes for 1.4.1 (#210)

* SIDM-3130 Contact Us screen - Update SSCS details.

* SIDM-2904 Update Survey feedback link across IDAM public screens.

* [PREVIEW] 1.4.1 Scope Change (#216) (#218)

* SIDM-2904 Manually revert SIDM-2904.

* SIDM-2757 Fix double apostrophe in a message. (#187)

* [PREVIEW] footer pages update (#194)

* Add 'Family Public Law' section to the 'Contact Us' page.

* Add Family Public Law Service info to cookies and privacy policy pages.

* A few adjustements.

* Remove repetition.

* Add a space.

* SIDM-2412 Remove records about 2 cookies which are not used in the Family Public Law Service. (#204)

* Add CVE-14540 and 16335 supressions

* Adding prod blocker

* Disable functional tests

* Web public tests 1.5 (#267)

* special character password test

* added password characters

* changed password characters

* redued wait time

* Sidm 3294 mfa e2e tests (#256)

* add mfa otp login tests

* add missing file

* fix typo

* add missing code

* fix test failures

* add more waits

* add more waits

* add exiplit wait

* add block policy scenario

* feat(SIDM-3410-ips): filter out internal ips from policy valuation (#270)

* feat(SIDM-3410-ips): filter out internal ips from policy valuation

* feat(SIDM-3410-ips): simplify and merge methods

* feat(SIDM-3410-ips): simplify regex

* This should fix the ArrAffinity token problem (#277)

* feat(SIDM-3441-sso): Policy eval: remove bearer auth token (#283)

* Include fix for 1.5 (#275)

* feat(SIDM-3410-ips-preview): remove filter pattern in preview (#272)

* Updating with for suggestions (#273)

* Updating with for suggestions

* Need to escape the dot

* feat(sidm-3410-rc2): merge 3410 preview into RC (#284)

* Updating with for suggestions (#273)

* fix(vnet_private_ip_pattern): update escape syntax (#281)

* feat(SIDM-3410-fix-def): use same escaping as preview which is tested (#285)

* feat(SIDM-3437-redir): login/mfa: redirecting using slash (#280) (#287)

* Adding prod blocker

* Duplicated code fix

* updated security.sh file

* updated security.sh file

* added false positives to audit.json file

* added false positived to audit.json fike

* added false positives

* added false positives

* updated environment

* removed unwanted code

* updated functional tag

* updated secrets env to aat

* updated secrets env to aat

* updated url to external url

* enabled mutation tests

* added false positives to audit file

* updated audit file

* removed spaces

* removed spaces

* added false positives

* added false positives

* added false positives

* added false positives

* updated jenkins-nightly

* added false positives

* updated jenkins nightly

Co-authored-by: kremi <34029797+kremi@users.noreply.github.com>
Co-authored-by: NikolaNaydenov <47004340+NikolaNaydenov@users.noreply.github.com>
Co-authored-by: James Burke <james.burke@amido.com>
Co-authored-by: dfourn <dpatynski@gmail.com>
Co-authored-by: nikola-naydenov-hmcts <47384516+nikola-naydenov-hmcts@users.noreply.github.com>
Co-authored-by: Shravan Mechineni <shravanmechineni5@gmail.com>
Co-authored-by: tbamido <50667636+tbamido@users.noreply.github.com>

* Upgrade to tomcat 9.0.31 to address CVE-2020-1938

* Affinity cookie name is different

* Upgrade to tomcat 9.0.31 to address CVE-2020-1938

* Affinity cookie name is different

* Adding support for multiple affinity cookies (#332)

Co-authored-by: Nikola Naydenov <nikolanaydenov@AML0232.local>

* Apply suggestions from code review

* remove waits and add suggestions

* fix test failure

* add wait for failing tests

* ci(prod blocker): add

* fix hmcts policy set for block user test

* fix(aat deployment): add credential and environment overrides

Co-authored-by: Nikola Naydenov <nikola.naydenov@amido.com>
Co-authored-by: Shravan Mechineni <shravanmechineni5@gmail.com>
Co-authored-by: Henry Dobson <henrydobson@me.com>
Co-authored-by: tbamido <50667636+tbamido@users.noreply.github.com>
Co-authored-by: sudhasane <vanisekhar75@gmail.com>
Co-authored-by: NikolaNaydenov <47004340+NikolaNaydenov@users.noreply.github.com>
Co-authored-by: James Burke <james.burke@amido.com>
Co-authored-by: dfourn <dpatynski@gmail.com>
Co-authored-by: nikola-naydenov-hmcts <47384516+nikola-naydenov-hmcts@users.noreply.github.com>
Co-authored-by: Nikola Naydenov <nikolanaydenov@AML0232.local>
Co-authored-by: Shravan Mechineni <shravan.mechineni@ladbrokescoral.com>

* feat(chart): aat values

* 2.0.0 RC1 aat values (#336)

* Eliminating vulnerabilities

* fix unknown char in email links (#317)

* SIDM-3511 - Update chart-java release 2.16.0 (#318)

* build(chart-java): update chart-java release to 2.16.0

* refactor(cicd): remove deprecated enableDockerBuild()

* feat(staging deployment): add aat values for helm

* feat(sidm-3483-fr6): 6.5 web-public (#315) (#321)

* feat(sidm-3483-fr6): update test regex to extract activation parssword

* feat(sidm-3483-fr6): password reset working but had to change some of the codecepts waits

* feat(sidm-3483-fr6): add 2s wait after Sign In to fix flappy test

* feat(sidm-3483-fr6): remove waits because it was fixed by Shravs changes on codecept conf

* chore(ase asp): disable legacy deployments (#323)

* ci(env name): add override for env name for build with aks (#325)

* Sidm 3561 compare screenshot test (#308)

* screen shot compare test

* updated code

* updated cnp file

* added base screen shot folder to repo

* added functional-output to git ignore

* taking base screen shot is set to false

* added diff folder to screenshot folder

* added diff folder and ignore functional output

* removed some images from base folder

* added f-output folder to gitignore

* removed some images from base folder

* removed some images from base folder

* set base image to false in ui tests

* added foutput folder to gitignore

* update policy check test

* added foutput to gitignore

* updated code to run all functional tests

* updated policy check test

* added foutput to gitignore

* change name of base screen shot

* removed foutpit from gitignore

* added wait to failed tests

* added foitput to gitignore

* added ignore screen compare code

* added wait

* updates screen shot

* removed screen shot

* added foutput folder to gitignore

* applied retry

* added resemblence helper to package.json

* added resemblance helper

* enabled screen shot for visual testing

* cleaned up code

* added functional output folder to gitignore

* ingored package.lock.json

* Delete package-lock.json

* added dependencies

* added node fetch dependency

* updared lockout test

Co-authored-by: Shravan Mechineni <shravanmechineni5@gmail.com>

* Idam nightly tests (#326)

* Adding back the prod deployment blocker (#189)

* extra tests for code quality (#196)

* Removing blocker for go live

* Load vault secrets fix

* Security fix

* Adding go live blocker

* Securityscan master (#197)

* adding security scan config

* update public uRI

* adding fun-output dir to gitignore

* adding aat url

* Exclude jquery from the zap scanners.

* [PREVIEW] Fixing the pipeline (#211)

* [PREVIEW] SIDM-3007 SIDM-3089 SIDM-3090 Fix PR asp_name, update Dockerfile, add CVE suppression (#201)

* fix(local.asp_name): add conditional case for asp_name when running PRs

By using the asp_name_override for idam-api, idam-web-public and idam-web-admin for PRs, pipelines
cannot run in parallel as they clash with each other. Do not use asp_name_override for PRs.

* feat(security suppression): add suppression for pitest related to CVE-2019-15052

pitest 1.3.0 and 1.4.0 are flagged under CVE-2019-15052 but are only used in testing. 1.4.0 is the latest release

SIDM-3090

* fix(base image/insights agent): update Dockerfile as base image is no longer available

* Change ref in the terraform file.

* [PREVIEW] Minor content changes for 1.4.1 (#210)

* SIDM-3130 Contact Us screen - Update SSCS details.

* SIDM-2904 Update Survey feedback link across IDAM public screens.

* [PREVIEW] 1.4.1 Scope Change (#216) (#218)

* SIDM-2904 Manually revert SIDM-2904.

* SIDM-2757 Fix double apostrophe in a message. (#187)

* [PREVIEW] footer pages update (#194)

* Add 'Family Public Law' section to the 'Contact Us' page.

* Add Family Public Law Service info to cookies and privacy policy pages.

* A few adjustements.

* Remove repetition.

* Add a space.

* SIDM-2412 Remove records about 2 cookies which are not used in the Family Public Law Service. (#204)

* Add CVE-14540 and 16335 supressions

* Adding prod blocker

* Disable functional tests

* Web public tests 1.5 (#267)

* special character password test

* added password characters

* changed password characters

* redued wait time

* Sidm 3294 mfa e2e tests (#256)

* add mfa otp login tests

* add missing file

* fix typo

* add missing code

* fix test failures

* add more waits

* add more waits

* add exiplit wait

* add block policy scenario

* feat(SIDM-3410-ips): filter out internal ips from policy valuation (#270)

* feat(SIDM-3410-ips): filter out internal ips from policy valuation

* feat(SIDM-3410-ips): simplify and merge methods

* feat(SIDM-3410-ips): simplify regex

* This should fix the ArrAffinity token problem (#277)

* feat(SIDM-3441-sso): Policy eval: remove bearer auth token (#283)

* Include fix for 1.5 (#275)

* feat(SIDM-3410-ips-preview): remove filter pattern in preview (#272)

* Updating with for suggestions (#273)

* Updating with for suggestions

* Need to escape the dot

* feat(sidm-3410-rc2): merge 3410 preview into RC (#284)

* Updating with for suggestions (#273)

* fix(vnet_private_ip_pattern): update escape syntax (#281)

* feat(SIDM-3410-fix-def): use same escaping as preview which is tested (#285)

* feat(SIDM-3437-redir): login/mfa: redirecting using slash (#280) (#287)

* Adding prod blocker

* Duplicated code fix

* updated security.sh file

* updated security.sh file

* added false positives to audit.json file

* added false positived to audit.json fike

* added false positives

* added false positives

* updated environment

* removed unwanted code

* updated functional tag

* updated secrets env to aat

* updated secrets env to aat

* updated url to external url

* enabled mutation tests

* added false positives to audit file

* updated audit file

* removed spaces

* removed spaces

* added false positives

* added false positives

* added false positives

* added false positives

* updated jenkins-nightly

* added false positives

* updated jenkins nightly

Co-authored-by: kremi <34029797+kremi@users.noreply.github.com>
Co-authored-by: NikolaNaydenov <47004340+NikolaNaydenov@users.noreply.github.com>
Co-authored-by: James Burke <james.burke@amido.com>
Co-authored-by: dfourn <dpatynski@gmail.com>
Co-authored-by: nikola-naydenov-hmcts <47384516+nikola-naydenov-hmcts@users.noreply.github.com>
Co-authored-by: Shravan Mechineni <shravanmechineni5@gmail.com>
Co-authored-by: tbamido <50667636+tbamido@users.noreply.github.com>

* Upgrade to tomcat 9.0.31 to address CVE-2020-1938

* Affinity cookie name is different

* Upgrade to tomcat 9.0.31 to address CVE-2020-1938

* Affinity cookie name is different

* Adding support for multiple affinity cookies (#332)

Co-authored-by: Nikola Naydenov <nikolanaydenov@AML0232.local>

* Apply suggestions from code review

* remove waits and add suggestions

* fix test failure

* add wait for failing tests

* ci(prod blocker): add

* fix hmcts policy set for block user test

* fix(aat deployment): add credential and environment overrides

* feat(chart): aat values

Co-authored-by: Nikola Naydenov <nikola.naydenov@amido.com>
Co-authored-by: Shravan Mechineni <shravanmechineni5@gmail.com>
Co-authored-by: tbamido <50667636+tbamido@users.noreply.github.com>
Co-authored-by: sudhasane <vanisekhar75@gmail.com>
Co-authored-by: kremi <34029797+kremi@users.noreply.github.com>
Co-authored-by: NikolaNaydenov <47004340+NikolaNaydenov@users.noreply.github.com>
Co-authored-by: James Burke <james.burke@amido.com>
Co-authored-by: dfourn <dpatynski@gmail.com>
Co-authored-by: nikola-naydenov-hmcts <47384516+nikola-naydenov-hmcts@users.noreply.github.com>
Co-authored-by: Kremi Nenkova <kremi.nenkova@gmail.com>
Co-authored-by: Nikola Naydenov <nikolanaydenov@AML0232.local>
Co-authored-by: Shravan Mechineni <shravan.mechineni@ladbrokescoral.com>

* fix(docker): flexvolume mapping to property

* fix(idam-aat): add test variables (#338)

* SIDM-2868 - Add nightly tests for 2.0.0 (#341)

* fix(idam-aat): add test variables

* SIDM-2686 - Add nightly tests for 2.0.0  (#339)

* feat(qa): cross browser tests'

* revert(delete): remove file

* fix dependencies

* fix codecept unknown option scan error

Co-authored-by: Shravan Mechineni <shravan.mechineni@ladbrokescoral.com>

Co-authored-by: Shravan Mechineni <shravan.mechineni@ladbrokescoral.com>

* SIDM-3977 - v2 fix selfservice (#351)

* fix(idam-aat): add test variables

* SIDM-2686 - Add nightly tests for 2.0.0  (#339)

* feat(qa): cross browser tests'

* revert(delete): remove file

* fix dependencies

* fix codecept unknown option scan error

Co-authored-by: Shravan Mechineni <shravan.mechineni@ladbrokescoral.com>

* COVID-19 contatcus page changes

* SIDM-3977 Add test to check if activation link can be used after the user has registered. (#349)

* SIDM-3977 Add test to check if activation link can be used after the user has registered.

* SIDM-3977 Make it a new scenario.

* SIDM-3977 self_registration_test: Fix text

Co-authored-by: Tiago Braun <tiago.braun@amido.com>

Co-authored-by: Shravan Mechineni <shravan.mechineni@ladbrokescoral.com>
Co-authored-by: Nikola Naydenov <nikolanaydenov@aml0232.home>
Co-authored-by: dfourn <daniel.patynski@amido.com>
Co-authored-by: Tiago Braun <tiago.braun@amido.com>

* chore(idam-prod): remove prod blocker (#358)

Co-authored-by: kremi <34029797+kremi@users.noreply.github.com>
Co-authored-by: Nikola Naydenov <nikola.naydenov@amido.com>
Co-authored-by: James Burke <james.burke@amido.com>
Co-authored-by: dfourn <daniel.patynski@amido.com>
Co-authored-by: nikola-naydenov-hmcts <47384516+nikola-naydenov-hmcts@users.noreply.github.com>
Co-authored-by: Shravan Mechineni <shravanmechineni5@gmail.com>
Co-authored-by: tbamido <50667636+tbamido@users.noreply.github.com>
Co-authored-by: Nikola Naydenov <nikolanaydenov@AML0232.local>
Co-authored-by: Henry Dobson <henrydobson@me.com>
Co-authored-by: Shravan Mechineni <shravan.mechineni@ladbrokescoral.com>
Co-authored-by: sudhasane <vanisekhar75@gmail.com>
Co-authored-by: NikolaNaydenov <47004340+NikolaNaydenov@users.noreply.github.com>
Co-authored-by: dfourn <dpatynski@gmail.com>
Co-authored-by: Kremi Nenkova <kremi.nenkova@gmail.com>
Co-authored-by: Nikola Naydenov <nikolanaydenov@aml0232.home>
Co-authored-by: Tiago Braun <tiago.braun@amido.com>

Co-authored-by: kremi <34029797+kremi@users.noreply.github.com>
Co-authored-by: Nikola Naydenov <nikola.naydenov@amido.com>
Co-authored-by: James Burke <james.burke@amido.com>
Co-authored-by: dfourn <daniel.patynski@amido.com>
Co-authored-by: nikola-naydenov-hmcts <47384516+nikola-naydenov-hmcts@users.noreply.github.com>
Co-authored-by: Shravan Mechineni <shravanmechineni5@gmail.com>
Co-authored-by: tbamido <50667636+tbamido@users.noreply.github.com>
Co-authored-by: Nikola Naydenov <nikolanaydenov@AML0232.local>
Co-authored-by: Henry Dobson <henrydobson@me.com>
Co-authored-by: Shravan Mechineni <shravan.mechineni@ladbrokescoral.com>
Co-authored-by: sudhasane <vanisekhar75@gmail.com>
Co-authored-by: NikolaNaydenov <47004340+NikolaNaydenov@users.noreply.github.com>
Co-authored-by: dfourn <dpatynski@gmail.com>
Co-authored-by: Kremi Nenkova <kremi.nenkova@gmail.com>
Co-authored-by: Nikola Naydenov <nikolanaydenov@aml0232.home>
Co-authored-by: Tiago Braun <tiago.braun@amido.com>

* add login with pin test (#361)

* add login with pin test

* fix review comment

* fix review

Co-authored-by: Shravan Mechineni <shravan.mechineni@ladbrokescoral.com>

* Fix  CVE-2020-9488 vulnerability. (#367)

* Fix  CVE-2020-9488 vulnerability.

* - upgrade Gradle to 6.3
- fix deprecated Gradle elements
- upgrade Spring Boot to 2.2.6.RELEASE
- upgrade idamBob to 2.0.1

* update to chart-java 2.18.0

* Switch to idam BOM 2.1.0 to fix CVE-2020-9488 vulnerability

* Make /activate POST request redirect to a GET endpoint that can have … (#366)

* Make /activate POST request redirect to a GET endpoint that can have its language changes.

* Restore individual imports.

* Code review changes.

* Fix broken functional test.

* Empty commit.

* Sidm 4120 welsh post requests (#368)

* Increase code coverage.

* Functional tests fix attempt.

* Sidm 4120 welsh post requests (#370)

* Increase code coverage.

* Functional tests fix attempt.

* Fix an issue with Welsh language switch urlencoding parameters.

* A NPE fix for when there is no query string.

* Attempt to fix Sonar false-positive.

Co-authored-by: kremi <34029797+kremi@users.noreply.github.com>
Co-authored-by: Nikola Naydenov <nikola.naydenov@amido.com>
Co-authored-by: James Burke <james.burke@amido.com>
Co-authored-by: dfourn <daniel.patynski@amido.com>
Co-authored-by: nikola-naydenov-hmcts <47384516+nikola-naydenov-hmcts@users.noreply.github.com>
Co-authored-by: Shravan Mechineni <shravanmechineni5@gmail.com>
Co-authored-by: tbamido <50667636+tbamido@users.noreply.github.com>
Co-authored-by: Nikola Naydenov <nikolanaydenov@AML0232.local>
Co-authored-by: Henry Dobson <henrydobson@me.com>
Co-authored-by: Shravan Mechineni <shravan.mechineni@ladbrokescoral.com>
Co-authored-by: sudhasane <vanisekhar75@gmail.com>
Co-authored-by: NikolaNaydenov <47004340+NikolaNaydenov@users.noreply.github.com>
Co-authored-by: dfourn <dpatynski@gmail.com>
Co-authored-by: Kremi Nenkova <kremi.nenkova@gmail.com>
Co-authored-by: Nikola Naydenov <nikolanaydenov@aml0232.home>
Co-authored-by: Tiago Braun <tiago.braun@amido.com>
  • Loading branch information
17 people authored Jun 2, 2020
1 parent 147db73 commit b5d8319
Show file tree
Hide file tree
Showing 26 changed files with 441 additions and 92 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,7 @@ bin

### Helm ###
**/charts/*.tgz
charts/*/requirements.lock
charts/*/requirements.lock

### Jenkins Additions ###
init.gradle
20 changes: 18 additions & 2 deletions Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ def product = "idam"
def component = "web-public"

env.NONPROD_ENVIRONMENT_NAME = 'idam-aat'
env.PROD_ENVIRONMENT_NAME = 'idam-prod'
env.DEMO_ENVIRONMENT_NAME = 'idam-demo'
env.PROD_ENVIRONMENT_NAME = 'idam-prod'
env.DEMO_ENVIRONMENT_NAME = 'idam-demo'
env.PREVIEW_ENVIRONMENT_NAME = 'idam-preview'
env.PERFTEST_ENVIRONMENT_NAME = 'idam-perftest'
env.ITHC_ENVIRONMENT_NAME = 'idam-ithc'
Expand Down Expand Up @@ -69,6 +69,22 @@ withPipeline(type, product, component) {
Using IDAMAPI: ${env.IDAMAPI}""".stripIndent()
}

before('smoketest-aks:idam-aat') {
env.NONPROD_ENVIRONMENT_NAME = 'aat'
env.IDAMAPI = "https://idam-api-staging.service.core-compute-aat.internal"
println """\
Using NONPROD_ENVIRONMENT_NAME: ${env.NONPROD_ENVIRONMENT_NAME}
Using IDAMAPI: ${env.IDAMAPI}""".stripIndent()
}

before('functionalTest-aks:idam-aat') {
env.NONPROD_ENVIRONMENT_NAME = 'aat'
env.IDAMAPI = "https://idam-api-staging.service.core-compute-aat.internal"
println """\
Using NONPROD_ENVIRONMENT_NAME: ${env.NONPROD_ENVIRONMENT_NAME}
Using IDAMAPI: ${env.IDAMAPI}""".stripIndent()
}

before('buildinfra:idam-ithc') {
env.ITHC_ENVIRONMENT_NAME = 'ithc'
println """\
Expand Down
50 changes: 24 additions & 26 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
id 'io.spring.dependency-management' version '1.0.9.RELEASE' apply false
id 'org.owasp.dependencycheck' version '5.1.1'
id 'org.sonarqube' version '2.6.2'
id 'org.springframework.boot' version '2.2.4.RELEASE' apply false
id 'org.springframework.boot' version '2.2.6.RELEASE' apply false
id 'com.gorylenko.gradle-git-properties' version '1.4.21'
id "info.solidsoft.pitest" version "1.3.0"
id 'pmd'
Expand All @@ -17,7 +17,7 @@ gitProperties {
dateFormat = "yyyy-MM-dd HH:mm:ssZ"
}

allprojects {
allprojects {
apply plugin: 'java'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.owasp.dependencycheck'
Expand All @@ -31,8 +31,7 @@ allprojects {
sourceCompatibility = 1.8
targetCompatibility = 1.8

def idamBomVersion = '1.9.7'
ext['tomcat.version'] = '9.0.31'
def idamBomVersion = '2.1.0'

dependencyManagement {
imports {
Expand All @@ -43,7 +42,7 @@ allprojects {
repositories {
mavenCentral()
maven {
url "https://dl.bintray.com/hmcts/hmcts-maven"
url "https://dl.bintray.com/hmcts/hmcts-maven"
}
jcenter()
}
Expand All @@ -66,18 +65,18 @@ allprojects {
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-security'
// TODO: remove version once 2.2.2.RELEASE is out
implementation (group: 'org.springframework.cloud', name: 'spring-cloud-starter-netflix-zuul', version: '2.2.1.RELEASE') {
implementation(group: 'org.springframework.cloud', name: 'spring-cloud-starter-netflix-zuul', version: '2.2.1.RELEASE') {
exclude(module: 'rxnetty-contexts')
exclude(module: 'rxnetty-servo')
exclude(module: 'rxnetty')
}
implementation group: 'org.springframework.security', name: 'spring-security-taglibs'

compileOnly("org.projectlombok:lombok")

annotationProcessor("org.projectlombok:lombok")
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"

implementation group: 'javax.servlet', name: 'jstl'
implementation group: 'javax.json', name: 'javax.json-api'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind'
Expand All @@ -92,22 +91,21 @@ allprojects {
implementation group: 'org.pitest', name: 'pitest', version: '1.3.2'
implementation group: 'org.owasp.encoder', name: 'encoder-jsp', version: '1.2.2'
implementation group: 'info.solidsoft.gradle.pitest', name: 'gradle-pitest-plugin', version: '1.3.0'
implementation group: 'org.codehaus.sonar-plugins', name:'sonar-pitest-plugin', version: '0.5'
implementation group: 'org.codehaus.sonar-plugins', name: 'sonar-pitest-plugin', version: '0.5'
implementation group: 'uk.gov.hmcts.reform', name: 'properties-volume-spring-boot-starter', version: '0.0.4'
implementation group: 'uk.gov.hmcts.reform', name: 'health-spring-boot-starter', version: '0.0.4'

// TODO mockito version is not correctly resolved from IdAM BOM. Remove version when this is fixed
testCompileOnly("org.projectlombok:lombok")

testAnnotationProcessor("org.projectlombok:lombok")

testImplementation group: 'org.mockito', name: 'mockito-core'
testImplementation group: 'org.springframework.boot', name: 'spring-boot-devtools'
testCompile(group: 'org.springframework.boot', name: 'spring-boot-starter-test') {
exclude(module: 'commons-logging')
testImplementation(group: 'org.springframework.boot', name: 'spring-boot-starter-test') {
exclude(module: 'commons-logging')
}
testImplementation group: 'org.springframework.security', name: 'spring-security-test'

compile group: 'uk.gov.hmcts.reform', name: 'properties-volume-spring-boot-starter', version: '0.0.4'
compile group: 'uk.gov.hmcts.reform', name: 'health-spring-boot-starter', version: '0.0.4'
}

tasks.withType(JavaCompile) {
Expand Down Expand Up @@ -160,7 +158,7 @@ allprojects {

task codeceptSmokeSauce(type: Exec, dependsOn: ':yarnInstall') {
workingDir '.'
commandLine 'node_modules/codeceptjs/bin/codecept.js', 'run', '--config', 'saucelabs.conf.js','--steps', '--grep', '@smoke', '--verbose', '--debug', '--reporter', 'mochawesome'
commandLine 'node_modules/codeceptjs/bin/codecept.js', 'run', '--config', 'saucelabs.conf.js', '--steps', '--grep', '@smoke', '--verbose', '--debug', '--reporter', 'mochawesome'
}

task functionalSauce(dependsOn: ':codeceptFunctionalSauce') {
Expand All @@ -182,20 +180,20 @@ allprojects {
project.tasks['sonarqube'].dependsOn test

def listFiles(String pattern) {
return new FileNameFinder()
.getFileNames("${project.rootDir}", pattern)
.stream()
.collect(Collectors.joining(","))
return new FileNameFinder()
.getFileNames("${project.rootDir}", pattern)
.stream()
.collect(Collectors.joining(","))
}

sonarqube {
properties {
property "sonar.projectName", "SIDAM-WEB-PUBLIC"
property "sonar.exclusions", "**/uk/gov/hmcts/reform/idam/web/config/properties/*.java," +
"**/uk/gov/hmcts/reform/idam/web/model/*.java," +
"**/uk/gov/hmcts/reform/idam/web/helper/MvcKeys.java," +
"**/uk/gov/hmcts/reform/idam/web/Application.java," +
"**/*Exception.java"
"**/uk/gov/hmcts/reform/idam/web/model/*.java," +
"**/uk/gov/hmcts/reform/idam/web/helper/MvcKeys.java," +
"**/uk/gov/hmcts/reform/idam/web/Application.java," +
"**/*Exception.java"
property "sonar.host.url", "https://sonar.reform.hmcts.net/"
property "sonar.pitest.mode", "reuseReport"
property "sonar.pitest.reportsDirectory", "build/reports/pitest"
Expand Down
2 changes: 1 addition & 1 deletion charts/idam-web-public/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for HMCTS Reform IDAM Web Public
name: idam-web-public
version: 0.2.3
version: 0.2.4
maintainers:
- name: Amido Reform SIDAM Team
email: reform.idam@HMCTS.NET
Expand Down
2 changes: 1 addition & 1 deletion charts/idam-web-public/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies:
- name: java
version: ~2.16.0
version: ~2.18.0
repository: '@hmctspublic'
5 changes: 4 additions & 1 deletion charts/idam-web-public/values.aat.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ java:
image: ${IMAGE_NAME}
ingressHost: ${SERVICE_FQDN}
ingressIP: ${INGRESS_IP}
consulIP: ${CONSUL_LB_IP}
consulIP: ${CONSUL_LB_IP}
replicas: 1
environment:
STRATEGIC_SERVICE_URL: http://idam-api-staging.service.core-compute-aat.internal
1 change: 1 addition & 0 deletions charts/idam-web-public/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ java:
ingressHost: "idam-web-public.service.core-compute-{{ .Values.global.environment }}.internal"
replicas: 3
applicationPort: 8080
aadIdentityName: idam
keyVaults:
"idam-idam":
resourceGroup: idam-idam
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Nov 07 15:26:14 GMT 2019
#Fri May 01 15:54:14 BST 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
zipStoreBase=GRADLE_USER_HOME
33 changes: 14 additions & 19 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
Expand Down Expand Up @@ -154,19 +154,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $i + 1`
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

Expand All @@ -175,14 +175,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
APP_ARGS=`save "$@"`

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
3 changes: 3 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

Expand Down
2 changes: 1 addition & 1 deletion security.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ while !(curl -s http://0.0.0.0:1001) > /dev/null
cp *.html functional-output/
zap-cli -p 1001 alerts -l Informational
zap-cli --zap-url http://0.0.0.0 -p 1001 alerts -l High --exit-code False
curl --fail http://0.0.0.0:1001/OTHER/core/other/jsonreport/?formMethod=GET --output report.json
curl --fail http://0.0.0.0:1001/OTHER/core/other/jsonreport/?formMethod=GET --output report.json
Loading

0 comments on commit b5d8319

Please sign in to comment.