Creating application-specific and trust service-specific bindings using the wsadmin tool

You can use the Jython or Jacl scripting language to create application-specific and trust service-specific bindings to match your installation environment or requirements.

Before you begin

When administrative security is enabled, verify that you use the correct administrative role, as the following table describes:
Table 1. Administrative roles. The administrative role determines if you can configure or assign bindings.
Administrative role Authorization
Administrator The Administrator role must have cell-wide access to configure bindings. If you have access to a specific resource only, you can configure bindings for the resource for which you have access. Only the Administrator role can configure binding attributes.
Configurator The Configurator role with cell-wide or resource specific access can assign or unassign bindings, but cannot edit attributes.
Deployer The Deployer role with cell-wide or resource specific access can assign or unassign bindings, but cannot edit attributes.
Operator The Operator role can view, but cannot configure bindings.
Monitor The Monitor role can view, but cannot configure bindings.

About this task

Policy set bindings specify the details about how your quality of service (QoS) is configured. For example, a policy set attachment determines that sign, encrypt, or reliable messaging should be enabled. The policy set binding specifies how the protection is configured, for example, the path of the keystore file, the class name of the token generator, or the Java™ Authentication and Authorization Service (JAAS) configuration name.

For application policy sets, you can specify the policy set bindings at the cell-level using default binding configurations, at the application level using application-specific binding configurations, or at the cell-level with general bindings. Server-level default bindings are deprecated. If no binding information is specified during policy set attachment, the policy set inherits the default binding. You can specify a general binding as the default for a server instead of server-default bindings.

For system policy sets, you can specify the bindings at the cell-level and the server-level. The available bindings for system policy sets are the TrustServiceSymmetricDefault and TrustServiceSecurityDefault bindings. If no custom binding information is specified by the attachment, the resources inherit the TrustServiceSymmetricDefault or TrustServiceSecurityDefault binding.

문제점 방지 문제점 방지: Only use default binding for development and testing. You must customize the signing and encryption keys in your binding configurations for a production environment.gotcha
Note: In WebSphere Application Server Version 7.0 and later, the security model was enhanced to a domain-centric security model instead of a server-based security model. The configuration of the default global security (cell) level and default server level bindings has also changed in this version of the product. In the WebSphere Application Server Version 6.1 Feature Pack for Web Services, you can configure one set of default bindings for the cell and optionally configure one set of default bindings for each server. In Version 7.0 and later, you can configure one or more general service provider bindings and one or more general service client bindings. After you have configured general bindings, you can specify which of these bindings is the global default binding. You can also optionally specify general binding that are used as the default for an application server or a security domain.

혼합 셀 환경을 지원하기 위해 WebSphere Application Server에서는 버전 7.0 및 버전 6.1 바인딩을 지원합니다. 일반 셀 레벨 바인딩은 버전 7.0 이상에만 적용되며, 애플리케이션별 바인딩은 애플리케이션에 필요한 버전에 남아 있습니다. 따라서 사용자가 애플리케이션별 바인딩을 작성하면 애플리케이션 서버에서 애플리케이션에 필요한 바인딩 버전을 판별합니다.

사용 환경에서 바인딩을 관리하기 위한 지침은 다음과 같습니다.
  • 기본 버전 6.1 바인딩, 버전 7.0 및 신뢰 서비스 바인딩을 표시 또는 수정하거나, 바인딩을 애플리케이션에 대한 첨부별로 참조하려면 getBinding 또는 setBinding 명령을 사용하여 attachmentId 및 bindingLocation 매개변수를 지정하십시오.
  • 일반 버전 7.0 이상의 바인딩을 사용하거나 수정하려면, getBinding 또는 setBinding 명령을 사용하여 bindingName 매개변수를 지정하십시오.
  • 특정 바인딩의 버전을 표시하려면 getBinding 명령으로 version 속성을 지정하십시오.
다음과 같은 경우, 버전 7.0 이상의 환경에서 애플리케이션에 버전 6.1 바인딩을 사용하십시오.
  • 애플리케이션의 모듈이 적어도 하나의 웹 서비스 기능팩 서버에 설치되어 있는 경우
  • 애플리케이션에 적어도 하나의 버전 6.1 애플리케이션별 바인딩이 포함되어 있는 경우. 이 경우 애플리케이션 서버는 웹 서비스 기능팩 서버에 설치된 애플리케이션의 자원 첨부에 일반 바인딩을 지정하지 않습니다. 애플리케이션에 대한 애플리케이션별 바인딩은 모두 같은 레벨에 있어야 합니다.
일반 서비스 제공자와 클라이언트 바인딩은 특정 정책 세트에 링크되어 있지 않으며 여러 애플리케이션에서 재사용할 수 있는 구성 정보를 제공합니다. 따라서 일반 제공자 및 클라이언트 정책 세트 바인딩을 작성하고 관리한 다음 각 바인딩 유형 중에서 애플리케이션 서버에 대한 기본값으로 사용할 바인딩 유형을 선택할 수 있습니다. 서버에 배치되어 있는 서비스가 바인딩 구성을 공유하도록 하려면 서버 기본 바인딩을 설정하는 것이 좋습니다. 서버에 배치된 각 애플리케이션에 바인딩을 지정하거나, 보안 도메인에 대한 기본 바인딩을 설정한 다음 하나 이상의 서버에 보안 도메인을 지정하는 방식으로 바인딩 구성을 공유할 수도 있습니다. 기본 바인딩은 글로벌 보안(셀) 레벨에서 사용되는 서비스 제공자나 클라이언트, 보안 도메인 또는 특정 서버에 대해 지정할 수 있으며, 기본 바인딩은 낮은 범위에서 지정된 대체 바인딩이 없을 경우 사용됩니다. 사용할 기본 바인딩을 결정할 때 애플리케이션 서버에서 사용하는 우선순위(낮은 순서 순)는 다음과 같습니다.
  1. 서버 레벨 기본값
  2. 보안 도메인 레벨 기본값
  3. 글로벌 보안(셀) 기본값

제품에 제공되는 샘플 일반 바인딩은 처음에 글로벌 보안(셀) 기본 바인딩으로 설정됩니다. 애플리케이션별 바인딩 또는 신뢰 서비스 바인딩이 정책 세트 첨부에 지정되지 않은 경우에는 기본 서비스 제공자 바인딩 및 기본 서비스 클라이언트 바인딩이 사용됩니다. 신뢰 서비스 첨부의 경우, 신뢰 관련 바인딩이 지정되어 있지 않을 때 기본 바인딩이 사용됩니다. 제공된 제공자 샘플을 기본 서비스 제공자 바인딩으로 사용하지 않으려는 경우, 기존 일반 제공자 바인딩을 선택하거나 비즈니스 요구를 충족하는 일반 제공자 바인딩을 새로 작성할 수 있습니다. 마찬가지로, 제공된 클라이언트 샘플을 기본 서비스 클라이언트 바인딩으로 사용하지 않으려는 경우, 기존 일반 클라이언트 바인딩을 선택하거나 비즈니스 요구를 충족하는 일반 클라이언트 바인딩을 새로 작성할 수 있습니다.

Procedure

  1. Launch a scripting command. To learn more, see the starting the wsadmin scripting client information.
  2. Determine the type of binding to create.

    You can create application policy set bindings at the cell-level, server-level, or application-level, and trust service policy set bindings at the cell-level or server-level.

  3. Retrieve the current binding configuration for the policy of interest.
    Use the getBinding command to display a Properties object containing all configuration attributes for a specific binding. Specify the location of the binding by passing a properties object using the -bindingLocation parameter and the following reference table:
    Table 2. Command parameters. Use the command to display attributes for a binding.
    Type of binding -bindingLocation parameter value
    Server-level (deprecated) -bindingLocation "[[node node1][server server1]]"
    Application -bindingLocation "[[application application1][attachmentId 123]]"
    Trust service -bindingLocation "[[systemType trustService] [attachmentId 123]]"
    Trust client -bindingLocation "[[systemType trustClient] [attachmentId 123]]"
    WS-Notification client -bindingLocation "[[bus myBus][WSNService myService][attachmentId 123]"
    For this example, the command displays the current binding configuration for the WSAddressing policy, with the 123 attachment ID, for the application1 application:
    AdminTask.getBinding('-policyType WSAddressing -bindingLocation "[[application application1][attachmentId 123]]"')
    To return a specific configuration attribute for the policy, use the -attributes parameter. For example, enter this command to determine if workload management is enabled:
    AdminTask.getBinding('-policyType WSaddressing -bindingLocation "[[application application1][attachmentId 123]]" -attributes "[preventWLM]"')
    The command returns a properties object which contains the value of the requested attribute, preventWLM. You might receive an error message if the binding does not exist in your configuration.
  4. Create a new application-specific binding for the policy of interest.
    Use the setBinding command to create a binding configuration for a policy. To specify that you are creating an application-specific binding, set the -bindingLocation parameter by passing the application and attachmentId property names in a properties object. If you are creating a system policy set binding for the trust service, you only need to specify the attachmentId property name. You can further customize your binding with the following parameters:
    Table 3. Command parameters. Use the command to create a binding configuration.
    Parameter Description Data type
    -policyType Specifies the policy of interest. String, optional
    -attachmentType Specifies the type of policy set attachment. If the attachment is for an application, you do not need to specify this parameter.
    전이 사용자용 전이 사용자용: -attachmentType 매개변수에 application 값을 지정할 수 있어도 첨부는 신뢰 서비스의 시스템 첨부와 같은 애플리케이션 이상에 사용되므로 application 값 대신에 provider 값을 사용하십시오. 시스템 정책 세트 첨부의 경우, attachmentType 매개변수에 대해서는 provider 값을 지정하고 -attachmentProperties 매개변수에 대해서는 "[systemType trustService]" 값을 지정하십시오. WSNClient 첨부의 경우, attachmentType 매개변수에 대해서는 client 값을 지정하고 -attachmentProperties 매개변수에 대해서는 busWSNService 특성을 지정하십시오. trns
    String, optional
    -attributes Specifies the attribute values to update. This parameter can include all binding attributes for the policy or a subset of attributes. Properties, optional
    -bindingName Specifies the name for your new application-specific binding. A name is generated if it is not specified. String, optional
    -domainName Specifies the domain name for the binding. Use this parameter to scope a binding to a domain other than the global security domain. String, optional

    The following example creates the WSAddressing1234binding attachment-specific binding for the WSAddressing policy, assigned to the application1 application attachment 123, and enables workload management:

    AdminTask.setBinding('-policyType WSAddressing -bindingName 
     WSAddressing123binding -bindingLocation "[ [application application1] [attachmentId 123] ]" -attributes 
     "[preventWLM false]"')
  5. Optional: Add application-specific binding properties.
    Use the setBinding command to add any additional custom properties for your application-specific binding. The application server provides custom properties that are specific to each quality of service. Use the following format to specify custom properties for the binding:
    AdminTask.setBinding('[-bindingLocation "[ [application application1] [attachmentId 123] 
     ]" -policyType WSAddressing -attributes "[[properties_x:name key_value] [properties_x:value 
     value]"]')
  6. Save your configuration changes.
    AdminConfig.save()

주제 유형을 표시하는 아이콘 태스크 주제



시간소인 아이콘 마지막 업데이트 날짜: July 9, 2016 6:15
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_wsfpcreatebinding
파일 이름:txml_wsfpcreatebinding.html