2.4. Elytron를 사용하여 도메인 모드에서 SSL 구성
JBoss EAP 7.1 이상 버전에서는 Elytron를 사용하여 도메인 모드에서 SSL을 구성할 수 있습니다.
사전 요구 사항
- JBoss EAP 7.1 이상.
- Elytron
절차
자체 서명된 인증서를 생성하여 SSL을 활성화합니다.
keytool -genkey -alias jboss -keysize 2048 -validity 365 -keyalg RSA -sigalg SHA256withRSA -keystore jboss.jks -storepass jboss@123 -keypass jboss@123 -dname "CN=example.com, OU=JavaEE, O=Red Hat, C=IN"관리 CLI를 사용하여 키 저장소, key-manager, ssl-context를 생성합니다.
#Configure a keystore /profile=<profile-name>/subsystem=elytron/key-store=httpsKS:add(path="${jboss.home.dir}/ssl/jboss.jks", credential-reference={clear-text=jboss@123}, type=JKS) #Create a new key-manager /profile=<profile-name>/subsystem=elytron/key-manager=httpsKM:add(key-store=httpsKS,algorithm="SunX509",credential-reference={clear-text=jboss@123}) #Configure new server-ssl-context reference with protocol and ciphers /profile=<profile-name>/subsystem=elytron/server-ssl-context=httpsSSC:add(key-manager=httpsKM,protocols=["TLSv1.2"])Elytron
ssl-context를 매핑하도록 VDDK 하위 시스템을 구성합니다.batch /profile=<profile-name>/subsystem=undertow/server=default-server/https-listener=https:undefine-attribute(name=security-realm) /profile=<profile-name>/subsystem=undertow/server=default-server/https-listener=https:write-attribute(name=ssl-context,value=httpsSSC) run-batch선택 사항: 동일한
ssl-context를 사용하도록management-interface를 보호합니다.host-*.xml파일은 관리 인터페이스가 포함된 도메인 컨트롤러 및 호스트 컨트롤러에 대한 구성을 정의합니다. SSL이 성공적으로 구성되었는지 확인하려면 호스트에서ssl-context를 다시 정의해야 합니다.#Configure a keystore on the master DC host /host=<host-name>/subsystem=elytron/key-store=httpsKS:add(path="${jboss.home.dir}/ssl/jboss.jks", credential-reference={clear-text=jboss@123}, type=JKS) #Create a new key-manager on the master DC host /host=<host-name>/subsystem=elytron/key-manager=httpsKM:add(key-store=httpsKS,algorithm="SunX509",credential-reference={clear-text=jboss@123}) #Configure new server-ssl-context reference with protocol and ciphers on the master DC host /host=<host-name>/subsystem=elytron/server-ssl-context=httpsSSC:add(key-manager=httpsKM,protocols=["TLSv1.2"]) #Configure the secure-port and ssl-context for management-http interface on the master DC host /host=<host-name>/core-service=management/management-interface=http-interface:write-attribute(name=ssl-context,value=httpsSSC) /host=<host-name>/core-service=management/management-interface=http-interface:write-attribute(name=secure-port,value=9993)- 원격 호스트 컨트롤러가 SSL을 통해 도메인 컨트롤러에 연결할 수 있도록 truststore가 올바르게 구성되었는지 확인합니다. 자세한 내용은 Elytron을 사용하여 도메인 및 호스트 컨트롤러 간 SSL/TLS 구성을 참조하십시오.
서버를 다시 로드하여 변경 사항이 적용되었는지 확인합니다.
reload --host=<host-name>
검증
Red Hat Enterprise Linux 명령줄에서 브라우저 또는 openSSL을 사용하여 TLS 연결을 확인합니다.
openssl s_client -connect host:8443출력에는 인증서 및 사용된 TLS 버전에 대한 정보가 표시됩니다.
SSL-Session: Protocol: TLSv1.2