3장. 로컬 사용자에게 쉽게 인증 및 권한 부여를 허용하도록 ID 영역을 사용하여 Elytron 구성
Elytron에서 제공하는 identity-realm 을 사용하여 로컬 사용자가 JBoss EAP 관리 인터페이스에 연결할 수 있습니다.
JBoss EAP 관리 CLI는 local 이라는 identity-realm 을 사용하도록 사전 구성되어 있습니다. 이를 통해 로컬 사용자는 인증 정보를 제공하지 않고도 연결할 수 있습니다. ID 영역은 JBOSS-LOCAL-USER 메커니즘에서만 사용할 수 있습니다.
3.1. ID 영역을 사용하여 관리 인터페이스 보안 링크 복사링크가 클립보드에 복사되었습니다!
JBOSS-LOCAL-USER 메커니즘이 있는 identity-realm 보안 영역을 사용하여 관리 인터페이스를 보호할 수 있습니다.
사전 요구 사항
- JBoss EAP가 실행 중입니다.
프로세스
로컬
identity-realm을 만듭니다.구문
/subsystem=elytron/identity-realm=<local_identity_realm_name>:add(identity="$local",attribute-name=<attribute_name>,attribute-values=<attribute_value>)
/subsystem=elytron/identity-realm=<local_identity_realm_name>:add(identity="$local",attribute-name=<attribute_name>,attribute-values=<attribute_value>)Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예제
/subsystem=elytron/identity-realm=exampleLocalIdentityRealm:add(identity="$local",attribute-name=AttributeName,attribute-values=Value)
/subsystem=elytron/identity-realm=exampleLocalIdentityRealm:add(identity="$local",attribute-name=AttributeName,attribute-values=Value)Copy to Clipboard Copied! Toggle word wrap Toggle overflow 선택 사항: $local 이외의 로컬
identity-realm에 이름을 사용하려면구성 가능한-sasl-server-factory= <sasl_server_factory>에서속성 값을 변경합니다.wildfly.sasl.local-user.default-user구문
/subsystem=elytron/configurable-sasl-server-factory=<sasl_server_factory>:write-attribute(name=properties,value={"wildfly.sasl.local-user.default-user" => "<new_local_username>", "wildfly.sasl.local-user.challenge-path" => expression "${jboss.server.temp.dir}/auth"})/subsystem=elytron/configurable-sasl-server-factory=<sasl_server_factory>:write-attribute(name=properties,value={"wildfly.sasl.local-user.default-user" => "<new_local_username>", "wildfly.sasl.local-user.challenge-path" => expression "${jboss.server.temp.dir}/auth"})Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예제
/subsystem=elytron/configurable-sasl-server-factory=configured:write-attribute(name=properties,value={"wildfly.sasl.local-user.default-user" => "john", "wildfly.sasl.local-user.challenge-path" => expression "${jboss.server.temp.dir}/auth"})/subsystem=elytron/configurable-sasl-server-factory=configured:write-attribute(name=properties,value={"wildfly.sasl.local-user.default-user" => "john", "wildfly.sasl.local-user.challenge-path" => expression "${jboss.server.temp.dir}/auth"})Copy to Clipboard Copied! Toggle word wrap Toggle overflow
생성한
identity-realm을 참조하는 보안 도메인을 생성합니다.구문
/subsystem=elytron/security-domain=<security_domain_name>:add(default-realm=<local_identity_realm_name>,permission-mapper=<permission_mapper_name>,realms=[{realm=<Local_identity_realm_name>}])/subsystem=elytron/security-domain=<security_domain_name>:add(default-realm=<local_identity_realm_name>,permission-mapper=<permission_mapper_name>,realms=[{realm=<Local_identity_realm_name>}])Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예제
/subsystem=elytron/security-domain=exampleSecurityDomain:add(default-realm=exampleLocalIdentityRealm,permission-mapper=default-permission-mapper,realms=[{realm=exampleLocalIdentityRealm}])/subsystem=elytron/security-domain=exampleSecurityDomain:add(default-realm=exampleLocalIdentityRealm,permission-mapper=default-permission-mapper,realms=[{realm=exampleLocalIdentityRealm}])Copy to Clipboard Copied! Toggle word wrap Toggle overflow SASL 인증 팩토리를 추가합니다.
구문
/subsystem=elytron/sasl-authentication-factory=<sasl_auth_factory_name>:add(security-domain=<security_domain_name>,sasl-server-factory=configured,mechanism-configurations=[{mechanism-name=JBOSS-LOCAL-USER}])/subsystem=elytron/sasl-authentication-factory=<sasl_auth_factory_name>:add(security-domain=<security_domain_name>,sasl-server-factory=configured,mechanism-configurations=[{mechanism-name=JBOSS-LOCAL-USER}])Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예제
/subsystem=elytron/sasl-authentication-factory=exampleSaslAuthenticationFactory:add(security-domain=exampleSecurityDomain,sasl-server-factory=configured,mechanism-configurations=[{mechanism-name=JBOSS-LOCAL-USER}])/subsystem=elytron/sasl-authentication-factory=exampleSaslAuthenticationFactory:add(security-domain=exampleSecurityDomain,sasl-server-factory=configured,mechanism-configurations=[{mechanism-name=JBOSS-LOCAL-USER}])Copy to Clipboard Copied! Toggle word wrap Toggle overflow 관리 인터페이스에 대해 SASL 인증 팩토리를 활성화합니다.
구문
/core-service=management/management-interface=http-interface:write-attribute(name=http-upgrade,value={enabled=true,sasl-authentication-factory=<sasl_auth_factory_name>})/core-service=management/management-interface=http-interface:write-attribute(name=http-upgrade,value={enabled=true,sasl-authentication-factory=<sasl_auth_factory_name>})Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예제
/core-service=management/management-interface=http-interface:write-attribute(name=http-upgrade,value={enabled=true,sasl-authentication-factory=exampleSaslAuthenticationFactory})/core-service=management/management-interface=http-interface:write-attribute(name=http-upgrade,value={enabled=true,sasl-authentication-factory=exampleSaslAuthenticationFactory})Copy to Clipboard Copied! Toggle word wrap Toggle overflow 관리 인터페이스를 다시 로드합니다.
reload
$ reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow