Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 3

...

  • User stores: user store is the database where information about the users and user roles is stored, including login name, password, first name, last name, and email address.
  • RDBMS (for Authentication and Authorization): This RDBMS stores information about the role-based permissions. 

    Info

    According to the default configuration in WSO2 products, the embedded H2 RDBMS that is shipped with the product is used as the user store as well as the RDBMS for storing information related to permissions. 

  • Realm configuration: The user realm consists of the configurations required to initialise the user realm. The user-mgt.xml file stored in the <WSO2_OB_INSTANCEKM_HOME>/repository/conf/ and <WSO2_OB_APIM_HOME>/repository/conf/ directory  directories is used as the realm configuration XML. This includes setting up the User Store Manager, the Authorization Manager and the System Administrator. These configurations are explained below. 

    User Store Manager

    The User Store Manager is responsible for managing the underlying user store. It is represented by the UserStoreManager Java interface. There can be different User Store Manager implementations to connect with different user stores, but you can configure only one User Store Manager implementation in a single user realm (that is, a single WSO2 Carbon instance). The User Store Manager can be operated in both read/write mode and read-only mode. In read-only mode, you can only connect with an existing user store. WSO2 products provide the following default User Store Manager implementations:

    • JDBCUserStoreManager (read and write)
    • LDAPUserStoreManager (read-only)
    • ApacheDSUserStoreManager (read and write)

    You can write a custom user store manager implementation by implementing UserStoreManager or by extending AbstractUserStoreManager or one of the default implementations.

    Using JDBCUserStoreManager

    The JDBCUserStoreManager class uses a schema that is specific to WSO2 Carbon. It contains the following tables:

    • UM_USER: Contains user names and passwords
    • UM_ROLE: Contains role names
    • UM_USER_ROLE: Contains user role mappings
    • UM_USER_ATTRIBUTE: Contains user attributes. There can be any attribute ID and a value for that attribute ID that is associated with a user’s profile.

    You can find the full schema of these tables from the database script files in the <WSO2_OB_INSTANCEKM_HOME>/dbscripts directory and <WSO2_OB_APIM_HOME>/dbscripts directories. Note that these scripts also contain schemas for other tables that are used for user management and registry functions. If your organization contains an existing JDBC user store that you want to use with a WSO2 product, you must extend JDBCUserStoreManager and write a new implementation for your user store according to your schema.

    Authorization ManagerThe Authorization Manager uses role-based access control (RBAC) to protect resources related to the WSO2 Carbon platform. The default implementation of the Authorization Manager is JDBCAuthorizationManager, which uses a permission model specific to WSO2 Carbon and uses the authorization data that is stored in tables in the JDBC database. You can replace this implementation with a custom implementation (for example, if you want to use a XACML authorization manager) and use it with WSO2 products.
    System AdministratorThe system admin user is typically the super tenant user, who by default has permission to perform all administration tasks in the server. The admin user will thereby create other tenant users and define roles with permissions. Once this is done, the other tenant users will be able to log in to their respective tenant domains and use the server according to the permissions that have been granted. Note that the permissions granted to the Super Tenant user cannot be modified. 

...