Piotr Królikowski
10/07/2025, 8:36 AMusername :
> ERROR 1064 (HY000): Getting analyzing error. Detail message: invalid user name: p.krolikowski@company.com.
So the problem is that I'm using email as principal_field and created username MUST be exactly the same as value returned in this property. But StarRocks has limitations when it comes to naming things (@ and . are not allowed in my case).
Everything works when I use google account ID, but this is not user friendly at all (one because It's not obvious how to get one and second having user 12958009845 in StarRocks is making admins life lot harder).
I see two solutions:
1. username can consist digits (0-9), letters (a-z or A-Z), underscores (_), dot (.), at (@)
2. be able to set "alias" name for user and add logic to compare this alias with principal_field coming from JWT -> as a bonus, this can be also used to map users between systems
(Yes I know, that best practice is not to use email as user unique property buy I'm solving this by having policy that email address can be assigned once and can't be changed.)