Allows creating new remote clusters without providing a password (#27864)

* Allows creating new remote clusters without providing a password

If the endpoint receives a request with no password, it will generate
one internally and return it in the response, so the frotend can show
it to the user.

* Use a random string instead of a UUID for the generated password

* Update function name to avoid CString reference and adds assertion

* Update server/channels/utils/textgeneration.go

Co-authored-by: Eva Sarafianou <eva.sarafianou@gmail.com>

* Extends the charset

---------

Co-authored-by: Eva Sarafianou <eva.sarafianou@gmail.com>
Этот коммит содержится в:
Miguel de la Cruz
2024-08-08 12:18:21 +02:00
коммит произвёл GitHub
родитель 06d8c857ea
Коммит eec9a4742a
5 изменённых файлов: 69 добавлений и 20 удалений

Просмотреть файл

@@ -81,7 +81,6 @@
type: object
required:
- name
- password
properties:
name:
type: string
@@ -89,7 +88,10 @@
type: string
password:
type: string
description: The password to use in the invite code.
description: |
The password to use in the invite code. If empty,
the server will generate one and it will be part
of the response
responses:
"201":
description: Remote cluster creation successful
@@ -103,6 +105,11 @@
invite:
type: string
description: The encrypted invite for the newly created remote cluster
password:
type: string
description: |
The password generated by the server if none was
sent on the create request
"401":
$ref: "#/components/responses/Unauthorized"
"403":