GRANT (Authentication)
Associates (or grants) an authentication record to one or more users or roles.
Syntax
GRANT AUTHENTICATION auth-method-name TO { Public | user_or_role | user_or_role1, user_or_role2, user_or_role3,... }
Parameters
auth_method_name |
Name of the authentication method you want to associate with one or more users or roles. Type:VARCHAR |
user_or_role, user_or_role1, user_or_role2, user_or_role3, ... |
Names of users or roles with whom you want to associate the authentication method. Type:VARCHAR. |
Privileges
Must have DBADMIN privileges.
Examples
This example uses a GRANT AUTHENTICATION statement to associate v_ldap
authentication with user jsmith
:
=> GRANT AUTHENTICATION v_ldap TO jsmith;
This example uses a GRANT AUTHENTICATION statement to associate v_gss
authentication to the role DBprogrammer
:
=> CREATE ROLE DBprogrammer;
=> GRANT AUTHENTICATION v_gss to DBprogrammer;
This example sets the default client authentication method to v_localpwd
:
=> GRANT AUTHENTICATION v_localpwd TO Public;