此内容没有您所选择的语言版本。
Chapter 21. Security for Cluster Traffic
21.1. Configure Node Security in Library Mode 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
In Library mode, node authentication is configured directly in the JGroups configuration. JGroups can be configured so that nodes must authenticate each other when joining or merging with a cluster. The authentication uses SASL and is enabled by adding the
SASL protocol to your JGroups XML configuration.
SASL relies on JAAS notions, such as
CallbackHandlers, to obtain certain information necessary for the authentication handshake. Users must supply their own CallbackHandlers on both client and server sides.
Important
The
JAAS API is only available when configuring user authentication and authorization, and is not available for node security.
The following example demonstrates how to implement a
CallbackHandler class. In this example, login and password are checked against values provided via Java properties when JBoss Data Grid is started, and authorization is checked against role which is defined in the class ("test_user").
Example 21.1. Callback Handler Class
For authentication, specify the
javax.security.auth.callback.NameCallback and javax.security.auth.callback.PasswordCallback callbacks
For authorization, specify the callbacks required for authentication, as well as specifying the
javax.security.sasl.AuthorizeCallback callback.