-
Notifications
You must be signed in to change notification settings - Fork 45
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
Secure preferences improvements #261
Merged
Merged
Changes from 18 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
b669df9
Add secure preferences censorship and secure preferences support for …
32f697e
Remove current tag
efcd39e
Add wait for response to update preferences
5b07079
Add wait for response to update preferences on operators
ff352fd
Fix censorship
dda8d35
Add censorship clientside for operators
1da0258
Add error on bad preference reference
d14b96c
Add restapi tests for operators preference update
60ecf92
Improve operator preferences tests
e607bc3
Rename operator preferences endpoint
ab287a1
Add component type header
f9f38a5
Support no component type header requests
dae527e
Update tests to use component type header
69dd7da
Add support for requests with no headers
a8147ce
Add patch for workspace.wiring endpoint
29bcf16
Fix request not being sent to checkWiring
5528966
Fix responses not being piped
14a8684
Handle secure preferences
c0726ba
Add jsonpatch dependency
cc1f890
Improve response codes & fix tests
197284f
Fix style
62078f3
Add WIRECLOUD_COMPONENT_ID header
e624e40
Fix secure preference property not being retrieved properly
1cecd2a
Add patch call to create operators instantly
1d8b09b
Fix calling to update preferences when component is volatile
8ee7baf
Remove OperatorPreferences endpoint and use the WiringEntry patch ins…
7e6114b
Add missing censorship on operator preferences callback
41086a5
Improve wiring callback
86fa9cd
Add patch error handling
80d93b7
Docs: Add wiring patch Apiary documentation
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ | |
'PUT': 'update', | ||
'DELETE': 'delete', | ||
'HEAD': 'head', | ||
'PATCH': 'patch', | ||
} | ||
|
||
|
||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,6 +73,16 @@ | |
"wiringStatus": "{\"operators\": {}, \"connections\": []}" | ||
} | ||
}, | ||
{ | ||
"model": "platform.Workspace", | ||
"pk": "202", | ||
"fields": { | ||
"name": "workspaceSecure", | ||
"public": false, | ||
"creator": "2", | ||
"wiringStatus": "{\"operators\": {\"1\": {\"name\": \"Wirecloud/TestOperatorSecure/1.0\", \"preferences\": {\"pref_secure\": {\"secure\": true, \"readonly\": false, \"hidden\": false, \"value\": \"\"}, \"username\": {\"secure\": false, \"readonly\": false, \"hidden\": false, \"value\": \"username\"}}}, \"2\": {\"name\": \"Wirecloud/TestOperatorSecure/1.0\", \"preferences\": {\"pref_secure\": {\"secure\": true, \"readonly\": false, \"hidden\": false, \"value\": \"test_password\"}, \"username\": {\"secure\": false, \"readonly\": false, \"hidden\": false, \"value\": \"test_username\"}}}}, \"connections\": []}" | ||
} | ||
}, | ||
{ | ||
"model": "platform.UserWorkspace", | ||
"pk": "1", | ||
|
@@ -81,6 +91,14 @@ | |
"workspace": "1" | ||
} | ||
}, | ||
{ | ||
"model": "platform.UserWorkspace", | ||
"pk": "2", | ||
"fields": { | ||
"user": "2", | ||
"workspace": "202" | ||
} | ||
}, | ||
{ | ||
"model": "platform.Tab", | ||
"pk": "1", | ||
|
@@ -90,6 +108,15 @@ | |
"visible": true | ||
} | ||
}, | ||
{ | ||
"model": "platform.Tab", | ||
"pk": "2", | ||
"fields": { | ||
"workspace": "202", | ||
"name": "tabSecure", | ||
"visible": true | ||
} | ||
}, | ||
{ | ||
"model": "platform.IWidget", | ||
"pk": "1", | ||
|
@@ -114,6 +141,30 @@ | |
"variables": "{\"password\": \"test_password\", \"username\": \"test_username\", \"prop\": \"test_data\"}" | ||
} | ||
}, | ||
{ | ||
"model": "platform.IWidget", | ||
"pk": "3", | ||
"fields": { | ||
"widget": "1", | ||
"widget_uri": "Test/Test Widget/1.0.0", | ||
"name": "Secure Widget 1", | ||
"positions": "{\"widget\":{\"minimized\":false,\"height\":24,\"width\":6,\"zIndex\":0,\"left\":0,\"top\":0,\"fulldragboard\":false},\"icon\":{\"top\":0,\"left\":0}}", | ||
"tab": "2", | ||
"variables": "{\"password\": \"\", \"username\": \"test_username\", \"prop\": \"test_data\"}" | ||
} | ||
}, | ||
{ | ||
"model": "platform.IWidget", | ||
"pk": "4", | ||
"fields": { | ||
"widget": "1", | ||
"widget_uri": "Test/Test Widget/1.0.0", | ||
"name": "Secure Widget 2", | ||
"positions": "{\"widget\":{\"minimized\":false,\"height\":24,\"width\":6,\"zIndex\":0,\"left\":0,\"top\":0,\"fulldragboard\":false},\"icon\":{\"top\":0,\"left\":0}}", | ||
"tab": "2", | ||
"variables": "{\"password\": \"test_password\", \"username\": \"test_username\", \"prop\": \"test_data\"}" | ||
} | ||
}, | ||
{ | ||
"model": "catalogue.CatalogueResource", | ||
"pk": "1", | ||
|
@@ -150,6 +201,24 @@ | |
"users": [2] | ||
} | ||
}, | ||
{ | ||
"pk": 3, | ||
"model": "catalogue.CatalogueResource", | ||
"fields": { | ||
"groups": [], | ||
"template_uri": "Wirecloud_TestOperatorSecure_1.0.wgt", | ||
"popularity": "0", | ||
"vendor": "Wirecloud", | ||
"short_name": "TestOperatorSecure", | ||
"json_description": "{\"default_lang\": \"en\", \"vendor\": \"Wirecloud\", \"description\": \"Test operator description\", \"translations\": {}, \"smartphoneimage\": \"\", \"translation_index_usage\": {}, \"title\": \"TestOperator\", \"properties\": [], \"js_files\": [\"js/main.js\"], \"requirements\": [], \"preferences\": [{\"default\": \"\", \"name\": \"pref_secure\", \"secure\": true, \"label\": \"Prefix\", \"type\": \"text\", \"description\": \"\"}, {\"default\": \"\", \"name\": \"username\", \"secure\": false, \"label\": \"Prefix\", \"type\": \"text\", \"description\": \"\"}], \"authors\": \"admin\", \"wiring\": {\"inputs\": [{\"friendcode\": \"test_friend_code\", \"actionlabel\": \"\", \"name\": \"input\", \"label\": \"input\", \"type\": \"text\", \"description\": \"\"}], \"outputs\": [{\"friendcode\": \"test_friend_code\", \"description\": \"\", \"type\": \"text\", \"name\": \"output\", \"label\": \"output\"}]}, \"name\": \"TestOperator\", \"image\": \"images/catalogue.png\", \"version\": \"1.0\", \"context\": [], \"widget_height\": \"\", \"email\": \"[email protected]\", \"type\": \"operator\", \"widget_width\": \"\", \"doc\": \"doc/index.html\"}", | ||
"creator": 2, | ||
"creation_date": "2011-05-13T11:24:03Z", | ||
"version": "1.0", | ||
"type": 2, | ||
"public": false, | ||
"users": [2] | ||
} | ||
}, | ||
{ | ||
"model": "platform.Widget", | ||
"pk": "1", | ||
|
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
operator_preferences
without theworkspace_
prefix