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: add org propagation [ZEN-340] #161

Merged
merged 2 commits into from
Oct 6, 2022

Conversation

patricia-v
Copy link
Contributor

@patricia-v patricia-v commented Sep 21, 2022

Jira ticket: ZEN-340

Related PRs

deeproxy#211
registry#29177

Context

Since the introduction of the new services, we started fetching the org's FFs in registry when deeproxy performs a token validation to its endpoint. Previously, this operation did not require the current org, so the default one was used by registry.

We currently want the FFs of the org being used, so we need to propagate the org provided in CLI by either the flag or the config.

Relevant code-client requests to propagate the org

From my investigation, it seems that the only code-client requests performed by CLI that triggers a token verification are:

  • createBundle()
  • checkBundle()
  • extendBundle()
  • getAnalysis()

The last one, getAnalysis(), already had the proper relay of the org, so the only change necessary was adding the header for deeproxy.

The flows (and changes) for the requests are simplified in the following diagrams:

image

image

TODO

  • Tests
  • Update CLI to use latest version of code-client (after merge)

@ghost
Copy link

ghost commented Sep 21, 2022

This PR modifies files linked to issues tracked in Stepsize. You might want to review their status, priority, and scope.

duplicate arguments for analysis context
  • src/interfaces/analysis-options.interface.ts
Interfaces can easily go out of sync
  • src/interfaces/analysis-options.interface.ts

 Mention [stepsize] in a comment if you'd like to report some technical debt. See examples here.

@patricia-v patricia-v marked this pull request as ready for review September 22, 2022 14:22
@patricia-v patricia-v requested a review from a team as a code owner September 22, 2022 14:22
src/http.ts Outdated Show resolved Hide resolved
src/http.ts Outdated Show resolved Hide resolved
src/http.ts Outdated Show resolved Hide resolved
src/http.ts Outdated Show resolved Hide resolved
src/http.ts Outdated Show resolved Hide resolved
@patricia-v patricia-v force-pushed the feat/respect-org-flag-in-token-validation branch from d1d8af3 to d38d774 Compare September 30, 2022 12:26
@patricia-v patricia-v force-pushed the feat/respect-org-flag-in-token-validation branch from d38d774 to 08a6364 Compare September 30, 2022 12:40
@patricia-v patricia-v merged commit 3862c64 into master Oct 6, 2022
@patricia-v patricia-v deleted the feat/respect-org-flag-in-token-validation branch October 6, 2022 07:38
@ghost
Copy link

ghost commented Oct 6, 2022

This PR modifies files linked to issues tracked in Stepsize. You might want to review their status, priority, and scope.

duplicate arguments for analysis context
  • src/interfaces/analysis-options.interface.ts
Interfaces can easily go out of sync
  • src/interfaces/analysis-options.interface.ts

 Mention [stepsize] in a comment if you'd like to report some technical debt. See examples here.

@snyksec
Copy link

snyksec commented Oct 6, 2022

🎉 This PR is included in version 4.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants