HTTP 서블릿은 인바운드 HTTP 게시를 처리하는 J2EE 구성요소입니다. HTTP 서블릿을 보안하려면 먼저 엔터프라이즈 Bean을 보안해야 합니다. HTTP 기본 인증을 사용하여 HTTP 서블릿을 보안할 수 있습니다. 올바른 사용자 이름 및 비밀번호를 갖는 권한 부여된 사용자가 시스템에 XML 트랜잭션을 게시할 수 있습니다.
이 태스크 정보
HTTP 기본 인증을 사용하려면, 웹 애플리케이션의 web.xml 파일을 수정하십시오.
- 통합 서블릿의 <security-constraint> 섹션에서 주석을 제거하십시오. 각 서비스 유형별로 하나씩 세 개의 <security-constraint> 섹션(엔터프라이즈 서비스, 오브젝트 구조 서비스 및 표준 서비스)이 있습니다.
서비스 맵핑에 대한 <web-resource-name> 은(는) 다음과 같습니다.
| <web-resource-name> |
서비스 |
| 엔터프라이즈 서비스 서블릿 |
엔터프라이즈 서비스 |
| App 서비스 서블릿 |
표준 서비스 |
| 오브젝트 구조 서비스 서블릿 |
오브젝트 구조 서비스 |
프로시저
- web.xml 파일에서 다음 코드 예제에서와 같이 개별 서비스 유형에 대한 보안 제약사항 섹션 주석을 해제하십시오.
<!--
<security-constraint>
<web-resource-collection>
<web-resource-name>Enterprise Service Servlet</web-resource-name>
<description>
Enterprise Service Servlet (HTTP POST) accessible by authorized users
</description>
<url-pattern>/es/*</url-pattern>
<url-pattern>/esqueue/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description>
Roles that have access to Enterprise Service Servlet (HTTP POST)
</description>
<role-name>maximouser</role-name>
</auth-constraint>
<user-data-constraint>
<description>data transmission gaurantee</description>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>App Service Servlet</web-resource-name>
<description>
App Service Servlet (HTTP POST) accessible by authorized users
</description>
<url-pattern>/ss/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description>
Roles that have access to App Service Servlet (HTTP POST)
</description>
<role-name>maximouser</role-name>
</auth-constraint>
<user-data-constraint>
<description>data transmission gaurantee</description>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Object Structure Service Servlet</web-resource-name>
<description>
Object Structure Service Servlet (HTTP POST) accessible by authorized users
</description>
<url-pattern>/os/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description>
Roles that have access to Object Structure Service Servlet (HTTP POST)
</description>
<role-name>maximouser</role-name>
</auth-constraint>
<user-data-constraint>
<description>data transmission gaurantee</description>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
-->
- 다음 예제 코드에서와 같이 web.xml 파일의 <security-role> 섹션이 주석 처리되지 않았는지 확인하십시오.
<security-role>
<description>An Integration User</description>
<role-name>maximouser</role-name>
</security-role>
- 다음 예제에서와 같이 useAppServerSecurity <env-entry-name> 섹션의 값을 0에서 1로 변경하십시오.
<description>
Indicates whether to use Application Server security or not
</description>
<env-entry-name>useAppServerSecurity</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>1</env-entry-value>
</env-entry>
다음에 수행할 사항
HTTPS 게시에 SSL(Secure Socket Layer)을 사용하여 웹 서비스를 안전하게 배치할 수 있습니다. 적절한 디지털 인증서를 사용하여 애플리케이션 서버의 SSL을 구성하십시오.