airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [18/44] airavata git commit: changing few API methods to adhere to security solution.
Date Tue, 21 Jul 2015 04:42:01 GMT
changing few API methods to adhere to security solution.


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/dc524490
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/dc524490
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/dc524490

Branch: refs/heads/master
Commit: dc5244905d8585c4f750e78b04d8dce5670a968f
Parents: 4568832
Author: hasinitg <hasi7786@gmail.com>
Authored: Tue Jul 14 23:54:32 2015 +0530
Committer: hasinitg <hasi7786@gmail.com>
Committed: Tue Jul 14 23:54:32 2015 +0530

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |   12 +-
 .../java/org/apache/airavata/api/Airavata.java  |  809 +++++-
 .../main/resources/lib/airavata/Airavata.cpp    |  180 +-
 .../src/main/resources/lib/airavata/Airavata.h  |  144 +-
 .../lib/airavata/Airavata_server.skeleton.cpp   |    6 +-
 .../lib/airavata/airavata_api_constants.cpp     |   36 +
 .../lib/airavata/airavata_api_constants.h       |   42 +
 .../lib/airavata/airavata_api_types.cpp         |   33 +
 .../resources/lib/airavata/airavata_api_types.h |   55 +
 .../lib/airavata/airavata_commons_constants.cpp |   36 +
 .../lib/airavata/airavata_commons_constants.h   |   42 +
 .../lib/airavata/airavata_commons_types.cpp     |  504 ++++
 .../lib/airavata/airavata_commons_types.h       |  221 ++
 .../airavata/airavata_data_models_constants.cpp |   34 +
 .../airavata/airavata_data_models_constants.h   |   41 +
 .../lib/airavata/airavata_data_models_types.cpp |   33 +
 .../lib/airavata/airavata_data_models_types.h   |   52 +
 .../lib/airavata/airavata_errors_constants.cpp  |   34 +
 .../lib/airavata/airavata_errors_constants.h    |   41 +
 .../lib/airavata/airavata_errors_types.cpp      | 1169 ++++++++
 .../lib/airavata/airavata_errors_types.h        |  538 ++++
 .../application_deployment_model_constants.cpp  |   34 +
 .../application_deployment_model_constants.h    |   41 +
 .../application_deployment_model_types.cpp      |  781 +++++
 .../application_deployment_model_types.h        |  284 ++
 .../application_interface_model_constants.cpp   |   34 +
 .../application_interface_model_constants.h     |   41 +
 .../application_interface_model_types.cpp       |  297 ++
 .../application_interface_model_types.h         |  124 +
 .../application_io_models_constants.cpp         |   34 +
 .../airavata/application_io_models_constants.h  |   41 +
 .../airavata/application_io_models_types.cpp    |  637 +++++
 .../lib/airavata/application_io_models_types.h  |  287 ++
 .../compute_resource_model_constants.cpp        |   34 +
 .../airavata/compute_resource_model_constants.h |   41 +
 .../airavata/compute_resource_model_types.cpp   | 2663 ++++++++++++++++++
 .../lib/airavata/compute_resource_model_types.h | 1006 +++++++
 .../lib/airavata/experiment_model_constants.cpp |   34 +
 .../lib/airavata/experiment_model_constants.h   |   41 +
 .../lib/airavata/experiment_model_types.cpp     | 1444 ++++++++++
 .../lib/airavata/experiment_model_types.h       |  510 ++++
 ...gateway_resource_profile_model_constants.cpp |   34 +
 .../gateway_resource_profile_model_constants.h  |   41 +
 .../gateway_resource_profile_model_types.cpp    |  420 +++
 .../gateway_resource_profile_model_types.h      |  191 ++
 .../lib/airavata/job_model_constants.cpp        |   34 +
 .../lib/airavata/job_model_constants.h          |   41 +
 .../resources/lib/airavata/job_model_types.cpp  |  282 ++
 .../resources/lib/airavata/job_model_types.h    |  136 +
 .../lib/airavata/messaging_events_constants.cpp |   34 +
 .../lib/airavata/messaging_events_constants.h   |   41 +
 .../lib/airavata/messaging_events_types.cpp     | 1964 +++++++++++++
 .../lib/airavata/messaging_events_types.h       |  756 +++++
 .../lib/airavata/process_model_constants.cpp    |   34 +
 .../lib/airavata/process_model_constants.h      |   41 +
 .../lib/airavata/process_model_types.cpp        |  581 ++++
 .../lib/airavata/process_model_types.h          |  223 ++
 .../lib/airavata/scheduling_model_constants.cpp |   34 +
 .../lib/airavata/scheduling_model_constants.h   |   41 +
 .../lib/airavata/scheduling_model_types.cpp     |  279 ++
 .../lib/airavata/scheduling_model_types.h       |  144 +
 .../lib/airavata/security_model_constants.cpp   |   34 +
 .../lib/airavata/security_model_constants.h     |   41 +
 .../lib/airavata/security_model_types.cpp       |  172 ++
 .../lib/airavata/security_model_types.h         |   93 +
 .../lib/airavata/status_models_constants.cpp    |   34 +
 .../lib/airavata/status_models_constants.h      |   41 +
 .../lib/airavata/status_models_types.cpp        |  683 +++++
 .../lib/airavata/status_models_types.h          |  344 +++
 .../lib/airavata/task_model_constants.cpp       |   34 +
 .../lib/airavata/task_model_constants.h         |   41 +
 .../resources/lib/airavata/task_model_types.cpp |  507 ++++
 .../resources/lib/airavata/task_model_types.h   |  221 ++
 .../airavata/workflow_data_model_constants.cpp  |   34 +
 .../airavata/workflow_data_model_constants.h    |   41 +
 .../lib/airavata/workflow_data_model_types.cpp  |  277 ++
 .../lib/airavata/workflow_data_model_types.h    |  124 +
 .../lib/airavata/workspace_model_constants.cpp  |   34 +
 .../lib/airavata/workspace_model_constants.h    |   41 +
 .../lib/airavata/workspace_model_types.cpp      |  709 +++++
 .../lib/airavata/workspace_model_types.h        |  300 ++
 .../resources/lib/Airavata/API/Airavata.php     |  213 +-
 .../Model/AppCatalog/AppDeployment/Types.php    |    8 -
 .../Model/AppCatalog/AppInterface/Types.php     |    8 -
 .../Model/AppCatalog/ComputeResource/Types.php  |    8 -
 .../lib/Airavata/Model/Application/Io/Types.php |  657 +++++
 .../lib/Airavata/Model/Commons/Types.php        |  475 ++++
 .../lib/Airavata/Model/Experiment/Types.php     | 1478 ++++++++++
 .../Airavata/Model/Messaging/Event/Types.php    |    8 -
 .../lib/Airavata/Model/Process/Types.php        |  620 ++++
 .../lib/Airavata/Model/Scheduling/Types.php     |  261 ++
 .../lib/Airavata/Model/Security/Types.php       |  152 +
 .../lib/Airavata/Model/Status/Types.php         |  607 ++++
 .../resources/lib/Airavata/Model/Task/Types.php |  491 ++++
 .../main/resources/lib/Airavata/Model/Types.php |    8 -
 .../lib/Airavata/Model/Workspace/Types.php      |    2 +-
 .../resources/lib/Airavata/Model/job/Types.php  |  261 ++
 .../lib/apache/airavata/api/Airavata-remote     |   24 +-
 .../lib/apache/airavata/api/Airavata.py         |  171 +-
 .../model/appcatalog/appdeployment/constants.py |    1 -
 .../model/appcatalog/appdeployment/ttypes.py    |    2 +
 .../model/appcatalog/appinterface/constants.py  |    1 -
 .../model/appcatalog/appinterface/ttypes.py     |    1 +
 .../appcatalog/computeresource/constants.py     |    1 -
 .../model/appcatalog/computeresource/ttypes.py  |    2 +
 .../airavata/model/application/__init__.py      |    0
 .../airavata/model/application/io/__init__.py   |    1 +
 .../airavata/model/application/io/constants.py  |   11 +
 .../airavata/model/application/io/ttypes.py     |  468 +++
 .../apache/airavata/model/commons/__init__.py   |    1 +
 .../apache/airavata/model/commons/constants.py  |   12 +
 .../lib/apache/airavata/model/commons/ttypes.py |  335 +++
 .../airavata/model/experiment/__init__.py       |    1 +
 .../airavata/model/experiment/constants.py      |   11 +
 .../apache/airavata/model/experiment/ttypes.py  |  944 +++++++
 .../lib/apache/airavata/model/job/__init__.py   |    1 +
 .../lib/apache/airavata/model/job/constants.py  |   11 +
 .../lib/apache/airavata/model/job/ttypes.py     |  183 ++
 .../airavata/model/messaging/event/constants.py |    1 -
 .../airavata/model/messaging/event/ttypes.py    |    1 +
 .../apache/airavata/model/process/__init__.py   |    1 +
 .../apache/airavata/model/process/constants.py  |   11 +
 .../lib/apache/airavata/model/process/ttypes.py |  360 +++
 .../airavata/model/scheduling/__init__.py       |    1 +
 .../airavata/model/scheduling/constants.py      |   11 +
 .../apache/airavata/model/scheduling/ttypes.py  |  178 ++
 .../apache/airavata/model/security/__init__.py  |    1 +
 .../apache/airavata/model/security/constants.py |   11 +
 .../apache/airavata/model/security/ttypes.py    |  108 +
 .../apache/airavata/model/status/__init__.py    |    1 +
 .../apache/airavata/model/status/constants.py   |   11 +
 .../lib/apache/airavata/model/status/ttypes.py  |  539 ++++
 .../lib/apache/airavata/model/task/__init__.py  |    1 +
 .../lib/apache/airavata/model/task/constants.py |   11 +
 .../lib/apache/airavata/model/task/ttypes.py    |  366 +++
 .../lib/apache/airavata/model/ttypes.py         |    4 +
 .../apache/airavata/model/workflow/constants.py |    1 -
 .../apache/airavata/model/workflow/ttypes.py    |    1 +
 .../apache/airavata/model/workspace/ttypes.py   |    6 +-
 .../client/samples/CreateLaunchBES.java         |    9 +-
 .../client/samples/CreateLaunchExperiment.java  |    8 +-
 .../client/samples/RegisterSampleData.java      |    3 +-
 .../airavata-api/airavata_api.thrift            |   15 +-
 143 files changed, 30460 insertions(+), 265 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/dc524490/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index de00930..811cb8e 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -142,7 +142,9 @@ public class AiravataServerHandler implements Airavata.Iface {
     }
 
     @Override
-    public String addGateway(Gateway gateway) throws InvalidRequestException, AiravataClientException,
AiravataSystemException, TException {
+    public String addGateway(AuthzToken authzToken, Gateway gateway) throws InvalidRequestException,
AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+        //security check
+        authenticateNAuthorize(authzToken);
         try {
             experimentCatalog = RegistryFactory.getDefaultExpCatalog();
             if (!validateString(gateway.getGatewayId())){
@@ -160,7 +162,9 @@ public class AiravataServerHandler implements Airavata.Iface {
     }
 
     @Override
-    public void updateGateway(String gatewayId, Gateway updatedGateway) throws InvalidRequestException,
AiravataClientException, AiravataSystemException, TException {
+    public void updateGateway(AuthzToken authzToken, String gatewayId, Gateway updatedGateway)
throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException,
TException {
+        //security check
+        authenticateNAuthorize(authzToken);
         try {
             experimentCatalog = RegistryFactory.getExperimentCatalog(gatewayId);
             if (!experimentCatalog.isExist(ExperimentCatalogModelType.GATEWAY, gatewayId)){
@@ -180,7 +184,9 @@ public class AiravataServerHandler implements Airavata.Iface {
     }
 
     @Override
-    public Gateway getGateway(String gatewayId) throws InvalidRequestException, AiravataClientException,
AiravataSystemException, TException {
+    public Gateway getGateway(AuthzToken authzToken, String gatewayId) throws InvalidRequestException,
AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+        //security check
+        authenticateNAuthorize(authzToken);
         try {
             experimentCatalog = RegistryFactory.getExperimentCatalog(gatewayId);
             if (!experimentCatalog.isExist(ExperimentCatalogModelType.GATEWAY, gatewayId)){


Mime
View raw message