노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.


 (2.2) Openfire, 외부 Database 연동 II

 

 

 

Authentication Integration

 

Openfire는 인증 data를 보유한 외부의 database에서 읽어 올 수 있다.

 

The simplest possible integration with a custom external database is authentication integration. Use the following settings to enable authentication integration.

 

provider.auth.className

-- set the value to org.jivesoftware.openfire.auth.JDBCAuthProvider.

jdbcAuthProvider.passwordSQL

-- the SQL String to select a user's password. The SQL statement should contain a single "?" character, which will be dynamically replaced with a username when being executed.

jdbcAuthProvider.passwordType

-- the type of the password. Valid values are


"plain" (the password is stored as plain text)
"md5" (the password is stored as a hex-encoded MD5 hash)
"sha1" (the password is stored as a hex-encoded SHA-1 hash)
"sha256" (the password is stored as a hex-encoded SHA-256 hash)
"sha512" (the password is stored as a hex-encoded SHA-512 hash)
If this value is not set, the password type is assumed to be plain.

 

 

User Integration

 

Openfire는 사용자 data를 보유한 database에서 읽어 올 수 있다.

 

Optionally, Openfire can load user data from your custom database. If you enable user integration you must also enable authentication integration (see above). Use the following settings to enable user integration.

 

provider.user.className

-- set the value to org.jivesoftware.openfire.user.JDBCUserProvider.

jdbcUserProvider.loadUserSQL

-- the SQL statement to load the name and email address of a user (in that order) given a username. The SQL statement should contain a single "?" character, which will be dynamically replaced with a username when being executed.

jdbcUserProvider.userCountSQL

-- the SQL statement to load the total number of users in the database.

jdbcUserProvider.allUsersSQL

-- the SQL statement to load all usernames in the database.

jdbcUserProvider.searchSQL

-- the SQL statement fragment used to search your database for users. the statement should end with "WHERE" -- the username, name, and email fields will then be dynamically appended to the statement depending on the search. If this value is not set, searching will not be enabled.

 

usernameField

-- the name of the username database field, which will be used for searches.

nameField

-- the name of the name database field, which will be used for searches.

emailField

-- the name of the email database field, which will be used for searches.

 

 

 

Group Integration

 

Openfire는 그룹 데이타를 보유한 database에서 읽어 올 수 있다.

 

Openfire can load group data from your custom database. If you enable group integration you must also enable authentication integration; you'll also likely want to enable user integration (see above). Use the following settings to enable group integration.

 

provider.group.className

-- set the value to org.jivesoftware.openfire.group.JDBCGroupProvider.

jdbcGroupProvider.groupCountSQL

-- the SQL statement to load the total number of groups in the database.

jdbcGroupProvider.allGroupsSQL

-- the SQL statement to load all groups in the database.

jdbcGroupProvider.userGroupsSQL

-- the SQL statement to load all groups for a particular user. The SQL statement should contain a single "?" character, which will be dynamically replaced with a username when being executed.

jdbcGroupProvider.descriptionSQL

-- the SQL statement to load the description of a group. The SQL statement should contain a single "?" character, which will be dynamically replaced with a group name when being executed.

jdbcGroupProvider.loadMembersSQL

-- the SQL statement to load all members in a group. The SQL statement should contain a single "?" character, which will be dynamically replaced with a group name when being executed.

jdbcGroupProvider.loadAdminsSQL

-- the SQL statement to load all administrators in a group. The SQL statement should contain a single "?" character, which will be dynamically replaced with a group name when being executed.

 


실제로 수정된 내용이 Openfire AdminConsole에 반영된 결과




원문 : https://www.igniterealtime.org/builds/openfire/docs/latest/documentation/db-integration-guide.html


블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,