get rid of ldap and oidc, refactor error handling
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -144,75 +144,11 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
&cli.StringFlag{
|
||||
Name: "spaces-webdav-base",
|
||||
Value: flags.OverrideDefaultString(cfg.Spaces.WebDavBase, "https://localhost:9200/dav/spaces/"),
|
||||
Usage: "spaces webdav base URL",
|
||||
Usage: "spaces webdav base URL to use when rendering drive WabDAV URLs",
|
||||
EnvVars: []string{"GRAPH_SPACES_WEBDAV_BASE"},
|
||||
Destination: &cfg.Spaces.WebDavBase,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-network",
|
||||
Value: flags.OverrideDefaultString(cfg.Ldap.Network, "tcp"),
|
||||
Usage: "Network protocol to use to connect to the Ldap server",
|
||||
EnvVars: []string{"GRAPH_LDAP_NETWORK"},
|
||||
Destination: &cfg.Ldap.Network,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-address",
|
||||
Value: flags.OverrideDefaultString(cfg.Ldap.Address, "0.0.0.0:9125"),
|
||||
Usage: "Address to connect to the Ldap server",
|
||||
EnvVars: []string{"GRAPH_LDAP_ADDRESS"},
|
||||
Destination: &cfg.Ldap.Address,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-username",
|
||||
Value: flags.OverrideDefaultString(cfg.Ldap.UserName, "cn=admin,dc=example,dc=org"),
|
||||
Usage: "User to bind to the Ldap server",
|
||||
EnvVars: []string{"GRAPH_LDAP_USERNAME"},
|
||||
Destination: &cfg.Ldap.UserName,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-password",
|
||||
Value: flags.OverrideDefaultString(cfg.Ldap.Password, "admin"),
|
||||
Usage: "Password to bind to the Ldap server",
|
||||
EnvVars: []string{"GRAPH_LDAP_PASSWORD"},
|
||||
Destination: &cfg.Ldap.Password,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-basedn-users",
|
||||
Value: flags.OverrideDefaultString(cfg.Ldap.BaseDNUsers, "ou=users,dc=example,dc=org"),
|
||||
Usage: "BaseDN to look for users",
|
||||
EnvVars: []string{"GRAPH_LDAP_BASEDN_USERS"},
|
||||
Destination: &cfg.Ldap.BaseDNUsers,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-basedn-groups",
|
||||
Value: flags.OverrideDefaultString(cfg.Ldap.BaseDNGroups, "ou=groups,dc=example,dc=org"),
|
||||
Usage: "BaseDN to look for users",
|
||||
EnvVars: []string{"GRAPH_LDAP_BASEDN_GROUPS"},
|
||||
Destination: &cfg.Ldap.BaseDNGroups,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "oidc-endpoint",
|
||||
Value: flags.OverrideDefaultString(cfg.OpenIDConnect.Endpoint, "https://localhost:9200"),
|
||||
Usage: "OpenIDConnect endpoint",
|
||||
EnvVars: []string{"GRAPH_OIDC_ENDPOINT", "OCIS_URL"},
|
||||
Destination: &cfg.OpenIDConnect.Endpoint,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "oidc-insecure",
|
||||
Usage: "OpenIDConnect endpoint",
|
||||
EnvVars: []string{"GRAPH_OIDC_INSECURE"},
|
||||
Destination: &cfg.OpenIDConnect.Insecure,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "oidc-realm",
|
||||
Value: flags.OverrideDefaultString(cfg.OpenIDConnect.Realm, ""),
|
||||
Usage: "OpenIDConnect realm",
|
||||
EnvVars: []string{"GRAPH_OIDC_REALM"},
|
||||
Destination: &cfg.OpenIDConnect.Realm,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "jwt-secret",
|
||||
Value: flags.OverrideDefaultString(cfg.TokenManager.JWTSecret, "Pive-Fumkiu4"),
|
||||
@@ -227,13 +163,6 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_GATEWAY_ADDR"},
|
||||
Destination: &cfg.Reva.Address,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "webdav-namespace",
|
||||
Value: flags.OverrideDefaultString(cfg.WebdavNamespace, "/home"),
|
||||
Usage: "Namespace prefix for the webdav endpoint",
|
||||
EnvVars: []string{"STORAGE_WEBDAV_NAMESPACE"},
|
||||
Destination: &cfg.WebdavNamespace,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "extensions",
|
||||
Usage: "Run specific extensions during supervised mode. This flag is set by the runtime",
|
||||
|
||||
Reference in New Issue
Block a user