- let ocis init generate jwt token for collaboration service

- separate REVA jwt secret from WOPI jwt secret
- fix gatway service name configuration
This commit is contained in:
Willy Kloucek
2024-05-14 14:55:37 +02:00
committed by Jörn Friedrich Dreyer
parent 7b47d55837
commit 901a5e27fc
5 changed files with 15 additions and 6 deletions
+12
View File
@@ -156,6 +156,10 @@ type Clientlog struct {
ServiceAccount ServiceAccount `yaml:"service_account"`
}
type Collaboration struct {
JWTSecret string `yaml:"jwt_secret"`
}
type Nats struct {
// The nats config has a field called nats
Nats struct {
@@ -191,6 +195,7 @@ type OcisConfig struct {
Graph GraphService
Idp LdapBasedService
Idm IdmService
Collaboration Collaboration
Proxy ProxyService
Frontend FrontendService
AuthBasic AuthbasicService `yaml:"auth_basic"`
@@ -289,6 +294,10 @@ func CreateConfig(insecure, forceOverwrite bool, configPath, adminPassword strin
if err != nil {
return fmt.Errorf("could not generate random password for tokenmanager: %s", err)
}
collaborationJwtSecret, err := generators.GenerateRandomPassword(passwordLength)
if err != nil {
return fmt.Errorf("could not generate random password for collaboration service: %s", err)
}
machineAuthAPIKey, err := generators.GenerateRandomPassword(passwordLength)
if err != nil {
return fmt.Errorf("could not generate random password for machineauthsecret: %s", err)
@@ -344,6 +353,9 @@ func CreateConfig(insecure, forceOverwrite bool, configPath, adminPassword strin
},
},
},
Collaboration: Collaboration{
JWTSecret: collaborationJwtSecret,
},
Groups: UsersAndGroupsService{
Drivers: LdapBasedService{
Ldap: LdapSettings{