2016-10-14 15 views
0

私はWSO2 ESB 5.0.0で新しくなっていますが、ここ数年WSO2 ESB 4.7.0に取り組んでいます。 WSO2 ESB 5.0.0でAxis2 WebServiceを保護する方法は誰にも分かりますか?WSO2 ESB 5.0.0でAxis2 WebServiceを固定する方法は?

ドキュメント(https://docs.wso2.com/display/ESB500/WSO2+Enterprise+Service+Bus+Documentation)では、プロキシサービスを保護するための説明だけが見つかり、プロキシとして機能します。

WSB ESB 5.0.0のWebコンソールでは、サービスを保護する確実性がないという問題があります。 Axis2 Web Serviceを使用してCARアーカイブをデプロイするとき、またはWSO2 ESB 5.0.0 axis2サービスでAARアーカイブをデプロイするときにセキュリティ保護されていない展開

バージョン4.7.0では、WebコンソールからAxis2 WebServiceを保護することができますが、5.0.0ではこれを行うことはできません。それを確保5.0.0で

プロキシサービスの

は非常に簡単です: - レジストリ でポリシーを作成する - などのプロキシ定義の2行を追加:のAxis2 Webサービスのためにこれを行う方法

<enableSec/> 
<policy key="gov:ws-policy/myPolicy.xml"/>* 

を、のような行を追加しますこれはaxis2 serwisのservices.xmlの説明では機能しませんか?助言がありますか ?

おかげで ヤクブ

答えて

1

あなたはESB 5.0.0でサポートされていない管理コンソールを介して、サービスのセキュリティを適用し、気づいたよう。ただし、以下の手順でaxis2サービスのセキュリティを有効にすることができます。

  1. services.xmlファイルは/ META-INFにあり、ポリシー設定を手動で追加します。 <service>タグ内に設定を追加してください。 (WSO2 Developerスタジオを使用してポリシー設定を生成することができます。doc [1]の手順に従って、ソース設定を参照してポリシー設定を取得してください)
  2. 次にポリシー設定の後にrampart設定タグを追加してください。 <service>タグ内にあります。 <module ref="rampart"/>

私はあなたの参照用のサンプルservices.xmlのを装着しています。

<?xml version="1.0" encoding="UTF-8"?> 
<!-- 
    ~ Copyright 2005-2011 WSO2, Inc. (http://wso2.com) 
    ~ 
    ~ Licensed 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. 
    --> 
<service name="echo"> 
    <schema elementFormDefaultQualified="false" /> 
    <description>This service echos the input provided to it.</description> 
    <transports> 
     <transport>https</transport> 
     <transport>http</transport> 
    </transports> 
    <parameter name="ServiceClass" locked="true">org.wso2.carbon.core.services.echo.Echo</parameter> 
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UTOverTransport"> 
     <wsp:ExactlyOne> 
     <wsp:All> 
      <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> 
       <wsp:Policy> 
        <sp:TransportToken> 
        <wsp:Policy> 
         <sp:HttpsToken RequireClientCertificate="false" /> 
        </wsp:Policy> 
        </sp:TransportToken> 
        <sp:AlgorithmSuite> 
        <wsp:Policy> 
         <sp:Basic256 /> 
        </wsp:Policy> 
        </sp:AlgorithmSuite> 
        <sp:Layout> 
        <wsp:Policy> 
         <sp:Lax /> 
        </wsp:Policy> 
        </sp:Layout> 
        <sp:IncludeTimestamp /> 
       </wsp:Policy> 
      </sp:TransportBinding> 
      <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> 
       <wsp:Policy> 
        <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" /> 
       </wsp:Policy> 
      </sp:SignedSupportingTokens> 
     </wsp:All> 
     </wsp:ExactlyOne> 
     <rampart:RampartConfig xmlns:rampart="http://ws.apache.org/rampart/policy"> 
     <rampart:user>wso2carbon</rampart:user> 
     <rampart:encryptionUser>useReqSigCert</rampart:encryptionUser> 
     <rampart:timestampPrecisionInMilliseconds>true</rampart:timestampPrecisionInMilliseconds> 
     <rampart:timestampTTL>300</rampart:timestampTTL> 
     <rampart:timestampMaxSkew>300</rampart:timestampMaxSkew> 
     <rampart:timestampStrict>false</rampart:timestampStrict> 
     <rampart:tokenStoreClass>org.wso2.carbon.security.util.SecurityTokenStore</rampart:tokenStoreClass> 
     <rampart:nonceLifeTime>300</rampart:nonceLifeTime> 
     </rampart:RampartConfig> 
     <sec:CarbonSecConfig xmlns:sec="http://www.wso2.org/products/carbon/security"> 
     <sec:Authorization> 
      <sec:property name="org.wso2.carbon.security.allowedroles">admin</sec:property> 
     </sec:Authorization> 
     </sec:CarbonSecConfig> 
    </wsp:Policy> 
    <module ref="rampart"/> 
</service> 

[1] https://docs.wso2.com/display/DVS380/Applying+Security+for+a+Service#ApplyingSecurityforaService-Creatingthesecuritypolicy

+0

おかげで非常に多く、それが作品です! –

関連する問題