When working with both user authentication and user authorization, you need to understand how user names are treated by each system.
User names in the GemFire XD system are known as authorization identifiers. The authorization identifier is a string that represents the name of the user, if one was provided in the connection request. For example, the built-in function CURRENT_USER returns the authorization identifier for the current user.
After the authorization identifier is passed to the GemFire XD system, it becomes an SQL92Identifier. A SQL92Identifier is a kind of identifier that represents a database object such as a table or column. A SQL92Identifier is case-insensitive (it is converted to all caps) unless it is delimited with double quotes. A SQL92Identifier is limited to 128 characters, and has other limitations.
All user names must be valid authorization identifiers even if user authentication is turned off, and even if all users are allowed access to all databases.
For more information about SQL92Identifiers, see Keywords and Identifiers.
If an external authentication system is used, GemFire XD does not convert a user's name to an authorization identifier until after authentication has occurred (but before the user is authorized). For example, with an example user named Fred:
connect client 'localhost:1527;user=FRed;password=flintstone';
Also consider a second example, where Fred has a slightly different name within the user authentication system:
connect client 'localhost:1527;user="Fred!";password=flintstone';
As shown in the first example, the external authentication system may be case-sensitive, whereas the authorization identifier within GemFire XD may not be. If your authentication system allows two distinct users whose names differ by case, delimit all user names within the connection request to make all user names case-sensitive within the GemFire XD system. In addition, you must also delimit user names that do not conform to SQL92Identifier rules with double quotes.
The authenticated system user that starts up a GemFire XD member is the owner of that member JVM. The term JVM owner refers to the authorization identifier of the user who booted the member. The JVM owner owns any schemas and database objects that they create in the distributed system. The owner also owns any schemas and database objects in the JVM that were created by other JVM owners. In other words, GemFire XD treats all JVM owners interchangeably when a GemFire XD member is booted.
The JVM owner has automatic SQL level permissions when SQL authorization is enabled, and can grant access to any database objects using the GRANT command. See Configuring User Authorization for more information.
If you enable or plan to enable SQL authorization, then controlling the identity of the JVM owner becomes important. The owner of a GemFire XD member cannot be changed after the JVM is started. However, member ownership can be changed by stopping the member process and then restarting it using the credentials of another user.