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

Use dummy CAPTCHA site key in default config #3332

Merged
merged 8 commits into from
Sep 25, 2024

Conversation

imnasnainaec
Copy link
Collaborator

@imnasnainaec imnasnainaec commented Aug 27, 2024

This change is Reviewable

@imnasnainaec imnasnainaec added deployment Size: S Small sized issue labels Aug 27, 2024
@imnasnainaec imnasnainaec requested a review from jmgrady August 27, 2024 17:08
@imnasnainaec imnasnainaec self-assigned this Aug 27, 2024
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.69%. Comparing base (788558a) to head (7b0677f).
Report is 17 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3332      +/-   ##
==========================================
- Coverage   74.73%   74.69%   -0.04%     
==========================================
  Files         280      280              
  Lines       10744    10743       -1     
  Branches     1298     1297       -1     
==========================================
- Hits         8029     8025       -4     
- Misses       2350     2353       +3     
  Partials      365      365              
Flag Coverage Δ
backend 83.91% <ø> (-0.09%) ⬇️
frontend 66.68% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@imnasnainaec imnasnainaec marked this pull request as draft August 27, 2024 18:08
@imnasnainaec imnasnainaec marked this pull request as ready for review August 28, 2024 15:00
Copy link
Collaborator

@jmgrady jmgrady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 4 files at r2, all commit messages.
Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @imnasnainaec)


deploy/scripts/setup_files/profiles/dev.yaml line 17 at r2 (raw file):

      # has dummy secret keys for development and testing; options are
      # invisible pass, invisible fail, visible pass, visible fail, forced interaction
      configCaptchaSiteKey: "1x00000000000000000000AA" # visible pass

This needs to stay. If it is removed, then when you build for your local kubernetes cluster it set the site key to "". As the value said in the file ./deploy/helm/thecombine/charts/frontend/values.yaml, the value needs to be defined in the profiles.

In general, a blank value should be acceptable for any of the environment variables and should not be interpreted as though the variable was not specified.

Code quote:

    frontend:
      # https://developers.cloudflare.com/turnstile/troubleshooting/testing/
      # has dummy secret keys for development and testing; options are
      # invisible pass, invisible fail, visible pass, visible fail, forced interaction
      configCaptchaSiteKey: "1x00000000000000000000AA" # visible pass

Copy link
Collaborator Author

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 3 of 5 files reviewed, 1 unresolved discussion (waiting on @imnasnainaec and @jmgrady)


deploy/scripts/setup_files/profiles/dev.yaml line 17 at r2 (raw file):
You make a good point with

a blank value should be acceptable for any of the environment variables and should not be interpreted as though the variable was not specified.

Does the change to deploy/helm/thecombine/charts/frontend/templates/env-frontend-configmap.yaml address that?

Copy link
Collaborator

@jmgrady jmgrady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 3 of 5 files reviewed, 1 unresolved discussion (waiting on @imnasnainaec)


deploy/scripts/setup_files/profiles/dev.yaml line 17 at r2 (raw file):

Previously, imnasnainaec (D. Ror.) wrote…

You make a good point with

a blank value should be acceptable for any of the environment variables and should not be interpreted as though the variable was not specified.

Does the change to deploy/helm/thecombine/charts/frontend/templates/env-frontend-configmap.yaml address that?

No. It breaks the deployment. Please revert this change and the change in env-frontend-config.yaml.

Copy link
Collaborator

@jmgrady jmgrady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 3 of 5 files reviewed, 1 unresolved discussion (waiting on @imnasnainaec)


deploy/scripts/setup_files/profiles/dev.yaml line 17 at r2 (raw file):

Previously, jmgrady (Jim Grady) wrote…

No. It breaks the deployment. Please revert this change and the change in env-frontend-config.yaml.

It also removes the ability to set the site key to "" which may be desirable when the CAPTCHA is not enabled.

Copy link
Collaborator

@jmgrady jmgrady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 4 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @imnasnainaec)


deploy/helm/thecombine/charts/frontend/templates/env-frontend-configmap.yaml line 14 at r3 (raw file):

  {{- if .Values.configCaptchaSiteKey }}
  CONFIG_CAPTCHA_SITE_KEY: {{ .Values.configCaptchaSiteKey | quote }}
  {{- end }}

Please remove these changes. They break the deployment. In addition, they add complexity and adding similar code to the deployment would add more complexity.

Code quote:

  {{- if .Values.configCaptchaSiteKey }}
  CONFIG_CAPTCHA_SITE_KEY: {{ .Values.configCaptchaSiteKey | quote }}
  {{- end }}

@imnasnainaec imnasnainaec marked this pull request as draft August 29, 2024 13:05
@imnasnainaec imnasnainaec marked this pull request as ready for review September 24, 2024 15:14
Copy link
Collaborator Author

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 3 of 5 files reviewed, 2 unresolved discussions (waiting on @jmgrady)


deploy/helm/thecombine/charts/frontend/templates/env-frontend-configmap.yaml line 14 at r3 (raw file):

Previously, jmgrady (Jim Grady) wrote…

Please remove these changes. They break the deployment. In addition, they add complexity and adding similar code to the deployment would add more complexity.

Retracted based on in-Slack conversation.


deploy/scripts/setup_files/profiles/dev.yaml line 17 at r2 (raw file):

Previously, jmgrady (Jim Grady) wrote…

It also removes the ability to set the site key to "" which may be desirable when the CAPTCHA is not enabled.

Retracted based on in-Slack conversation.

Copy link
Collaborator

@jmgrady jmgrady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

@imnasnainaec imnasnainaec merged commit 2184716 into master Sep 25, 2024
18 checks passed
@imnasnainaec imnasnainaec deleted the turnstile-key-reprise branch September 25, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment Size: S Small sized issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants