Commit Graph

353 Commits

Author SHA1 Message Date
Trisha Anand
a29ec30798 Merge branch 'hotfix/log-execute-action' into 'release'
Added log for execute action

See merge request theappsmith/internal-tools-server!159
2020-01-15 09:13:27 +00:00
Trisha Anand
670ca4cb7e Added log for execute action 2020-01-15 09:13:27 +00:00
Arpit Mohan
428b93683a Merge branch 'release' of gitlab.com:theappsmith/internal-tools-server into release 2020-01-14 17:14:26 +05:30
Arpit Mohan
bb8b127e2d Fixing bug again to save the reset password token in the DB.
We need to use flatMap instead of map else the Mono will not run to save the token in the passwordResetToken collection
2020-01-14 17:13:42 +05:30
Trisha Anand
b06d12ecdc Merge branch 'feature/restapi-form-data' into 'release'
For non json body, set the result body as string instead of parsing

See merge request theappsmith/internal-tools-server!157
2020-01-14 09:48:43 +00:00
Trisha Anand
f4a2a73abe In case of non json results, set the result body as string, otherwise parse the json and then store it as jsonNode 2020-01-14 09:48:43 +00:00
Arpit Mohan
9e6c54b343 Merge branch 'hotfix/github-login-cleanup' into 'release'
Cleaning up the Github OAuth2 login flow by adding userNameAttribute to properties

This property helps define for Spring security which field in the OAuth2 user info to read in order to determine the username of the user. This is because this field is non-standard across different OAuth2 implementations. For each new OAuth2 provider that we support, this field will be required. Else the default name field will be picked up by Spring security (which is usually the id of the user).

See merge request theappsmith/internal-tools-server!156
2020-01-14 03:10:44 +00:00
Arpit Mohan
2b0a21bbab Cleaning up the Github OAuth2 login flow by adding userNameAttribute to properties
This property helps define for Spring security which field in the OAuth2 user info to read in order to determine the username of the user. This is because this field is non-standard across different OAuth2 implementations. For each new OAuth2 provider that we support, this field will be required. Else the default name field will be picked up by Spring security (which is usually the id of the user).
2020-01-14 08:36:54 +05:30
Arpit Mohan
aadce4ade9 Merge branch 'feature/delete-application' into 'release'
Mock delete application which returns the application object which was being attempted to be deleted.

See merge request theappsmith/internal-tools-server!155
2020-01-13 13:06:43 +00:00
Trisha Anand
660e47a819 Mock delete application which returns the application object which was being attempted to be deleted. 2020-01-13 13:06:42 +00:00
Trisha Anand
46f5775c62 Merge branch 'feature/move-duplicate-action' into 'release'
API Page Association

See merge request theappsmith/internal-tools-server!149
2020-01-13 12:07:10 +00:00
Trisha Anand
28e20ed3bd Move action also works successfully in removing the action from the previous page's onLoadActions while moving to another page. 2020-01-13 12:07:10 +00:00
Arpit Mohan
a542abc563 Adding quick fix for email validation check before we send an email to the user.
This is because there are OAuth2 providers who don't provide an email ID of the user. In those scenarios, we cannot send a welcome email to the user.
2020-01-13 17:35:23 +05:30
Arpit Mohan
56b54e1d17 Fixing bugs in the Github login flow to check for uniqueness of user
Github auth doesn't return the email ID of the user. Hence, we need to use the `login` attribute of the user profile information.
2020-01-13 15:50:00 +05:30
Arpit Mohan
dd4a0ed5dd Merge branch 'feature/github-login' into 'release'
Adding Github login feature. Also adding condition to limit domain access in Google OAuth2

The domain restriction has been done by adding parameter `hd` in the function CustomServerOAuth2AuthorizationRequestResolver#authorizationRequest. We still verify if the OAuth2 response has the parameter `hd` to ensure that no client side manipulation has been performed.

See merge request theappsmith/internal-tools-server!153
2020-01-13 06:47:17 +00:00
Arpit Mohan
db27e7c86c Adding Github login feature. Also adding condition to limit domain access in Google OAuth2
The domain restriction has been done by adding parameter `hd` in the function CustomServerOAuth2AuthorizationRequestResolver#authorizationRequest. We still verify if the OAuth2 response has the parameter `hd` to ensure that no client side manipulation has been performed.
2020-01-13 12:13:53 +05:30
Arpit Mohan
7622d76f32 Adding the property server.use-forward headers in order for Spring security to function properly behind a Nginx load balancer
This property helps the spring security library derive the host name, protocol and port accurately even while running behind a Nginx load balancer. This is because nginx adds X-Forward-* headers that are parsed by Spring security library.
2020-01-13 10:25:43 +05:30
Arpit Mohan
f374638d98 Adding exception stack trace to the login failure scenarios for debugging. 2020-01-10 18:11:29 +05:30
Arpit Mohan
60b7c69346 Adding a check for referrer header incase we don't find the origin header in authenticationFailureHandler
This is required for OAuth2 failure handling. When the client makes an OAuth2 request, we don't receive an origin header. If the OAuth2 login fails for some reason, our failure handler will not redirect correctly unless we also check for the referer header.
2020-01-10 18:06:15 +05:30
Arpit Mohan
70e9adbef6 Correcting the redirect uri property name in the config file for custom OAuth2 redirection
This is required because when we host inside a docker container, the default host and port picked up by the code is the docker container's name & port. This will not work when Google (for example) needs to redirect back to our server after authentication is complete. Hence, we need to customize the default redirect uri for all OAuth2 endpoints.
2020-01-10 17:06:05 +05:30
Arpit Mohan
8b9d865c5a Revert "Adding logs to debug docker OAuth2 login issue"
This reverts commit e3773bdf9f1c0ee543b98a2f9ac01b07efaf1858.
2020-01-10 16:44:02 +05:30
Arpit Mohan
73a6ca13f0 Adding logs to debug docker OAuth2 login issue 2020-01-10 16:18:36 +05:30
Arpit Mohan
8c2b23f8d6 Merge branch 'hotfix/reset-password-user-not-exist' into 'release'
Handling the case where the user tries to reset the password for a user that doesn't yet exist in the system. We now return a 404 error for this scenario.

See merge request theappsmith/internal-tools-server!151
2020-01-10 09:28:10 +00:00
Arpit Mohan
6f76ba99d6 Handling the case where the user tries to reset the password for a user that doesn't yet exist in the system. 2020-01-10 14:54:10 +05:30
Trisha Anand
fe484946f7 Merge branch 'bug/update-layout' into 'release'
Fix for update layout failing for badly formed moustache keys

See merge request theappsmith/internal-tools-server!148
2020-01-08 11:09:38 +00:00
Trisha Anand
34b170bc5c Update layout was failing for when the mustache key was {{fetchUsers2[0].}}. When the word splitting happened, it got split into fetchUsers2, 0 and '.'. This means that when each word was finally split again, there was nothing before the '.' leading to null pointer exception. This has been fixed by adding a check for the same. 2020-01-08 16:34:28 +05:30
Arpit Mohan
3cdcd12444 Merge branch 'hotfix/pwd-reset-fix' into 'release'
Fixing the bug which prevented the reset password token from being saved in the DB

The issue was that the chain would receive a mono instead of an object. This would cause it to not persist the token in the DB. Moving to flatMap fixes this problem as we then deal with the actual object instead of the Mono.

Also fixing the url encoding in the email to ensure that the links generated are correct. By default mustache does HTML escaping and not URL encoding.

See merge request theappsmith/internal-tools-server!147
2020-01-08 09:04:59 +00:00
Arpit Mohan
2dced0818e Fixing the bug which prevented the reset password token from being saved in the DB
The issue was that the chain would receive a mono instead of an object. This would cause it to not persist the token in the DB. Moving to flatMap fixes this problem as we then deal with the actual object instead of the Mono.

Also fixing the url encoding in the email to ensure that the links generated are correct. By default mustache does HTML escaping and not URL encoding.
2020-01-08 14:30:45 +05:30
Trisha Anand
1a8956afe7 Merge branch 'hotfix/log-update-layout' into 'release'
Added logs which must be removed in 24 hours.

See merge request theappsmith/internal-tools-server!146
2020-01-07 15:23:37 +00:00
Trisha Anand
6f6dcbe4d4 Added logs which must be removed in 24 hours. 2020-01-07 20:50:10 +05:30
Trisha Anand
dcab0bfac0 Merge branch 'feature/pageload-actions-js' into 'release'
Removed Graph. Extracting action names from JS function as well. Updating LayoutLoadActions to include that

See merge request theappsmith/internal-tools-server!145
2020-01-07 11:34:44 +00:00
Trisha Anand
4a7b1632ad Removed the creation of dependency graph during update layout. Instead simple mustache finding are done now to get pageload actions. 2020-01-07 11:34:44 +00:00
Arpit Mohan
6e5a73ba1b Merge branch 'hotfix/redis-session-timeout' into 'release'
Increasing the redis inactive session timeout to 30 days

Now when a user doesn't log into the Appsmith system for 30 days, they will get logged out.

See merge request theappsmith/internal-tools-server!144
2020-01-07 07:39:15 +00:00
Arpit Mohan
36f6b35c09 Increasing the redis inactive session timeout to 30 days
Now when a user doesn't log into the Appsmith system for 30 days, they will get logged out.
2020-01-07 13:05:44 +05:30
Arpit Mohan
25560730ae Merge branch 'hotfix/group-user-specific' into 'release'
Filtering out the groups based on the user's current organization ID

Also refactoring the code to use the MultiValueMap for filter params which is a generic implementation and can support filtering on multiple fields of the domain object groups. This can be replicated to other domain objects as well.

See merge request theappsmith/internal-tools-server!143
2020-01-06 12:23:44 +00:00
Arpit Mohan
296ea7beee Filtering out the groups based on the user's current organization ID
Also refactoring the code to use the MultiValueMap for filter params which is a generic implementation and can support filtering on multiple fields of the domain object groups. This can be replicated to other domain objects as well.
2020-01-06 17:40:44 +05:30
Arpit Mohan
d8e9be9465 Merge branch 'feature/create-user-workspace-name' into 'release'
Ensuring that a user's personal workspace name is their first name by default.

This is because the full name makes the entire workspace name very long. If we just use the first name, it'll be a shorter string and easier to read by the end user as well.

See merge request theappsmith/internal-tools-server!142
2020-01-03 14:50:35 +00:00
Arpit Mohan
68092c19cc Ensuring that a user's personal workspace name is their first name by default.
This is because the full name makes the entire workspace name very long. If we just use the first name, it'll be a shorter string and easier to read by the end user as well.
2020-01-03 20:15:23 +05:30
Arpit Mohan
db8c88efbc Merge branch 'bug/body-replace-json' into 'release'
Action Execution should handle rest api body for mustache replacement scenario

See merge request theappsmith/internal-tools-server!141
2020-01-03 14:43:30 +00:00
Arpit Mohan
4eecb3a7cc Merge branch 'hotfix/group-for-org' into 'release'
Filtering out the groups to only return those that belong to the user's current organization

See merge request theappsmith/internal-tools-server!140
2020-01-03 14:40:29 +00:00
Trisha Anand
934771761b Handling the json body scenario where html escaping lead to json body for rest api being incorrect. 2020-01-03 20:09:44 +05:30
Arpit Mohan
e0a03c74e5 Filtering out the groups to only query those that belong to the user's current organization 2020-01-03 15:57:31 +05:30
Arpit Mohan
677b13cf89 Merge branch 'feature/default-group' into 'release'
Adding default parameter to the groups

This will be the default selected group that a new user will belong to when they are either invited or sign up on the Appsmith platform.

Refer: https://www.notion.so/appsmith/By-default-select-the-member-role-in-the-invite-user-flow-09e6509065b44b56be1a8bea21b9f1d7

See merge request theappsmith/internal-tools-server!139
2020-01-03 10:05:51 +00:00
Arpit Mohan
b8bc4514ba Adding default flag to the group domain object so that the client can select a default permission group for the user. 2020-01-03 10:05:51 +00:00
Arpit Mohan
045f1f31d7 Merge branch 'hotfix/reset-password-email' into 'release'
Modifying the forgotPassword flow to send the email to the user with a clickable URL.

Also adding the domain to which we need to link to in the resetPassword POST body. This will ensure that we send a valid URL to redirect the user back to the client app to ensure that they can set a new password.

See merge request theappsmith/internal-tools-server!138
2020-01-03 09:44:17 +00:00
Arpit Mohan
ca40bb842f Sending HTML template emails to users when they signup, invite another user or reset their password. 2020-01-03 09:44:17 +00:00
Trisha Anand
4bfc7dc7fc Merge branch 'feature/curl' into 'release'
Import 3P API using CURL

See merge request theappsmith/internal-tools-server!129
2020-01-02 13:38:55 +00:00
Trisha Anand
30b094c7a5 Curl Parsing for http. Extracts : Method, Headers, Query Params, URL (without query params). Yet to finish Body 2020-01-02 13:38:55 +00:00
Trisha Anand
de04297263 Merge branch 'feature/extend-pageload-actions' into 'release'
PageLoad Actions : Dependency graph

See merge request theappsmith/internal-tools-server!134
2020-01-02 13:38:40 +00:00
Trisha Anand
cef09282eb 1. For creating the dependency graph, only APIs with HTTP method GET is used. The other actions used in the DSL are ignored.
2. Only dependencies of actions over other actions are counted. If the action is dependent on widgets, thats is not counted as a dependency and is left for the frontend to handle.
2020-01-02 13:38:40 +00:00