Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli, sql, ui: allow all-numeric usernames #42155

Closed
rolandcrosby opened this issue Nov 4, 2019 · 0 comments · Fixed by #42464
Closed

cli, sql, ui: allow all-numeric usernames #42155

rolandcrosby opened this issue Nov 4, 2019 · 0 comments · Fixed by #42464
Labels
A-security A-webui-security C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) good first issue

Comments

@rolandcrosby
Copy link

Is your feature request related to a problem? Please describe.
A company evaluating CockroachDB for enterprise deployment ran into an issue in setting up GSSAPI with their Active Directory environment. The company uses numeric employee IDs as Active Directory usernames. CockroachDB requires usernames to start with a letter or underscore, so the company's usernames cannot be mapped to CockroachDB users.

Describe the solution you'd like
The username validation rules should be relaxed to allow all-numeric usernames.

Describe alternatives you've considered
We could also solve this problem by adding more sophisticated functionality for mapping GSSAPI users to CockroachDB users, like Postgres's map functionality, but that would take much more work.

Additional context
Postgres allows numeric usernames:

postgres=# create user "12345";
CREATE ROLE
postgres=# \du
                                   List of roles
 Role name |                         Attributes                         | Member of
-----------+------------------------------------------------------------+-----------
 12345     |                                                            | {}
 roland    | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
postgres=# select version();
                                                     version
-----------------------------------------------------------------------------------------------------------------
 PostgreSQL 11.4 on x86_64-apple-darwin18.6.0, compiled by Apple LLVM version 10.0.1 (clang-1001.0.46.4), 64-bit
(1 row)
@knz knz added A-security C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) labels Nov 4, 2019
@knz knz changed the title Allow all-numeric usernames cli, sql, ui: allow all-numeric usernames Nov 4, 2019
georgebuckerfield added a commit to georgebuckerfield/cockroach that referenced this issue Nov 13, 2019
Allows CockroachDB usernames to start with digits.

Fixes cockroachdb#42155.
@craig craig bot closed this as completed in 907540d Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-security A-webui-security C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants