Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-14335

Merge APIs of IgniteAuthenticationProcessor and IgniteSecurity

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.11
    • None
    • None
    • Added support of alter/drop/create user SQL commands for security plugins.
    • Release Notes Required

    Description

      It is proposed:

      1. Remove an IgniteAuthenticationProcessor that is now treated as an independent processor.
      2.  Move the logic of IgniteAuthenticationProcessor into the implementation of the security plugin that will be used if authentication is enabled via configuration.
      3. Remove duplication of security checks and leave IgniteSecurity as a single security API. As of now, authentication operations are not delegated to IgniteAuthenticationProcessor if a security plugin is specified. So the overall security behavior from the user side will remain intact.
      4. Remove the AuthorizationContext completely as IgniteSecurity provides an API for storing and managing the security contexts.
      5. Extend GridSecurityPlugin interface with methods that provide the ability to manage security users to support existing commands available for authentication processor - alter/drop/create through SQL and REST.

      As a result, we will make the security-related code more consistent and simpler.
      Proposed signatures of GridSecurityPlugin methods that provide the ability to manage security users:

      public void createUser(String login, UserOptions opts) throws IgniteCheckedException 
      public void alterUser(String login, UserOptions opts) throws IgniteCheckedException
      public void dropUser(String login) throws IgniteCheckedException

      The UserOptions class is a wrapper over EnumMap that maps option values ​​to their aliases. This allows the class to be used for both create and alter user operations and doesn't break backward compatibility in case new options are declared.

      The proposed changes lead to the following compatibility issues:
      1. When a user provides a security plugin and enables native authentication - in this case, the user will face exceptions during the node start while now node starts smoothly. This case makes a little sense because now authentication operations are not delegated to IgniteAuthenticationProcessor at all if a security plugin is specified.

      2. The current implementation of IgniteAuthenticationProcessor can enable authentication itself if the current node connects to the cluster with authentication enabled - this functionality will not be supported. The user can easily overcome this by explicitly enabling authentication in the configuration on all nodes.3. The error message of some mutually exclusive events can be changed.

      The remaining implementation of the IgniteAuthenticationProcessor and its general behavior will remain intact. I also propose to keep the current callbacks for the IgniteAuthenticationProcessor (e.g. IgniteAuthenticationProcessor#cacheProcessorStarted) that are called from other managers intact, just skip these calls if the IgniteAuthenticationProcessor is not being used for security.

      Attachments

        Issue Links

          Activity

            People

              PetrovMikhail Mikhail Petrov
              PetrovMikhail Mikhail Petrov
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 6h 40m
                  6h 40m