kairos/pkg/config/schemas/users_schema.go
Itxaka 999e1df7c3
🐛 Schema for groups is not working (#1077)
Looks like the schema for the user thinks groups is a string, while checking the code it seems to be more a list of strings and that matches with the yip library and how it parses the groups.

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-03-10 14:21:26 +01:00

12 lines
756 B
Go

package config
// UserSchema represents the users block in the Kairos configuration. It allows the creation of users in the system.
type UserSchema struct {
_ struct{} `title:"Kairos Schema: Users block" description:"The users block allows you to create users in the system."`
Name string `json:"name,omitempty" pattern:"([a-z_][a-z0-9_]{0,30})" required:"true" example:"kairos"`
Passwd string `json:"passwd,omitempty" example:"kairos"`
LockPasswd bool `json:"lockPasswd,omitempty" example:"true"`
Groups []string `json:"groups,omitempty" example:"admin"`
SSHAuthorizedKeys []string `json:"ssh_authorized_keys,omitempty" examples:"[\"github:USERNAME\",\"ssh-ed25519 AAAF00BA5\"]"`
}