0

저는 금융 부문의 BRMS 기술 프로젝트에 참여하고 있습니다. Drools Guvnor 5.5.0.Final을 jboss-as-7.2.0.Alpha1-SNAPSHOT 서버와 함께 사용하십시오. jaas를 사용하여 guvnor에서 로그인 페이지를 성공적으로 구성했습니다. 이제 역할 기반 권한이 있어야합니다. 그러나 아직 그것을 구현할 수 없었습니다. 콩, XML은jboss를 사용하여 drools guvnor에서 역할 기반 권한을 부여하지 못했습니다. AS 7

<security:IdentityImpl> 
    <s:modifies/> 

    <!-- No real authentication: demo authentication for demo purposes --> 
    <!--<security:authenticatorClass>org.drools.guvnor.server.security.DemoAuthenticator</security:authenticatorClass>--> 

    <!-- JAAS based authentication --> 
    <security:authenticatorName>jaasAuthenticator</security:authenticatorName> 

    <!-- IDM based authentication (supports LDAP, see Seam 3 and PicketLink IDM documentation) --> 
    <!--<security:authenticatorClass>org.jboss.seam.security.management.IdmAuthenticator</security:authenticator>--> 
    </security:IdentityImpl> 

    <security:jaas.JaasAuthenticator> 
    <s:modifies/> 
    <!-- 
     The following one will use the jaas configuration called "other", 
     which in jboss AS means you can use properties files for users. 
    --> 
    <s:jaasConfigName>other</s:jaasConfigName> 
    </security:jaas.JaasAuthenticator> 


    <!-- SECURITY AUTHORIZATION CONFIGURATION --> 
    <!-- 
     This is used to enable or disable role-based authorization. By default it is disabled. 
    --> 
    <component name="org.jboss.seam.security.permission.PermissionResolver"> 
     <property name="enableRoleBasedAuthorization">true</property> 
     </component> 

하고 standalone.xml는

<security-domain name="other" cache-type="default"> 
        <authentication> 
         <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required"> 
          <module-option name="usersProperties" value="${jboss.server.config.dir}/users.properties"/> 
          <module-option name="rolesProperties" value="${jboss.server.config.dir}/roles.properties"/> 
          <module-option name="defaultUsersProperties" value="${jboss.server.config.dir}/users.properties"/> 
          <module-option name="defaultRolesProperties" value="${jboss.server.config.dir}/roles.properties"/> 
          <module-option name="password-stacking" value="useFirstPass"/> 
         </login-module> 
        </authentication> 
       </security-domain> 

내가 놓친 거지 모르겠어요입니다. 아무도 나를 똑같이 제안 할 수는 없지. 미리 감사드립니다.

답변

0

문제가 해결되었습니다. 문제는 이음새의 클래스 파일 중 하나와 beans.xml의 구성 중 하나였습니다.

+0

안녕하세요, R.K.R. 당신의 솔루션에 관심이있는 동료가 있습니다. 솔기와 beans.xml의 변경 사항을 설명 할 수 있습니까? 아마 세부 사항이 그를 도울 것입니다. 그리고 다른 사람들은 생각합니다. 감사. –

0

제 경우에는 Drools Guvnor 5.5.0을 얻으려면 3 가지 특정 Drools 변경이 필요합니다. JBoss EAP 6 (이는 AS 7.1 및 AS 7.2로 변환해야 함) : XML 수정, 이음새 보안 교체 및 Guvnor 파일 패치.

beans.xml에서 jaasConfigName 태그는 네임 스페이스를 지정하지 않으므로 오류가 발생합니다. jaasConfigNamesecurity:jaasConfigName으로 변경하여이 문제를 해결하십시오.

<security:jaas.JaasAuthenticator> 
    <s:modifies/> 
    <!-- 
    The following one will use the jaas configuration called "other", 
    which in jboss AS means you can use properties files for users. 
    --> 
    <security:jaasConfigName>other</security:jaasConfigName> 
</security:jaas.JaasAuthenticator> 

우두머리에 의해 사용되는 심 보안의 버전은 버그가 포함되어 있습니다. 이 문제를 해결하려면 Guvnor WAR을 수정하십시오. 및 seam-security-api-3.1.0.Final.jar을 으로 바꿔서 seam-security-3.1.0.Final.jar을 바꾸십시오.

Guvnor의 SecurityServiceImpl 클래스에 버그가 있습니다. 이 패치를 수정하고 심 보안 및 SecurityServiceImpl 버그 GitHub의에서 우두머리의 5.5.x 분기 (https://github.com/droolsjbpm/guvnor/tree/5.5.x)에 해결되었는지 http://drools.46999.n3.nabble.com/How-configure-Guvnor-5-4-JAAS-with-jboss-7-0-2-tp4020424p4020854.html

주에 따라 클래스를 다시 컴파일, 그래서 이러한 문제에 대한 쉬운 해결책은에있을하려면 최신 버전을 다운로드하고 빌드하십시오. (그게 내가 한 일이야.)

이러한 변경 사항을 적용하면 인증 및 역할 기반 인증이 모두 작동합니다. 테스트 환경에서 패키지 제한된 개발자 액세스를 시연했습니다.

참조 https://community.jboss.org/thread/206645, https://issues.jboss.org/browse/GUVNOR-1989, https://issues.jboss.org/browse/GUVNOR-1976, http://drools.46999.n3.nabble.com/How-configure-Guvnor-5-4-JAAS-with-jboss-7-0-2-td4020424.html

및 배경 정보를 http://drools.46999.n3.nabble.com/rules-users-Error-JAAS-Authentication-with-Guvnor-5-5-0-and-Authorization-Error-tt4023826.html.