-
Notifications
You must be signed in to change notification settings - Fork 111
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
Add license interceptor in automate gateway #8439
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
👷 Deploy Preview for chef-automate processing.
|
YashviJain01
force-pushed
the
yashvi/CHEF-11671
branch
from
May 6, 2024 13:00
d98c532
to
3407416
Compare
YashviJain01
changed the title
Yashvi/chef 11671
Add license interceptor in automate gateway
May 14, 2024
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
…i in api allow list Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
YashviJain01
force-pushed
the
yashvi/CHEF-11671
branch
from
May 15, 2024 10:02
69c32f5
to
372cb05
Compare
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Dmaddu
approved these changes
May 20, 2024
YashviJain01
added a commit
that referenced
this pull request
May 20, 2024
* Adding the intercerptors with error only for license Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Removing the function, will create another PR for this Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Removing interface, will create another PR for this Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding the function for interceptor Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding interceptor layer for license Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding allow api list if the license needs to be applied from backend Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license apply Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license function in default deploy Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Removing unwanted loggers Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license apply command in pipelines, and adding create token api in api allow list Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Applying license at various location to unblock the pipeline Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding changes Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding Applying license in do_dploy for chef server Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * updating the temp license Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com> * Adding A2_license as a variable from vault Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding A2_license as a environment variable Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding A2 license in the pipeline Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license in studio pipelines Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license data Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license data Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license data Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding licrnse in dev from command Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license from vault and applying it Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license in gateway intergation Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license in gateway intergation Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license key in the pipeline Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license after upgrade Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * commenting jq line for print Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> --------- Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com> Co-authored-by: Yashvi Jain <yashvi.jain@progress.com> Co-authored-by: dmaddu <dmaddu@progress.com>
swatiganesh
pushed a commit
that referenced
this pull request
Jun 4, 2024
* Adding the intercerptors with error only for license Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Removing the function, will create another PR for this Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Removing interface, will create another PR for this Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding the function for interceptor Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding interceptor layer for license Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding allow api list if the license needs to be applied from backend Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license apply Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license function in default deploy Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Removing unwanted loggers Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license apply command in pipelines, and adding create token api in api allow list Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Applying license at various location to unblock the pipeline Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding changes Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding Applying license in do_dploy for chef server Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * updating the temp license Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com> * Adding A2_license as a variable from vault Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding A2_license as a environment variable Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding A2 license in the pipeline Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license in studio pipelines Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license data Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license data Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license data Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding licrnse in dev from command Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license from vault and applying it Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license in gateway intergation Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license in gateway intergation Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license key in the pipeline Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license after upgrade Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * commenting jq line for print Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> --------- Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com> Co-authored-by: Yashvi Jain <yashvi.jain@progress.com> Co-authored-by: dmaddu <dmaddu@progress.com>
YashviJain01
added a commit
that referenced
this pull request
Jun 5, 2024
* Adding the intercerptors with error only for license Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Removing the function, will create another PR for this Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Removing interface, will create another PR for this Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding the function for interceptor Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding interceptor layer for license Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding allow api list if the license needs to be applied from backend Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license apply Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license function in default deploy Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Removing unwanted loggers Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license apply command in pipelines, and adding create token api in api allow list Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Applying license at various location to unblock the pipeline Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding changes Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding Applying license in do_dploy for chef server Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * updating the temp license Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com> * Adding A2_license as a variable from vault Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding A2_license as a environment variable Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding A2 license in the pipeline Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license in studio pipelines Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license data Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license data Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license data Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding licrnse in dev from command Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license from vault and applying it Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license in gateway intergation Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license in gateway intergation Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license key in the pipeline Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding license after upgrade Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * commenting jq line for print Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> --------- Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com> Co-authored-by: Yashvi Jain <yashvi.jain@progress.com> Co-authored-by: dmaddu <dmaddu@progress.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔩 Description: What code changed, and why?
If the license is not applied or expired, a error will be sent via tha api or cli which are passed throguh gateway.
A exceptions list is also added for the allowed apis, which helps in deployment via airgap or cli.
⛓️ Related Resources
https://chefio.atlassian.net/browse/CHEF-11671
https://chefio.atlassian.net/browse/CHEF-11670
👍 Definition of Done
A license interceptor has been added in automate gateway which will block the requests if the license is invalid.
👟 How to Build and Test the Change
rebuild components/automate-gateway
✅ Checklist
All PRs must tick these:
With occasional exceptions, all PRs from Progress employees must tick these:
make spell
in any component directory)All PRs from Progress employees should tick these if appropriate:
Please add a note next to any checkbox above if you are NOT ticking it.
📷 Screenshots, if applicable
APi Demo video:-
https://progresssoftware.sharepoint.com/:v:/s/ChefCoreC/EY6Pbs1E2PlBgfKjwPjbA_sBi6KTnX8HIRPZnudCi8clVg?e=VUvhAF
If the license is expired (UI):-