airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [1/2] airavata git commit: Hacky way to fix CILogon JIT provision in IS
Date Wed, 27 Jul 2016 16:46:20 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop 501d3d8f8 -> 9ce254132


Hacky way to fix CILogon JIT provision in IS


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

Branch: refs/heads/develop
Commit: b0bccc18bb8dc0c06cf3186916a085d09f27e1f3
Parents: 14bd6d9
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Wed Jul 27 12:41:40 2016 -0400
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Wed Jul 27 12:41:40 2016 -0400

----------------------------------------------------------------------
 .../airavata/api/server/security/xacml/DefaultXACMLPEP.java      | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/b0bccc18/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/xacml/DefaultXACMLPEP.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/xacml/DefaultXACMLPEP.java
b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/xacml/DefaultXACMLPEP.java
index 42328d1..635977b 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/xacml/DefaultXACMLPEP.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/xacml/DefaultXACMLPEP.java
@@ -77,6 +77,10 @@ public class DefaultXACMLPEP {
         String decision;
         try {
             String subject = authzToken.getClaimsMap().get(Constants.USER_NAME);
+            //FIXME - Hacky way to fix CILogon JIT provision in IS
+            if(subject.startsWith("http://")){
+                subject = subject.substring(7);
+            }
             String action = "/airavata/" + metaData.get(Constants.API_METHOD_NAME);
             String decisionString = entitlementServiceStub.getDecisionByAttributes(subject,
null, action, null);
             //parse the XML decision string and obtain the decision


Mime
View raw message