Fixed style issues.

This commit is contained in:
marco-vb 2024-09-03 09:37:03 +00:00
parent 547276780c
commit 919f51533a
4 changed files with 8 additions and 3 deletions

View File

@ -248,7 +248,7 @@ bool Authentication::areCredentialsValid(
return true;
// Wildcard support (1 only)
if (subject.contains('*'))
if (subject.contains('*'))
{
auto prefix = std::string_view(subject).substr(0, subject.find('*'));
auto suffix = std::string_view(subject).substr(subject.find('*') + 1);

View File

View File

@ -370,14 +370,19 @@ def test_x509_san_support():
== "CREATE USER jemma IDENTIFIED WITH ssl_certificate SAN \\'URI:spiffe://foo.com/bar\\', \\'URI:spiffe://foo.com/baz\\'\n"
)
def test_x509_san_wildcard_support():
assert (
execute_query_native(instance, "SELECT currentUser()", user="stewie", cert_name="client5")
execute_query_native(
instance, "SELECT currentUser()", user="stewie", cert_name="client5"
)
== "stewie\n"
)
assert (
instance.query("SELECT name, auth_type, auth_params FROM system.users WHERE name='stewie'")
instance.query(
"SELECT name, auth_type, auth_params FROM system.users WHERE name='stewie'"
)
== 'stewie\tssl_certificate\t{"subject_alt_names":["URI:spiffe:\\\\/\\\\/bar.com\\\\/foo\\\\/*\\\\/far"]}\n'
)