第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 オプション: ローカル
identity-realmの名前を $local 以外にする場合は、configurable-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