From do-not-reply at jboss.org Wed Feb 1 11:07:29 2012
Content-Type: multipart/mixed; boundary="===============6429043899909138120=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: hornetq-commits at lists.jboss.org
Subject: [hornetq-commits] JBoss hornetq SVN: r12057 - in
branches/Branch_2_2_AS7/src/main/org/hornetq: service and 1 other directory.
Date: Wed, 01 Feb 2012 11:07:28 -0500
Message-ID: <201202011607.q11G7Se4001962@svn01.web.mwc.hst.phx2.redhat.com>
--===============6429043899909138120==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: clebert.suconic(a)jboss.com
Date: 2012-02-01 11:07:27 -0500 (Wed, 01 Feb 2012)
New Revision: 12057
Removed:
branches/Branch_2_2_AS7/src/main/org/hornetq/integration/jboss/security/=
AS4SecurityActions.java
Modified:
branches/Branch_2_2_AS7/src/main/org/hornetq/integration/jboss/security/=
JBossASSecurityManager.java
branches/Branch_2_2_AS7/src/main/org/hornetq/service/JBossASSecurityMana=
gerService.java
Log:
Removing AS4 dependency
Deleted: branches/Branch_2_2_AS7/src/main/org/hornetq/integration/jboss/sec=
urity/AS4SecurityActions.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/Branch_2_2_AS7/src/main/org/hornetq/integration/jboss/security=
/AS4SecurityActions.java 2012-02-01 15:19:08 UTC (rev 12056)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/integration/jboss/security=
/AS4SecurityActions.java 2012-02-01 16:07:27 UTC (rev 12057)
@@ -1,126 +0,0 @@
-/*
- * Copyright 2009 Red Hat, Inc.
- * Red Hat licenses this file to you under the Apache License, version
- * 2.0 (the "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-package org.hornetq.integration.jboss.security;
-
-import java.security.AccessController;
-import java.security.Principal;
-import java.security.PrivilegedAction;
-
-import javax.security.auth.Subject;
-
-import org.jboss.security.SecurityAssociation;
-
-/** A collection of privileged actions for this package
- * @author Scott.Stark(a)jboss.org
- * @author Alexey Loubyansky
- * @author Tim Fox
- * @author anil saldhana
- * @version $Revison: 1.0$
- */
-
-/**
- * @author Andy Taylor
- * Created Oct 21, 2009
- */
-public class AS4SecurityActions
-{
- interface PrincipalInfoAction
- {
- PrincipalInfoAction PRIVILEGED =3D new PrincipalInfoAction()
- {
- public void push(final Principal principal, final Object credenti=
al, final Subject subject)
- {
- AccessController.doPrivileged(new PrivilegedAction()
- {
- public Object run()
- {
- SecurityAssociation.pushSubjectContext(subject, principa=
l, credential);
- return null;
- }
- });
- }
-
- public void dup()
- {
- AccessController.doPrivileged(new PrivilegedAction()
- {
- public Object run()
- {
- SecurityAssociation.dupSubjectContext();
- return null;
- }
- });
- }
-
- public void pop()
- {
- AccessController.doPrivileged(new PrivilegedAction()
- {
- public Object run()
- {
- SecurityAssociation.popSubjectContext();
- return null;
- }
- });
- }
- };
-
- PrincipalInfoAction NON_PRIVILEGED =3D new PrincipalInfoAction()
- {
- public void push(final Principal principal, final Object credenti=
al, final Subject subject)
- {
- SecurityAssociation.pushSubjectContext(subject, principal, cre=
dential);
- }
-
- public void dup()
- {
- SecurityAssociation.dupSubjectContext();
- }
-
- public void pop()
- {
- SecurityAssociation.popSubjectContext();
- }
- };
-
- void push(Principal principal, Object credential, Subject subject);
-
- void dup();
-
- void pop();
- }
-
- static void pushSubjectContext(final Principal principal, final Object =
credential, final Subject subject)
- {
- if (System.getSecurityManager() =3D=3D null)
- {
- PrincipalInfoAction.NON_PRIVILEGED.push(principal, credential, su=
bject);
- }
- else
- {
- PrincipalInfoAction.PRIVILEGED.push(principal, credential, subjec=
t);
- }
- }
-
- static void popSubjectContext()
- {
- if (System.getSecurityManager() =3D=3D null)
- {
- PrincipalInfoAction.NON_PRIVILEGED.pop();
- }
- else
- {
- PrincipalInfoAction.PRIVILEGED.pop();
- }
- }
-}
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/integration/jboss/se=
curity/JBossASSecurityManager.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/Branch_2_2_AS7/src/main/org/hornetq/integration/jboss/security=
/JBossASSecurityManager.java 2012-02-01 15:19:08 UTC (rev 12056)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/integration/jboss/security=
/JBossASSecurityManager.java 2012-02-01 16:07:27 UTC (rev 12057)
@@ -63,8 +63,6 @@
=
private boolean started;
=
- private boolean isAs5 =3D true;
-
private boolean allowClientLogin =3D false;
=
private boolean authoriseOnClientLogin =3D false;
@@ -183,26 +181,12 @@
=
private void popSecurityContext()
{
- if (isAs5)
- {
- SecurityActions.popSubjectContext();
- }
- else
- {
- AS4SecurityActions.popSubjectContext();
- }
+ SecurityActions.popSubjectContext();
}
=
private void pushSecurityContext(final SimplePrincipal principal, final=
char[] passwordChars, final Subject subject)
{
- if (isAs5)
- {
- SecurityActions.pushSubjectContext(principal, passwordChars, subj=
ect, securityDomainName);
- }
- else
- {
- AS4SecurityActions.pushSubjectContext(principal, passwordChars, s=
ubject);
- }
+ SecurityActions.pushSubjectContext(principal, passwordChars, subject=
, securityDomainName);
}
=
public void addRole(final String user, final String role)
@@ -291,11 +275,6 @@
this.securityDomainName =3D securityDomainName;
}
=
- public void setAs5(final boolean as5)
- {
- isAs5 =3D as5;
- }
-
public void setAllowClientLogin(final boolean allowClientLogin)
{
this.allowClientLogin =3D allowClientLogin;
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/service/JBossASSecur=
ityManagerService.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/Branch_2_2_AS7/src/main/org/hornetq/service/JBossASSecurityMan=
agerService.java 2012-02-01 15:19:08 UTC (rev 12056)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/service/JBossASSecurityMan=
agerService.java 2012-02-01 16:07:27 UTC (rev 12057)
@@ -25,7 +25,6 @@
public void create()
{
jBossASSecurityManager =3D new JBossASSecurityManager();
- jBossASSecurityManager.setAs5(false);
}
=
public JBossASSecurityManager getJBossASSecurityManager()
--===============6429043899909138120==--