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

feat(api): protect api-events with api-key #183

Merged
merged 3 commits into from
May 14, 2021
Merged

Conversation

kgajowy
Copy link
Contributor

@kgajowy kgajowy commented May 14, 2021

Protect Api-Events endpoints with custom guard of x-api-key header

Overview

It could be necessary to provide relevant envs on CI/staging/production

Designs

Link to the related design prototypes (if applicable)

Testing instructions

Please explain how to test the PR: ID of a dataset, steps to reach the feature, etc.

Feature relevant tickets

Link to the related task manager tickets


Checklist before submitting

  • Meaningful commits and code rebased on develop.
  • If this PR adds feature that should be tested for regressions when
    deploying to staging/production, please add brief testing instructions
    to the deploy checklist (docs/deployment-checklist.md)
  • Update CHANGELOG file

@vercel
Copy link

vercel bot commented May 14, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

marxan – ./app

🔍 Inspect: https://vercel.com/vizzuality1/marxan/Gto1KATjFaRPwLjBTQwak2yS27wf
✅ Preview: https://marxan-git-feat-api-events-intercom-vizzuality1.vercel.app

marxan-storybook – ./app

🔍 Inspect: https://vercel.com/vizzuality1/marxan-storybook/2m8URMNH3YB3z6uNTaEpeCHPtWMX
✅ Preview: https://marxan-storybook-git-feat-api-events-intercom-vizzuality1.vercel.app

@kgajowy kgajowy requested a review from hotzevzl May 14, 2021 10:07
Copy link
Member

@hotzevzl hotzevzl left a comment

Choose a reason for hiding this comment

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

@kgajowy thank you, looks great.

@hotzevzl
Copy link
Member

actually, may it make sense to get this prop from env only once at app startup, rather than per-request in the guard?

@kgajowy
Copy link
Contributor Author

kgajowy commented May 14, 2021

actually, may it make sense to get this prop from env only once at app startup, rather than per-request in the guard?

Could be, if we are fine to restart the deployed unit if we need to change the secret ;)

fixed in 7000961

@hotzevzl
Copy link
Member

actually, may it make sense to get this prop from env only once at app startup, rather than per-request in the guard?

Could be, if we are fine to restart the deployed unit if we need to change the secret ;)

fixed in 7000961

thanks, and yes, no problem in having to restart - this will rarely change in most cases.

@kgajowy kgajowy merged commit 81966dc into develop May 14, 2021
@kgajowy kgajowy deleted the feat/api-events-intercom branch May 14, 2021 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants