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: Self-signed certificates for REST APIs #11043

Merged
merged 2 commits into from
Feb 15, 2022

Conversation

nidhi-nair
Copy link
Contributor

@nidhi-nair nidhi-nair commented Feb 9, 2022

Description

Enabled use of self-signed certificates for REST APIs. We're expected to create a datasource for all APIs that need this feature. Addition is non-intrusive to existing actions because of null check and exact value checks.

I've also updated the error handling to always go to the root of the exception since that might help us debug issues more easily. Might want to take up handling different types of errors to give more sensible messages in a separate issue.

Screenshot 2022-02-09 at 4 35 56 PM

Screen.Recording.2022-02-09.at.4.26.36.PM.mov

Fixes #4608

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

  • Manually tested since we haven't mocked out client yet. Should invest in this infra soon

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Test coverage results 🧪

🔴 Total coverage has decreased
// Code coverage diff between base branch:release and head branch: fix/self-signed-certs-for-rest 
Status File % Stmts % Branch % Funcs % Lines
🔴 total 55.43 (-0.01) 36.99 (-0.01) 35.3 (0) 55.81 (-0.01)
🔴 app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx 24.66 (-0.34) 13.51 (-0.57) 2.56 (-0.14) 27.18 (-0.48)
🔴 app/client/src/transformers/RestAPIDatasourceFormTransformer.ts 14.67 (-0.19) 0 (0) 0 (0) 13.43 (-0.21)
🔴 app/client/src/utils/autocomplete/TernServer.ts 52.71 (-0.23) 40.83 (-0.84) 36.21 (0) 56.74 (-0.25)

@vercel
Copy link

vercel bot commented Feb 9, 2022

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

🔍 Inspect: https://vercel.com/get-appsmith/appsmith/6fHxv6kinDcDcsngVWaQdijFWxsL
✅ Preview: https://appsmith-git-fix-self-signed-certs-for-rest-get-appsmith.vercel.app

@github-actions github-actions bot added the Enhancement New feature or request label Feb 9, 2022
@github-actions
Copy link

github-actions bot commented Feb 9, 2022

Unable to find test scripts. Please add necessary tests to the PR.

@github-actions
Copy link

github-actions bot commented Feb 9, 2022

Unable to find test scripts. Please add necessary tests to the PR.

@nidhi-nair nidhi-nair added the BE Coders Pod Issues related to users writing code to fetch and update data label Feb 9, 2022
@nidhi-nair
Copy link
Contributor Author

/ok-to-test sha=bb9a33c

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1839408442.
Workflow: Appsmith External Integration Test Workflow.
Commit: bb9a33c.
PR: 11043.

@nidhi-nair
Copy link
Contributor Author

/ok-to-test sha=bb9a33c

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1839886153.
Workflow: Appsmith External Integration Test Workflow.
Commit: bb9a33c.
PR: 11043.

@nidhi-nair
Copy link
Contributor Author

/ok-to-test sha=e1e5730

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1841292248.
Workflow: Appsmith External Integration Test Workflow.
Commit: e1e5730.
PR: 11043.

@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/1841292248.
Commit: e1e5730.
Results:

Click to view performance test results

Run 1 Run 2 Run 3 Run 4 Run 5 Median Mean SD.Sample SD.Population
Select category
scripting 1704.08 1809.65 1757.71 1816.91 1711.05 1757.71 1759.88 3.01 2.69
painting 40.25 14.83 20.84 14.82 29.05 20.84 23.96 45.16 40.36
rendering 909.57 985.96 934.76 850.2 909.77 909.77 918.05 5.35 4.78
Bind table data
scripting 2228.44 2229.86 2237.78 2277.51 2190.24 2229.86 2232.77 1.39 1.24
painting 11.42 20.82 17.49 35.78 30.89 20.82 23.28 42.65 38.14
rendering 748.17 861.39 783.61 800.67 763.61 783.61 791.49 5.54 4.95
Click on table #comments
scripting 2856.84 2736.95 2583.42 2941.06 2905.6 2856.84 2804.77 5.20 4.65
painting 42.39 66.73 35.36 22.26 60.99 42.39 45.55 40.24 35.98
rendering 631.75 781.29 714 704.69 708.49 708.49 708.04 7.48 6.69
Update title
scripting 4918.45 5367.54 4991.2 4817.73 5172.25 4991.2 5053.43 4.32 3.86
painting 71.55 50.29 61.01 42.32 63.88 61.01 57.81 19.96 17.85
rendering 1385.88 1238.13 1174.21 1105.22 1163.43 1174.21 1213.37 8.85 7.91
Open modal
scripting 4925.1 1420.55 1378.14 1433.19 1472.8 1433.19 2125.96 73.62 65.85
painting 18.55 15.46 14.11 27.21 22.72 18.55 19.61 27.49 24.58
rendering 606.27 609.27 588.26 626.63 607.13 607.13 607.51 2.24 2.00
Close modal
scripting 1484.37 990.89 782.65 776.22 845.62 845.62 975.95 30.44 27.22
painting 12.87 10.73 21.97 23.72 13.9 13.9 16.64 34.92 31.25
rendering 507.25 580.19 455.22 404.22 441.24 455.22 477.62 14.28 12.77
Click on table row
scripting 2212.32 2098.6 2343.44 2157.09 2091.79 2157.09 2180.65 4.74 4.24
painting 25.62 15.64 12.79 31.53 33.69 25.62 23.85 39.16 35.01
rendering 257.26 228.86 267.87 237.28 270.91 257.26 252.44 7.38 6.60
Edit input
scripting 270.2 266.49 225 287.47 247.96 266.49 259.42 9.18 8.21
painting 5.98 18.57 9.96 5.41 34.87 9.96 14.96 82.29 73.60
rendering 12.53 14.07 13.25 16.04 11.58 13.25 13.49 12.53 11.19
Clear input
scripting 654.63 648.18 655.33 659.44 721.92 655.33 667.9 4.56 4.08
painting 6.63 20.72 4.74 4.63 9.37 6.63 9.22 72.78 65.08
rendering 162.01 162.71 169.68 168.64 160.13 162.71 164.63 2.58 2.31
Edit input again
scripting 258.11 242.06 362.04 248.63 228.46 248.63 267.86 20.06 17.95
painting 12.48 7.37 18.8 23.32 8.65 12.48 14.12 48.16 43.06
rendering 17.91 15.33 17.69 15.29 14.43 15.33 16.13 9.73 8.68

@nidhi-nair
Copy link
Contributor Author

/ok-to-test sha=e1e5730

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1841576254.
Workflow: Appsmith External Integration Test Workflow.
Commit: e1e5730.
PR: 11043.

@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/1841292248.
Commit: e1e5730.
Results:

Click to view performance test results

Run 1 Run 2 Run 3 Run 4 Run 5 Median Mean SD.Sample SD.Population
Select category
scripting 1704.08 1809.65 1757.71 1816.91 1711.05 1757.71 1759.88 3.01 2.69
painting 40.25 14.83 20.84 14.82 29.05 20.84 23.96 45.16 40.36
rendering 909.57 985.96 934.76 850.2 909.77 909.77 918.05 5.35 4.78
Bind table data
scripting 2228.44 2229.86 2237.78 2277.51 2190.24 2229.86 2232.77 1.39 1.24
painting 11.42 20.82 17.49 35.78 30.89 20.82 23.28 42.65 38.14
rendering 748.17 861.39 783.61 800.67 763.61 783.61 791.49 5.54 4.95
Click on table #comments
scripting 2856.84 2736.95 2583.42 2941.06 2905.6 2856.84 2804.77 5.20 4.65
painting 42.39 66.73 35.36 22.26 60.99 42.39 45.55 40.24 35.98
rendering 631.75 781.29 714 704.69 708.49 708.49 708.04 7.48 6.69
Update title
scripting 4918.45 5367.54 4991.2 4817.73 5172.25 4991.2 5053.43 4.32 3.86
painting 71.55 50.29 61.01 42.32 63.88 61.01 57.81 19.96 17.85
rendering 1385.88 1238.13 1174.21 1105.22 1163.43 1174.21 1213.37 8.85 7.91
Open modal
scripting 4925.1 1420.55 1378.14 1433.19 1472.8 1433.19 2125.96 73.62 65.85
painting 18.55 15.46 14.11 27.21 22.72 18.55 19.61 27.49 24.58
rendering 606.27 609.27 588.26 626.63 607.13 607.13 607.51 2.24 2.00
Close modal
scripting 1484.37 990.89 782.65 776.22 845.62 845.62 975.95 30.44 27.22
painting 12.87 10.73 21.97 23.72 13.9 13.9 16.64 34.92 31.25
rendering 507.25 580.19 455.22 404.22 441.24 455.22 477.62 14.28 12.77
Click on table row
scripting 2212.32 2098.6 2343.44 2157.09 2091.79 2157.09 2180.65 4.74 4.24
painting 25.62 15.64 12.79 31.53 33.69 25.62 23.85 39.16 35.01
rendering 257.26 228.86 267.87 237.28 270.91 257.26 252.44 7.38 6.60
Edit input
scripting 270.2 266.49 225 287.47 247.96 266.49 259.42 9.18 8.21
painting 5.98 18.57 9.96 5.41 34.87 9.96 14.96 82.29 73.60
rendering 12.53 14.07 13.25 16.04 11.58 13.25 13.49 12.53 11.19
Clear input
scripting 654.63 648.18 655.33 659.44 721.92 655.33 667.9 4.56 4.08
painting 6.63 20.72 4.74 4.63 9.37 6.63 9.22 72.78 65.08
rendering 162.01 162.71 169.68 168.64 160.13 162.71 164.63 2.58 2.31
Edit input again
scripting 258.11 242.06 362.04 248.63 228.46 248.63 267.86 20.06 17.95
painting 12.48 7.37 18.8 23.32 8.65 12.48 14.12 48.16 43.06
rendering 17.91 15.33 17.69 15.29 14.43 15.33 16.13 9.73 8.68

@nidhi-nair
Copy link
Contributor Author

/ok-to-test sha=e1e5730

@nidhi-nair nidhi-nair enabled auto-merge (squash) February 15, 2022 05:16
@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1845149141.
Workflow: Appsmith External Integration Test Workflow.
Commit: e1e5730.
PR: 11043.

@github-actions
Copy link

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/1845149141.
Commit: e1e5730.
Results:

Click to view performance test results

Run 1 Run 2 Run 3 Run 4 Run 5 Median Mean SD.Sample SD.Population
Select category
scripting 4164.21 1876.58 1713.3 1792.03 1989.67 1876.58 2307.16 45.21 40.44
painting 29.83 26.46 20.6 18.32 18.85 20.6 22.81 22.27 19.95
rendering 904.15 1113.67 1169.33 1002.81 941.43 1002.81 1026.28 10.98 9.82
Bind table data
scripting 2013.35 2196.26 2455.27 2334.31 2870.77 2334.31 2373.99 13.59 12.16
painting 27.34 27.87 30.49 27.74 35.7 27.87 29.83 11.77 10.53
rendering 1203.14 970.78 1046.09 1020.31 1081.81 1046.09 1064.43 8.22 7.35
Click on table #comments
scripting 2968.04 4502.09 3514 3241.1 3204.81 3241.1 3486.01 17.21 15.40
painting 58.64 37.75 70.56 19.17 28.97 37.75 43.02 49.26 44.05
rendering 1240.94 1096.33 1109.07 1279.54 1370.97 1240.94 1219.37 9.56 8.55
Update title
scripting 10186.12 8847.53 7717.33 8182.36 7871.86 8182.36 8561.04 11.76 10.52
painting 88.9 97.45 72.31 85.23 98.24 88.9 88.43 11.96 10.70
rendering 2115.34 2109.49 2247.81 2469.67 2073.12 2115.34 2203.09 7.40 6.62
Open modal
scripting 2266.06 2209.91 2268.71 2104.45 4363.05 2266.06 2642.44 36.49 32.63
painting 32.92 53.46 43.88 43.9 32.41 43.88 41.31 21.33 19.08
rendering 1072.5 1061.16 1153.24 1051.42 1062.59 1062.59 1080.18 3.84 3.44
Close modal
scripting 1246.08 1612.83 1257.32 1544.21 1089 1257.32 1349.89 16.33 14.60
painting 34.61 26.53 21.63 62.65 11.65 26.53 31.41 61.57 55.08
rendering 861.05 890.32 822.85 796.59 831.9 831.9 840.54 4.30 3.84
Edit input
scripting 335.94 425.64 463.38 381.84 409.85 409.85 403.33 11.86 10.61
painting 27.97 27.06 9.66 6.66 29.44 27.06 20.16 54.76 48.96
rendering 16.81 19.2 20.52 19.61 26.3 19.61 20.49 17.23 15.37
Clear input
scripting 872.07 964.18 958.64 941.16 1182.79 958.64 983.77 11.91 10.65
painting 6.8 14.6 8.19 14.89 7.59 8.19 10.41 38.33 34.20
rendering 252.75 254.01 267.42 263.37 243.05 254.01 256.12 3.74 3.35
Edit input again
scripting 335.45 438.99 373.09 336.94 344.55 344.55 365.8 11.93 10.67
painting 9.76 7.05 13.04 6.55 6.55 7.05 8.59 32.83 29.34
rendering 20.99 32.8 22.07 21.29 27.24 22.07 24.88 20.50 18.37

@nidhi-nair nidhi-nair merged commit 1868675 into release Feb 15, 2022
@nidhi-nair nidhi-nair deleted the fix/self-signed-certs-for-rest branch February 15, 2022 06:54
@github-actions
Copy link

Unable to find test scripts. Please add necessary tests to the PR.

1 similar comment
@github-actions
Copy link

Unable to find test scripts. Please add necessary tests to the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE Coders Pod Issues related to users writing code to fetch and update data Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] APIs with Self-signed Certs with Appsmith
3 participants