diff --git a/documentation/implementing-authprovider-guide.html b/documentation/implementing-authprovider-guide.html new file mode 100644 index 0000000000..9e3ffbfa39 --- /dev/null +++ b/documentation/implementing-authprovider-guide.html @@ -0,0 +1,185 @@ + + + + Openfire: Custom Authentication Provider Guide + + + + +
+ +
+ Openfire Logo +

Custom Authentication Provider Guide

+
+ + + +
+ +

Introduction

+ +

+ This document provides instructions on how to implement an integration between Openfire and an external + system that provides authentication functionality. +

+

+ This integration requires some Java knowledge in order to implement a custom authentication provider + for Openfire. The skill needed will vary depending on what you are trying to achieve. +

+ +

Topics that are covered in this document:

+ + + +
+ +
+ +

Background

+ +

+ Under standard configuration, Openfire maintains authentication data in its own database tables. Various + alternatives to this are offered that allow you to use Active Directory or LDAP for authentication + or integrating authentication with your custom database tables. +

+

+ If you're interested in integrating with a system that is not compatible with the standard integration + options that are provided by Openfire, then you can implement a custom integration. This guide will help you + get started! +

+

+ It is good to realize that the provider architecture that is used in this guide is never used by end-user + clients directly. Instead, the implementation that you will create based on this guide is used by the + Openfire service itself. This service will use it to process client authentication requests (which typically + use a SASL mechanism). The implementation of custom SASL mechanisms is out of scope of for this guide). +

+ +
+ +
+ +

The AuthProvider extension point

+ +

+ Openfire's API defines the AuthProvider + interface, which is the extension point to use when implementing custom authentication functionality. +

+

+ The default implementation of this provider is the DefaultAuthProvider, which as the name + suggests is the version of this provider Openfire will use if not overridden. It authenticates against the + ofUser database table and supports plain text and digest authentication. +

+

+ The steps to get Openfire using a custom AuthProvider are described below. +

+
    +
  1. + Write a class that implements AuthProvider, providing your own business logic. +
  2. +
  3. + Make the class available in a jar and make this available to Openfire by placing it in the lib directory. + There are numerous ways to package a jar with this class inside it, popular build systems such as Gradle and Maven + can make your life easier. +
  4. +
  5. + Set the property provider.auth.className to be the full name of your class, e.g. + org.example.auth.MyAuthProvider. You can easily do this by defining such a property in the + conf/openfire.xml configuration file, as shown below. +
    + Example openfire.xml configuration snippet +
    <provider>
    +    <auth>
    +        <className>org.example.auth.MyAuthProvider</className>
    +    </auth>
    +</provider>
    +
    +
  6. +
  7. + Restart Openfire. Your custom class should now be handling authentication. +
  8. +
+

+ It is worth noting that the AuthProvider interface defines an interface that can be used to + both read data from, but also write data back to the system that is being integrated with. If the system + that you're integrating with can not or must not have its user definitions changed, you can implement your + provider as being 'read-only'. +

+

+ To mark your provider as being read-only, implement the isReadOnly() method to return the value + true. All methods that would cause a change of data won't be invoked by Openfire if you do so. + These methods should receive an implementation that throws java.lang.UnsupportedOperationException. +

+

+ A similar approach (throwing java.lang.UnsupportedOperationException) can be used to prevent + implementing optional functionality, such as the support for hash/digest-based credentials. +

+ +
+ +
+ +

Frequently Asked Questions

+ +

Do I have to compile my custom class into the Openfire jar?

+

+ No, the class only needs to be visible on the Openfire classpath. +

+ +

How do I ensure my custom class is visible on the Openfire classpath?

+

+ Just place your new custom library in the Openfire lib directory, this will ensure it is automatically + available at startup. +

+ +

Can I see some examples?

+

+ Openfire's own authentication mechanism makes use of the AuthProvider API! If you want to get + some inspiration, you can have a look at the implementations of this interface that are part of Openfire, + such as the ones below. +

+ +

+ Note that these providers are but a sample of the available providers. Discover more providers by using your + IDE to find implementations of the interface! +

+ +

Will I have a degradation in performance using a custom AuthProvider?

+

+ It completely depends on your implementation. As with any Openfire customisation or plugin, badly written + code has the potential to cause Openfire to perform slower. Use performance testing tools such as Tsung to + ensure issues haven't been introduced. +

+ +

How can I have my custom class connect to another DB/Web service/NoSQL store etc?

+

+ This is out of the scope of this documentation and is your choice as a developer. If you are looking to + externalize properties like connection details, the Openfire properties mechanism and the JiveGlobals class + are good places to start investigating. +

+ +
+ + + +
+ + + diff --git a/documentation/implementing-groupprovider-guide.html b/documentation/implementing-groupprovider-guide.html new file mode 100644 index 0000000000..301b4282f1 --- /dev/null +++ b/documentation/implementing-groupprovider-guide.html @@ -0,0 +1,192 @@ + + + + Openfire: Custom Group Provider Guide + + + + +
+ +
+ Openfire Logo +

Custom Group Provider Guide

+
+ + + +
+ +

Introduction

+ +

+ This is a guide for developers that wish to integrate Openfire with their own group system. +

+ + + +

+ This integration requires some Java knowledge in order to implement a custom group provider + for Openfire. The skill needed will vary depending on what you are trying to achieve. +

+ +

Topics that are covered in this document:

+ + + +
+ +
+ +

Background

+ +

+ Under standard configuration, Openfire maintains group data in its own database tables. Various + alternatives to this are offered that allow you to use groups defined in Active Directory or LDAP + or obtaining groups from custom database tables. +

+

+ If you're interested in integrating with a system that is not compatible with the standard integration + options that are provided by Openfire, then you can implement a custom integration. This guide will help you + get started! +

+ +
+ +
+ +

The GroupProvider extension point

+ +

+ Openfire's API defines the GroupProvider + interface, which is the extension point to use when implementing custom group functionality. It is noteworthy + that many implementations choose to inherit from + AbstractGroupProvider. This + abstract class provides common functionality typically used by implementations. You are, of course, free to + write your own implementation that does not extend on AbstractGroupProvider! +

+

+ The default implementation of this provider is the DefaultGroupProvider, which as the name + suggests is the version of this provider Openfire will use if not overridden. It uses the + ofGroup, ofGroupUser and ofGroupProp database tables. +

+

+ The steps to get Openfire using a custom GroupProvider are described below. +

+
    +
  1. + Write a class that implements GroupProvider, providing your own business logic. +
  2. +
  3. + Make the class available in a jar and make this available to Openfire by placing it in the lib directory. + There are numerous ways to package a jar with this class inside it, popular build systems such as Gradle and Maven + can make your life easier. +
  4. +
  5. + Set the property provider.group.className to be the full name of your class, e.g. + org.example.CustomGroupProvider. You can easily do this by defining such a property in the + conf/openfire.xml configuration file, as shown below. +
    + Example openfire.xml configuration snippet +
    <provider>
    +    <group>
    +        <className>org.example.CustomGroupProvider</className>
    +    </group>
    +</provider>
    +
    +
  6. +
  7. + Restart Openfire. Your custom class should now be providing user groups to Openfire. +
  8. +
+

+ It is worth noting that the GroupProvider interface defines an interface that can be used to + both read data from, but also write data back to the system that is being integrated with. If the system + that you're integrating with can not or must not have its user definitions changed, you can implement your + provider as being 'read-only'. +

+

+ To mark your provider as being read-only, implement the isReadOnly() method to return the value + true. All methods that would cause a change of data won't be invoked by Openfire if you do so. + These methods should receive an implementation that throws java.lang.UnsupportedOperationException. +

+

+ A similar approach (throwing java.lang.UnsupportedOperationException) can be used to prevent + implementing optional functionality, such as the support group properties. +

+ + +
+ +
+ +

Frequently Asked Questions

+ +

Do I have to compile my custom class into the Openfire jar?

+

+ No, the class only needs to be visible on the Openfire classpath. +

+ +

How do I ensure my custom class is visible on the Openfire classpath?

+

+ Just place your new custom library in the Openfire lib directory, this will ensure it is automatically + available at startup. +

+ +

Can I see some examples?

+

+ Openfire's own group functionality makes use of the GroupProvider API! If you want to get + some inspiration, you can have a look at the implementations of this interface that are part of Openfire, + such as the ones below. +

+ +

+ Note that these providers are but a sample of the available providers. Discover more providers by using your + IDE to find implementations of the interface! +

+ +

Will I have a degradation in performance using a custom GroupProvider?

+

+ It completely depends on your implementation. As with any Openfire customisation or plugin, badly written + code has the potential to cause Openfire to perform slower. Use performance testing tools such as Tsung to + ensure issues haven't been introduced. +

+ +

How can I have my custom class connect to another DB/Web service/NoSQL store etc?

+

+ This is out of the scope of this documentation and is your choice as a developer. If you are looking to + externalize properties like connection details, the Openfire properties mechanism and the JiveGlobals class + are good places to start investigating. +

+ +
+ + + +
+ + + diff --git a/documentation/implementing-userprovider-guide.html b/documentation/implementing-userprovider-guide.html new file mode 100644 index 0000000000..f10546f59e --- /dev/null +++ b/documentation/implementing-userprovider-guide.html @@ -0,0 +1,184 @@ + + + + Openfire: Custom User Provider Guide + + + + +
+ +
+ Openfire Logo +

Custom User Provider Guide

+
+ + + +
+ +

Introduction

+ +

+ This is a guide for developers that wish to integrate Openfire with an external system that provides user + definitions. +

+

+ Beware that this integration can be used to provision Openfire with user data, but critically, does not + implement authentication. For that, please refer to the + Custom Authentication Provider Guide. +

+

+ This integration requires some Java knowledge in order to implement a custom user provider + for Openfire. The skill needed will vary depending on what you are trying to achieve. +

+ +

Topics that are covered in this document:

+ + + +
+ +
+ +

Background

+ +

+ Under standard configuration, Openfire maintains user data in its own database tables. Various + alternatives to this are offered that allow you to use users defined in Active Directory or LDAP + or obtaining users from custom database tables. +

+

+ If you're interested in integrating with a system that is not compatible with the standard integration + options that are provided by Openfire, then you can implement a custom integration. This guide will help you + get started! +

+ +
+ +
+ +

The UserProvider extension point

+ +

+ Openfire's API defines the UserProvider + interface, which is the extension point to use when implementing custom user functionality. +

+

+ The default implementation of this provider is the DefaultUserProvider, which as the name + suggests is the version of this provider Openfire will use if not overridden. It uses the + ofUser, ofUserFlag and ofUserProp database tables. +

+

+ The steps to get Openfire using a custom UserProvider are described below. +

+
    +
  1. + Write a class that implements UserProvider, providing your own business logic. +
  2. +
  3. + Make the class available in a jar and make this available to Openfire by placing it in the lib directory. + There are numerous ways to package a jar with this class inside it, popular build systems such as Gradle and Maven + can make your life easier. +
  4. +
  5. + Set the property provider.user.className to be the full name of your class, e.g. + org.example.user.FooUserProvider. You can easily do this by defining such a property in the + conf/openfire.xml configuration file, as shown below. +
    + Example openfire.xml configuration snippet +
    <provider>
    +    <user>
    +        <className>org.example.user.FooUserProvider</className>
    +    </user>
    +</provider>
    +
    +
  6. +
  7. + Restart Openfire. Your custom class should now be providing users to Openfire. +
  8. +
+

+ It is worth noting that the UserProvider interface defines an interface that can be used to + both read data from, but also write data back to the system that is being integrated with. If the system + that you're integrating with can not or must not have its user definitions changed, you can implement your + provider as being 'read-only'. +

+

+ To mark your provider as being read-only, implement the isReadOnly() method to return the value + true. All methods that would cause a change of data won't be invoked by Openfire if you do so. + These methods should receive an implementation that throws java.lang.UnsupportedOperationException. +

+

+ A similar approach (throwing java.lang.UnsupportedOperationException) can be used to prevent + implementing optional functionality, such as the support for search functionality. +

+ +
+ +
+ +

Frequently Asked Questions

+ +

Do I have to compile my custom class into the Openfire jar?

+

+ No, the class only needs to be visible on the Openfire classpath. +

+ +

How do I ensure my custom class is visible on the Openfire classpath?

+

+ Just place your new custom library in the Openfire lib directory, this will ensure it is automatically + available at startup. +

+ +

Can I see some examples?

+

+ Openfire's own user functionality makes use of the UserProvider API! If you want to get + some inspiration, you can have a look at the implementations of this interface that are part of Openfire, + such as the ones below. +

+ +

+ Note that these providers are but a sample of the available providers. Discover more providers by using your + IDE to find implementations of the interface! +

+ +

Will I have a degradation in performance using a custom UserProvider?

+

+ It completely depends on your implementation. As with any Openfire customisation or plugin, badly written + code has the potential to cause Openfire to perform slower. Use performance testing tools such as Tsung to + ensure issues haven't been introduced. +

+ +

How can I have my custom class connect to another DB/Web service/NoSQL store etc?

+

+ This is out of the scope of this documentation and is your choice as a developer. If you are looking to + externalize properties like connection details, the Openfire properties mechanism and the JiveGlobals class + are good places to start investigating. +

+ +
+ + + +
+ + + diff --git a/documentation/index.html b/documentation/index.html index 513aa2c86d..6c742e6619 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -71,14 +71,11 @@

Advanced Server Administration

Integration with External Data Sources

-
LDAP Guide
-
A guide to setting up Openfire to work with LDAP user stores.
+
Active Directory and LDAP Integration Guide
+
A guide to setting up Openfire to work with Active Directory or LDAP user stores.
Custom Database Integration Guide
A guide to integrating Openfire authentication, user, and group data with a custom database.
- -
Pluggable Roster Support Guide
-
A guide to integrating Openfire rosters with an alternate store.
@@ -87,7 +84,7 @@

Integration with External Data Sources

Developer Documentation

-

Basic Development Guides

+

Generic Development Guides

Building the Source
@@ -99,25 +96,37 @@

Basic Development Guides

Plugin Developer Guide
A guide to writing and installing plugins for Openfire.
+
Translator Guide
+
Information for those interested in translating the admin console of Openfire into other languages.
+ +
Customization Guide
+
Instructions on customization support within the build process for Openfire.
+
Tips & tricks for working with Openfire
Some collected tools, tips and useful links.
-

Advanced Development Guides

+

Data Provider / IAM Implementation Guides

-
Translator Guide
-
Information for those interested in translating the admin console of Openfire into other languages.
+
Custom Authentication Provider Guide
+
Describes how to integrate Openfire with an external authentication system.
-
Customization Guide
-
Instructions on customization support within the build process for Openfire.
+
Custom Group Provider Guide
+
Describes how to integrate Openfire with an external system that provides Group definitions.
+ +
Custom User Provider Guide
+
Describes how to integrate Openfire with an external system that provides User definitions
+ +
Pluggable Roster Support Guide
+
A guide to integrating Openfire rosters with an alternate store.

Reference Documentation

JavaDocs
-
Openfire API documentation. +
Openfire API documentation.
Protocol Support
Provides details on the XMPP support and XEPs that Openfire implements.
diff --git a/documentation/ldap-guide.html b/documentation/ldap-guide.html index 7615ffd93c..a842c1929d 100644 --- a/documentation/ldap-guide.html +++ b/documentation/ldap-guide.html @@ -1,7 +1,7 @@ - Openfire: LDAP Guide + Openfire: Active Directory and LDAP Integration Guide @@ -10,7 +10,7 @@
Openfire Logo -

LDAP Guide

+

Active Directory and LDAP Integration Guide