airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject airavata git commit: fixing username mismatch issue
Date Wed, 20 Jul 2016 17:29:58 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 501d3d8f8 -> 67e1f7bd1


fixing username mismatch issue


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

Branch: refs/heads/master
Commit: 67e1f7bd16e0bcf1147947e13823fc51dbb64d07
Parents: 501d3d8
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Wed Jul 20 13:29:49 2016 -0400
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Wed Jul 20 13:29:49 2016 -0400

----------------------------------------------------------------------
 .../api/server/security/DefaultAiravataSecurityManager.java     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/67e1f7bd/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/DefaultAiravataSecurityManager.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/DefaultAiravataSecurityManager.java
b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/DefaultAiravataSecurityManager.java
index 8657e13..90039f4 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/DefaultAiravataSecurityManager.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/DefaultAiravataSecurityManager.java
@@ -179,8 +179,11 @@ public class DefaultAiravataSecurityManager implements AiravataSecurityManager
{
                         if(authorizedUserName.contains("@")){
                             authorizedUserName = authorizedUserName.split("@")[0];
                         }
+                        if(subject.contains("@")){
+                            subject = subject.split("@")[0];
+                        }
                         //cannot impersonate users
-                        if(!authorizedUserName.equals(subject))
+                        if(!authorizedUserName.toLowerCase().equals(subject.toLowerCase()))
                             return false;
 
                         long expiryTimestamp = validationResponse.getExpiryTime();


Mime
View raw message