[MDEV-17940] Documentation does not indicate that X509 and SSL are exclusive options Created: 2018-12-08  Updated: 2018-12-27  Resolved: 2018-12-27

Status: Closed
Project: MariaDB Server
Component/s: Authentication and Privilege System, Documentation
Affects Version/s: N/A
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Ian Gilfillan
Resolution: Fixed Votes: 0
Labels: None


 Description   

Documentation for CREATE USER says that the statement can contain REQUIRE clause as

 [REQUIRE {NONE | tls_option [[AND] tls_option] ...}]

and tls_option is further specified as

tls_option:
  SSL 
  | X509
  | CIPHER 'cipher'
  | ISSUER 'issuer'
  | SUBJECT 'subject'

which suggests that any of them can be used as elements of a list. In practice, if X509 or SSL is used, it has to be the only option:

MariaDB [test]> CREATE USER x1 REQUIRE X509 AND ISSUER 'i';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND ISSUER 'i'' at line 1
 
MariaDB [test]> CREATE USER x2 REQUIRE X509 AND ISSUER 'i';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND ISSUER 'i'' at line 1
 
MariaDB [test]> CREATE USER x2 REQUIRE ISSUER 'i' AND SSL;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SSL' at line 1

Same is true for upstream 5.7 (manual vs server).
If the limitation is intentional, it should be documented accordingly.

Also, I don't know if it's obvious to users or not, but every other option can only be used once.



 Comments   
Comment by Ian Gilfillan [ 2018-12-27 ]

I have added these limitations to the description, without changing the syntax, which I think would make it overly complicated.

Generated at Thu Feb 08 08:40:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.