Cassandra DB plugin: Allow special chars in usernames (#11262)

This commit is contained in:
Michael Golowka 2021-04-16 14:01:15 -06:00 committed by GitHub
parent 684ebf0928
commit 771b963a04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

3
changelog/11262.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
secrets/database/cassandra: Updated default statement for password rotation to allow for special characters. This applies to root and static credentials.
```

View File

@ -17,7 +17,7 @@ import (
const (
defaultUserCreationCQL = `CREATE USER '{{username}}' WITH PASSWORD '{{password}}' NOSUPERUSER;`
defaultUserDeletionCQL = `DROP USER '{{username}}';`
defaultChangePasswordCQL = `ALTER USER {{username}} WITH PASSWORD '{{password}}';`
defaultChangePasswordCQL = `ALTER USER '{{username}}' WITH PASSWORD '{{password}}';`
cassandraTypeName = "cassandra"
defaultUserNameTemplate = `{{ printf "v_%s_%s_%s_%s" (.DisplayName | truncate 15) (.RoleName | truncate 15) (random 20) (unix_time) | truncate 100 | replace "-" "_" | lowercase }}`