update reva (#113)
* new ocis config Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * Change default settings to be able to run ocis server without any configuration - Konnectd uses no TLS as it is behind the proxy. - Glauth generates dev-certificates for ldap on startup if none is provided. - Glauth can launch unencrypted (9125) and encrypted (9126) port in parallel Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * allow configuring user sharing driver, default to json Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * update reva Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * switch to preferred_username as opaqueid Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * update drone config to override new defaults to match test environment Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * use latest reva Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * typo * use updatet api tests Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * core tests got merged already Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix changelog Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -86,7 +86,7 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "users-driver",
|
||||
Value: "demo",
|
||||
Value: "ldap",
|
||||
Usage: "user driver: 'demo', 'json' or 'ldap'",
|
||||
EnvVars: []string{"REVA_USERS_DRIVER"},
|
||||
Destination: &cfg.Reva.Users.Driver,
|
||||
@@ -110,14 +110,14 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: "ldap-port",
|
||||
Value: 636,
|
||||
Value: 9126,
|
||||
Usage: "LDAP port",
|
||||
EnvVars: []string{"REVA_LDAP_PORT"},
|
||||
Destination: &cfg.Reva.LDAP.Port,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-base-dn",
|
||||
Value: "dc=owncloud,dc=com",
|
||||
Value: "dc=example,dc=org",
|
||||
Usage: "LDAP basedn",
|
||||
EnvVars: []string{"REVA_LDAP_BASE_DN"},
|
||||
Destination: &cfg.Reva.LDAP.BaseDN,
|
||||
@@ -138,14 +138,14 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-bind-dn",
|
||||
Value: "cn=admin,dc=owncloud,dc=com",
|
||||
Value: "cn=reva,ou=sysusers,dc=example,dc=org",
|
||||
Usage: "LDAP bind dn",
|
||||
EnvVars: []string{"REVA_LDAP_BIND_DN"},
|
||||
Destination: &cfg.Reva.LDAP.BindDN,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-bind-password",
|
||||
Value: "admin",
|
||||
Value: "reva",
|
||||
Usage: "LDAP bind password",
|
||||
EnvVars: []string{"REVA_LDAP_BIND_PASSWORD"},
|
||||
Destination: &cfg.Reva.LDAP.BindPassword,
|
||||
@@ -162,12 +162,12 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Name: "ldap-schema-mail",
|
||||
Value: "mail",
|
||||
Usage: "LDAP schema mail",
|
||||
EnvVars: []string{"REVA_LDAP_SCHEMA_Mail"},
|
||||
EnvVars: []string{"REVA_LDAP_SCHEMA_MAIL"},
|
||||
Destination: &cfg.Reva.LDAP.Schema.Mail,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-schema-displayName",
|
||||
Value: "displayName",
|
||||
Value: "sn",
|
||||
Usage: "LDAP schema displayName",
|
||||
EnvVars: []string{"REVA_LDAP_SCHEMA_DISPLAYNAME"},
|
||||
Destination: &cfg.Reva.LDAP.Schema.DisplayName,
|
||||
|
||||
@@ -86,7 +86,7 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "oidc-issuer",
|
||||
Value: "https://localhost:9130",
|
||||
Value: "https://localhost:9200",
|
||||
Usage: "OIDC issuer",
|
||||
EnvVars: []string{"REVA_OIDC_ISSUER"},
|
||||
Destination: &cfg.Reva.OIDC.Issuer,
|
||||
@@ -99,8 +99,14 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Destination: &cfg.Reva.OIDC.Insecure,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "oidc-id-claim",
|
||||
Value: "sub", // sub is stable and defined as unique. the user manager needs to take care of the sub to user metadata lookup
|
||||
Name: "oidc-id-claim",
|
||||
// preferred_username is a workaround
|
||||
// the user manager needs to take care of the sub to user metadata lookup, which ldap cannot do
|
||||
// TODO sub is stable and defined as unique.
|
||||
// AFAICT we want to use the account id from ocis-accounts
|
||||
// TODO add an ocis middleware to reva that changes the users opaqueid?
|
||||
// TODO add an ocis-accounts backed user manager
|
||||
Value: "preferred_username",
|
||||
Usage: "OIDC id claim",
|
||||
EnvVars: []string{"REVA_OIDC_ID_CLAIM"},
|
||||
Destination: &cfg.Reva.OIDC.IDClaim,
|
||||
|
||||
+2
-28
@@ -109,32 +109,6 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Destination: &cfg.Reva.OCDav.DavFilesNamespace,
|
||||
},
|
||||
|
||||
// OIDC
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "oidc-issuer",
|
||||
Value: "https://localhost:9130",
|
||||
Usage: "OIDC issuer",
|
||||
EnvVars: []string{"REVA_OIDC_ISSUER"},
|
||||
Destination: &cfg.Reva.OIDC.Issuer,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "oidc-insecure",
|
||||
Value: true,
|
||||
Usage: "OIDC allow insecure communication",
|
||||
EnvVars: []string{"REVA_OIDC_INSECURE"},
|
||||
Destination: &cfg.Reva.OIDC.Insecure,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "oidc-id-claim",
|
||||
Value: "sub", // sub is stable and defined as unique. the user manager needs to take care of the sub to user metadata lookup
|
||||
Usage: "OIDC id claim",
|
||||
EnvVars: []string{"REVA_OIDC_ID_CLAIM"},
|
||||
Destination: &cfg.Reva.OIDC.IDClaim,
|
||||
},
|
||||
|
||||
// TODO allow configuring clients
|
||||
|
||||
// Services
|
||||
|
||||
// Frontend
|
||||
@@ -169,8 +143,8 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "service",
|
||||
Value: cli.NewStringSlice("datagateway", "wellknown", "oidcprovider", "ocdav", "ocs"),
|
||||
Usage: "--service datagateway [--service wellknown]",
|
||||
Value: cli.NewStringSlice("datagateway", "ocdav", "ocs"),
|
||||
Usage: "--service ocdav [--service ocs]",
|
||||
EnvVars: []string{"REVA_FRONTEND_SERVICES"},
|
||||
},
|
||||
|
||||
|
||||
@@ -169,6 +169,14 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
|
||||
|
||||
// storage registry
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "storage-home-provider",
|
||||
Value: "/home",
|
||||
Usage: "mount point of the storage provider for user homes in the global namespace",
|
||||
EnvVars: []string{"REVA_STORAGE_HOME_PROVIDER"},
|
||||
Destination: &cfg.Reva.Gateway.HomeProvider,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "frontend-url",
|
||||
Value: "localhost:9140",
|
||||
|
||||
@@ -120,5 +120,19 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Usage: "--service usershareprovider [--service publicshareprovider]",
|
||||
EnvVars: []string{"REVA_SHARING_SERVICES"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "user-driver",
|
||||
Value: "json",
|
||||
Usage: "driver to use for the UserShareProvider",
|
||||
EnvVars: []string{"REVA_SHARING_USER_DRIVER"},
|
||||
Destination: &cfg.Reva.Sharing.UserDriver,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "public-driver",
|
||||
Value: "memory",
|
||||
Usage: "driver to use for the PublicShareProvider",
|
||||
EnvVars: []string{"REVA_SHARING_PUBLIC_DRIVER"},
|
||||
Destination: &cfg.Reva.Sharing.PublicDriver,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,20 +130,6 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_STORAGE_HOME_DRIVER"},
|
||||
Destination: &cfg.Reva.StorageHome.Driver,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "path-wrapper",
|
||||
Value: "context",
|
||||
Usage: "path wrapper",
|
||||
EnvVars: []string{"REVA_STORAGE_HOME_PATH_WRAPPER"},
|
||||
Destination: &cfg.Reva.StorageHome.PathWrapper,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "path-wrapper-context-prefix",
|
||||
Value: "",
|
||||
Usage: "path wrapper context prefix",
|
||||
EnvVars: []string{"REVA_STORAGE_HOME_PATH_WRAPPER_CONTEXT_PREFIX"},
|
||||
Destination: &cfg.Reva.StorageHome.PathWrapperContext.Prefix,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mount-path",
|
||||
Value: "/home",
|
||||
@@ -318,6 +304,13 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_REDIS_ADDR"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.Redis,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "storage-owncloud-enable-home",
|
||||
Value: true,
|
||||
Usage: "enable the creation of home storages",
|
||||
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_ENABLE_HOME"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.EnableHome,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-owncloud-layout",
|
||||
Value: "{{.Username}}",
|
||||
|
||||
@@ -282,6 +282,13 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_REDIS_ADDR"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.Redis,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "storage-owncloud-enable-home",
|
||||
Value: true,
|
||||
Usage: "enable the creation of home storages",
|
||||
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_ENABLE_HOME"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.EnableHome,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-owncloud-layout",
|
||||
Value: "{{.Username}}",
|
||||
|
||||
+11
-18
@@ -130,20 +130,6 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_STORAGE_OC_DRIVER"},
|
||||
Destination: &cfg.Reva.StorageOC.Driver,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "path-wrapper",
|
||||
Value: "",
|
||||
Usage: "path wrapper",
|
||||
EnvVars: []string{"REVA_STORAGE_OC_PATH_WRAPPER"},
|
||||
Destination: &cfg.Reva.StorageOC.PathWrapper,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "path-wrapper-context-prefix",
|
||||
Value: "",
|
||||
Usage: "path wrapper context prefix",
|
||||
EnvVars: []string{"REVA_STORAGE_OC_PATH_WRAPPER_CONTEXT_PREFIX"},
|
||||
Destination: &cfg.Reva.StorageOC.PathWrapperContext.Prefix,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mount-path",
|
||||
Value: "/oc",
|
||||
@@ -173,11 +159,11 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Destination: &cfg.Reva.StorageOC.DataServerURL,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "enable-home-creation",
|
||||
// Value: true, // TODO jfd we may need to default to true here so the new webdav endpoint will autocreate user homes as well
|
||||
Name: "enable-home-creation",
|
||||
Value: false,
|
||||
Usage: "if enabled home dirs will be automatically created",
|
||||
EnvVars: []string{"REVA_STORAGE_HOME_ENABLE_HOME_CREATION"},
|
||||
Destination: &cfg.Reva.StorageHome.EnableHomeCreation,
|
||||
EnvVars: []string{"REVA_STORAGE_OC_ENABLE_HOME_CREATION"},
|
||||
Destination: &cfg.Reva.StorageOC.EnableHomeCreation,
|
||||
},
|
||||
|
||||
// Storage drivers
|
||||
@@ -318,6 +304,13 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_REDIS_ADDR"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.Redis,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "storage-owncloud-enable-home",
|
||||
Value: false,
|
||||
Usage: "enable the creation of home storages",
|
||||
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_ENABLE_HOME"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.EnableHome,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-owncloud-layout",
|
||||
Value: "{{.Username}}",
|
||||
|
||||
@@ -282,6 +282,13 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_REDIS_ADDR"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.Redis,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "storage-owncloud-enable-home",
|
||||
Value: false,
|
||||
Usage: "enable the creation of home storages",
|
||||
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_ENABLE_HOME"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.EnableHome,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-owncloud-layout",
|
||||
Value: "{{.Username}}",
|
||||
|
||||
@@ -130,20 +130,6 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_STORAGE_ROOT_DRIVER"},
|
||||
Destination: &cfg.Reva.StorageRoot.Driver,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "path-wrapper",
|
||||
Value: "",
|
||||
Usage: "path wrapper",
|
||||
EnvVars: []string{"REVA_STORAGE_ROOT_PATH_WRAPPER"},
|
||||
Destination: &cfg.Reva.StorageRoot.PathWrapper,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "path-wrapper-context-prefix",
|
||||
Value: "",
|
||||
Usage: "path wrapper context prefix",
|
||||
EnvVars: []string{"REVA_STORAGE_ROOT_PATH_WRAPPER_CONTEXT_PREFIX"},
|
||||
Destination: &cfg.Reva.StorageRoot.PathWrapperContext.Prefix,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mount-path",
|
||||
Value: "/",
|
||||
@@ -316,6 +302,13 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_REDIS_ADDR"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.Redis,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "storage-owncloud-enable-home",
|
||||
Value: false,
|
||||
Usage: "enable the creation of home storages",
|
||||
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_ENABLE_HOME"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.EnableHome,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-owncloud-layout",
|
||||
Value: "{{.Username}}",
|
||||
|
||||
@@ -93,42 +93,42 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: "ldap-port",
|
||||
Value: 636,
|
||||
Value: 9126,
|
||||
Usage: "LDAP port",
|
||||
EnvVars: []string{"REVA_LDAP_PORT"},
|
||||
Destination: &cfg.Reva.LDAP.Port,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-base-dn",
|
||||
Value: "dc=owncloud,dc=com",
|
||||
Value: "dc=example,dc=org",
|
||||
Usage: "LDAP basedn",
|
||||
EnvVars: []string{"REVA_LDAP_BASE_DN"},
|
||||
Destination: &cfg.Reva.LDAP.BaseDN,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-userfilter",
|
||||
Value: "(&(objectclass=posixAccount)(cn=%s))",
|
||||
Value: "(&(objectclass=posixAccount)(cn=%s*))",
|
||||
Usage: "LDAP userfilter",
|
||||
EnvVars: []string{"REVA_LDAP_USERFILTER"},
|
||||
Destination: &cfg.Reva.LDAP.UserFilter,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-groupfilter",
|
||||
Value: "(&(objectclass=posixGroup)(cn=%s))",
|
||||
Value: "(&(objectclass=posixGroup)(cn=%s*))",
|
||||
Usage: "LDAP groupfilter",
|
||||
EnvVars: []string{"REVA_LDAP_GROUPFILTER"},
|
||||
Destination: &cfg.Reva.LDAP.GroupFilter,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-bind-dn",
|
||||
Value: "cn=admin,dc=owncloud,dc=com",
|
||||
Value: "cn=reva,ou=sysusers,dc=example,dc=org",
|
||||
Usage: "LDAP bind dn",
|
||||
EnvVars: []string{"REVA_LDAP_BIND_DN"},
|
||||
Destination: &cfg.Reva.LDAP.BindDN,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-bind-password",
|
||||
Value: "admin",
|
||||
Value: "reva",
|
||||
Usage: "LDAP bind password",
|
||||
EnvVars: []string{"REVA_LDAP_BIND_PASSWORD"},
|
||||
Destination: &cfg.Reva.LDAP.BindPassword,
|
||||
@@ -150,7 +150,7 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-schema-displayName",
|
||||
Value: "displayName",
|
||||
Value: "sn",
|
||||
Usage: "LDAP schema displayName",
|
||||
EnvVars: []string{"REVA_LDAP_SCHEMA_DISPLAYNAME"},
|
||||
Destination: &cfg.Reva.LDAP.Schema.DisplayName,
|
||||
@@ -204,7 +204,7 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "driver",
|
||||
Value: "demo",
|
||||
Value: "ldap",
|
||||
Usage: "user driver: 'demo', 'json' or 'ldap'",
|
||||
EnvVars: []string{"REVA_USERS_DRIVER"},
|
||||
Destination: &cfg.Reva.Users.Driver,
|
||||
|
||||
Reference in New Issue
Block a user