You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@clerezza.apache.org by re...@apache.org on 2011/08/19 12:38:47 UTC
svn commit: r1159586 - in
/incubator/clerezza/trunk/parent/platform.security: pom.xml
src/main/java/org/apache/clerezza/platform/security/auth/AuthenticationCheckerImpl.java
Author: reto
Date: Fri Aug 19 10:38:47 2011
New Revision: 1159586
URL: http://svn.apache.org/viewvc?rev=1159586&view=rev
Log:
CLEREZZA-623: not yet a real fix of the issue, but reducing disadvantages of depending on platform.security
Modified:
incubator/clerezza/trunk/parent/platform.security/pom.xml
incubator/clerezza/trunk/parent/platform.security/src/main/java/org/apache/clerezza/platform/security/auth/AuthenticationCheckerImpl.java
Modified: incubator/clerezza/trunk/parent/platform.security/pom.xml
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.security/pom.xml?rev=1159586&r1=1159585&r2=1159586&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/platform.security/pom.xml (original)
+++ incubator/clerezza/trunk/parent/platform.security/pom.xml Fri Aug 19 10:38:47 2011
@@ -106,6 +106,7 @@
<instructions>
<Export-Package>org.apache.clerezza.platform.security,org.apache.clerezza.platform.security.auth</Export-Package>
<DynamicImport-Package>*</DynamicImport-Package>
+ <Import-Package>javax.ws.rs;resolution:=optional</Import-Package>
</instructions>
</configuration>
</plugin>
Modified: incubator/clerezza/trunk/parent/platform.security/src/main/java/org/apache/clerezza/platform/security/auth/AuthenticationCheckerImpl.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.security/src/main/java/org/apache/clerezza/platform/security/auth/AuthenticationCheckerImpl.java?rev=1159586&r1=1159585&r2=1159586&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/platform.security/src/main/java/org/apache/clerezza/platform/security/auth/AuthenticationCheckerImpl.java (original)
+++ incubator/clerezza/trunk/parent/platform.security/src/main/java/org/apache/clerezza/platform/security/auth/AuthenticationCheckerImpl.java Fri Aug 19 10:38:47 2011
@@ -64,7 +64,10 @@ public class AuthenticationCheckerImpl i
@Override
public boolean authenticate(String userName, String password) throws NoSuchAgent
{
- AccessController.checkPermission(new CheckAuthenticationPermission());
+ SecurityManager security = System.getSecurityManager();
+ if (security != null) {
+ AccessController.checkPermission(new CheckAuthenticationPermission());
+ }
NonLiteral agent = getAgentFromGraph(userName);
String storedPassword = getPasswordOfAgent(agent);
if (storedPassword.equals(PasswordUtil.convertPassword(password))) {