[issue:2581] add captcha provider and validator URL props to eSignet - #2586
SwapnilWorks-Devops wants to merge 1 commit into
Conversation
eSignet 2.0.x reads the captcha widget provider from MOSIP_ESIGNET_CAPTCHA_SITE_PROVIDER (flow-esignet.yaml) and validates captcha tokens against MOSIP_ESIGNET_CAPTCHA_VALIDATOR_URL. install.sh only passed MOSIP_ESIGNET_CAPTCHA_SITE_KEY, so the provider expanded to an empty string and tokens were accepted unverified until both props were added to the deployment by hand. - install.sh: when the esignet-captcha secret exists, also pass MOSIP_ESIGNET_CAPTCHA_SITE_PROVIDER=google-recaptcha (the captcha installer collects reCAPTCHA v2 keys) and MOSIP_ESIGNET_CAPTCHA_VALIDATOR_URL pointing at the captcha service (http://captcha.captcha/v1/captcha/validatecaptcha). Installs without the secret are unchanged, so validation is never pointed at a captcha service that isn't deployed. - deploy values.yaml: list the two props in the commented examples. Signed-off-by: Swapnil <swapnil.mohanty@technoforte.co.in>
|
Warning Review limit reachedNext included review available in 59 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop-go #2586 +/- ##
=============================================
Coverage ? 70.18%
=============================================
Files ? 129
Lines ? 8950
Branches ? 111
=============================================
Hits ? 6282
Misses ? 2207
Partials ? 461
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Fixes #2581
Problem
eSignet 2.0.x reads the captcha widget provider from
MOSIP_ESIGNET_CAPTCHA_SITE_PROVIDER(esignet-service/data/flows/flow-esignet.yaml) and validates captcha tokens againstMOSIP_ESIGNET_CAPTCHA_VALIDATOR_URL(esignet-service/internal/config/app.go).deploy/esignet/install.shonly passedMOSIP_ESIGNET_CAPTCHA_SITE_KEY. The flow file is expanded withos.ExpandEnv, so the provider came through as an empty string. With no validator URL, the service accepts captcha tokens unverified (seeesignet-service/.env.example). Both props had to be added to the deployment by hand, and the issue thread confirms that adding them makes captcha work.Changes
deploy/esignet/install.shesignet-captchasecret exists, also pass:MOSIP_ESIGNET_CAPTCHA_SITE_PROVIDER=google-recaptcha(deploy/captcha/install.shcollects reCAPTCHA v2 keys)MOSIP_ESIGNET_CAPTCHA_VALIDATOR_URL=http://captcha.captcha/v1/captcha/validatecaptcha(thecaptcharelease in thecaptchanamespace)deploy/esignet/values.yamlVerification
bash -n install.shpassesinstall.shverbatim, withkubectlstubbed, produces a values file that parses as YAML both with and without theesignet-captchasecrethelm templateof the publishedmosip/esignet2.0.0-developchart (the versioninstall.shpins):MOSIP_ESIGNET_CAPTCHA_SITE_KEYwithvalue: ""Note
The same change is raised against both branches that carry the eSignet 2.0.x deployment scripts:
release-2.0.xdevelop-godevelopis not included. It holds the Java eSignet, whoseinstall.shsets no captcha env and which does not readMOSIP_ESIGNET_CAPTCHA_SITE_PROVIDER.AUTHORIZE_ENDPOINTfrom the original issue body is left out. As noted in the issue thread, eSignet serves/oauth2/authorizeitself, and the prop belongs tomock-relying-party-ui.