interaction.rst 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. .. _security_rolesystem_interaction:
  2. Interaction between user/group and role services
  3. ================================================
  4. The following section describes the interaction between the :ref:`security_rolesystem_usergroupservices` and the :ref:`security_rolesystem_roleservices`.
  5. Calculating the roles of a user
  6. -------------------------------
  7. The diagram below illustrates how a user/group service and a role service interact to calculate user roles.
  8. .. figure:: images/usergrouprole1.png
  9. :align: center
  10. *User/group and role service interacting for role calculation*
  11. On fetching an enabled user from a user/group service, the roles(s) assigned to that user must be identified. The identification procedure is:
  12. #. Fetch all enabled groups for the user. If a group is disabled, it is discarded.
  13. #. Fetch all roles associated with the user and add the roles to the result set.
  14. #. For each enabled group the user is a member of, fetch all roles associated with the group and add the roles to the result set.
  15. #. For each role in the result set, fetch all ancestor roles and add those roles to the result set.
  16. #. Personalize each role in the result set as required.
  17. #. If the result set contains the local admin role, add the role ``ROLE_ADMINISTRATOR``.
  18. #. If the result set contains the local group admin role, add the role ``ROLE_GROUP_ADMIN``.
  19. .. note::
  20. Role personalization looks for role parameters (key/value pairs) for each role and checks if the user properties (key/value pairs) contain an identical key. If any matches are found, the value of the role parameter is replaced by the value of the user property.
  21. Authentication of user credentials
  22. ----------------------------------
  23. A user/group service is primarily used during authentication. An authentication provider in the :ref:`security_auth_chain` may use a user/group service to authenticate user credentials.
  24. .. figure:: images/usergrouprole2.png
  25. :align: center
  26. *Using a a user/group service for authentication*
  27. GeoServer defaults
  28. ------------------
  29. The following diagram illustrates the default user/group service, role service, and authentication provider in GeoServer:
  30. .. figure:: images/usergrouprole3.png
  31. :align: center
  32. *Default GeoServer security configuration*
  33. Two authentication providers are configured—the *Root* provider and the *Username/password* provider. The *Root* provider authenticates for the GeoServer :ref:`security_root` and does not use a user/group service. The *Username/password* provider is the default provider and relays username and password credentials to a user/group service.
  34. A single user/group service, which persist the user database as XML, is present. The database contains a single user named ``admin`` and no groups. Similarly, the role service persists the role database as XML. By default, this contains a single role named ``ADMIN``, which is associated with the ``admin`` user. The ``ADMIN`` role is mapped to the ``ROLE_ADMINISTRATOR`` role and as a result, the ``admin`` user is associated with system administrator role during role calculation.