mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-23 22:29:59 -05:00
add OCIS_ENABLE_OCM env var
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -145,8 +145,7 @@ config = {
|
||||
"skip": False,
|
||||
"federationServer": True,
|
||||
"extraServerEnvironment": {
|
||||
"OCIS_ADD_RUN_SERVICES": "ocm",
|
||||
"GRAPH_INCLUDE_OCM_SHAREES": True,
|
||||
"OCIS_ENABLE_OCM": True,
|
||||
"OCM_OCM_INVITE_MANAGER_INSECURE": True,
|
||||
"OCM_OCM_SHARE_PROVIDER_INSECURE": True,
|
||||
"OCM_OCM_STORAGE_PROVIDER_INSECURE": True,
|
||||
|
||||
7
.vscode/launch.json
vendored
7
.vscode/launch.json
vendored
@@ -88,18 +88,13 @@
|
||||
"OCM_OCM_INVITE_MANAGER_INSECURE": "true",
|
||||
"OCM_OCM_SHARE_PROVIDER_INSECURE": "true",
|
||||
"OCM_OCM_STORAGE_PROVIDER_INSECURE": "true",
|
||||
"FRONTEND_OCS_INCLUDE_OCM_SHAREES": "true",
|
||||
"OCIS_BASE_DATA_PATH": "${env:HOME}/.ocis-10200",
|
||||
"OCIS_CONFIG_DIR": "${env:HOME}/.ocis-10200/config",
|
||||
"OCIS_EVENTS_ENDPOINT": "127.0.0.1:10233",
|
||||
"OCIS_LDAP_URI": "ldaps://localhost:10235",
|
||||
"OCIS_RUNTIME_PORT": "10250",
|
||||
"OCIS_URL": "https://federation-ocis-server:10200",
|
||||
"FRONTEND_OCS_LIST_OCM_SHARES": "true",
|
||||
"FRONTEND_ENABLE_FEDERATED_SHARING_INCOMING": "true",
|
||||
"FRONTEND_ENABLE_FEDERATED_SHARING_OUTGOING": "true",
|
||||
"OCIS_ADD_RUN_SERVICES": "ocm",
|
||||
"GRAPH_INCLUDE_OCM_SHAREES": "true",
|
||||
"OCIS_ENABLE_OCM": "true",
|
||||
"APP_PROVIDER_DEBUG_ADDR": "127.0.0.1:10165",
|
||||
"APP_PROVIDER_GRPC_ADDR": "127.0.0.1:10164",
|
||||
"APP_REGISTRY_DEBUG_ADDR": "127.0.0.1:10243",
|
||||
|
||||
5
changelog/unreleased/add-enable-ocm-variable.md
Normal file
5
changelog/unreleased/add-enable-ocm-variable.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Enhancement: Add OCIS_ENABLE_OCM env var
|
||||
|
||||
We added a new `OCIS_ENABLE_OCM` env var that will enable all ocm flags and add `ocm` to the services started by the runtime.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/9784
|
||||
@@ -556,12 +556,8 @@ in the `/etc/hosts` file
|
||||
# run oCIS
|
||||
OCIS_URL="https://ocis-server:9200" \
|
||||
PROXY_ENABLE_BASIC_AUTH=true \
|
||||
GRAPH_INCLUDE_OCM_SHAREES=true \
|
||||
OCM_OCM_INVITE_MANAGER_INSECURE=true \
|
||||
OCM_OCM_SHARE_PROVIDER_INSECURE=true \
|
||||
OCM_OCM_STORAGE_PROVIDER_INSECURE=true \
|
||||
OCIS_ENABLE_OCM=true \
|
||||
OCM_OCM_PROVIDER_AUTHORIZER_PROVIDERS_FILE="${workspaceFolder}/tests/config/drone/providers.json" \
|
||||
OCIS_ADD_RUN_SERVICES="ocm" \
|
||||
ocis/bin/ocis server
|
||||
```
|
||||
|
||||
@@ -583,13 +579,7 @@ ocis/bin/ocis server
|
||||
The second oCIS instance should be available at: https://federation-ocis-server:10200/
|
||||
|
||||
{{< hint info >}}
|
||||
To enable ocm in the web interface, you need to set the following envs:
|
||||
`FRONTEND_OCS_INCLUDE_OCM_SHAREES=true` \
|
||||
`FRONTEND_OCS_LIST_OCM_SHARES=true` \
|
||||
`FRONTEND_ENABLE_FEDERATED_SHARING_INCOMING=true` \
|
||||
`FRONTEND_ENABLE_FEDERATED_SHARING_OUTGOING=true` \
|
||||
|
||||
and put `ocm` to apps https://github.com/owncloud/ocis/blob/master/services/web/pkg/config/defaults/defaultconfig.go#L101
|
||||
To enable ocm in the web interface, you need to set `OCIS_ENABLE_OCM=true`. It will enable all ocm flags and start the ocm service when running `ocis server`.
|
||||
{{< /hint>}}
|
||||
|
||||
#### Run the Acceptance Test
|
||||
|
||||
@@ -56,6 +56,7 @@ type Runtime struct {
|
||||
Services []string `yaml:"services" env:"OCIS_RUN_EXTENSIONS;OCIS_RUN_SERVICES" desc:"A comma-separated list of service names. Will start only the listed services." introductionVersion:"pre5.0"`
|
||||
Disabled []string `yaml:"disabled_services" env:"OCIS_EXCLUDE_RUN_SERVICES" desc:"A comma-separated list of service names. Will start all default services except of the ones listed. Has no effect when OCIS_RUN_SERVICES is set." introductionVersion:"pre5.0"`
|
||||
Additional []string `yaml:"add_services" env:"OCIS_ADD_RUN_SERVICES" desc:"A comma-separated list of service names. Will add the listed services to the default configuration. Has no effect when OCIS_RUN_SERVICES is set. Note that one can add services not started by the default list and exclude services from the default list by using both envvars at the same time." introductionVersion:"pre5.0"`
|
||||
EnableOCM bool `yaml:"enable_ocm" env:"OCIS_ENABLE_OCM" desc:"Enable all OCM config flags and start the ocm service." introductionVersion:"%%NEXT%%"`
|
||||
}
|
||||
|
||||
// Config combines all available configuration parts.
|
||||
|
||||
@@ -473,6 +473,11 @@ func (s *Service) generateRunSet(cfg *ociscfg.Config) {
|
||||
runset[name] = struct{}{}
|
||||
}
|
||||
|
||||
// add ocm service if explicitly enabled by config
|
||||
if cfg.Runtime.EnableOCM {
|
||||
runset[cfg.OCM.Service.Name] = struct{}{}
|
||||
}
|
||||
|
||||
// remove services if explicitly excluded by config
|
||||
for _, name := range cfg.Runtime.Disabled {
|
||||
delete(runset, name)
|
||||
|
||||
@@ -31,8 +31,8 @@ type Config struct {
|
||||
UploadMaxChunkSize int `yaml:"upload_max_chunk_size" env:"FRONTEND_UPLOAD_MAX_CHUNK_SIZE" desc:"Sets the max chunk sizes in bytes for uploads via the clients." introductionVersion:"pre5.0"`
|
||||
UploadHTTPMethodOverride string `yaml:"upload_http_method_override" env:"FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE" desc:"Advise TUS to replace PATCH requests by POST requests." introductionVersion:"pre5.0"`
|
||||
DefaultUploadProtocol string `yaml:"default_upload_protocol" env:"FRONTEND_DEFAULT_UPLOAD_PROTOCOL" desc:"The default upload protocol to use in clients. Currently only 'tus' is available. See the developer API documentation for more details about TUS." introductionVersion:"pre5.0"`
|
||||
EnableFederatedSharingIncoming bool `yaml:"enable_federated_sharing_incoming" env:"FRONTEND_ENABLE_FEDERATED_SHARING_INCOMING" desc:"Changing this value is NOT supported. Enables support for incoming federated sharing for clients. The backend behaviour is not changed." introductionVersion:"pre5.0"`
|
||||
EnableFederatedSharingOutgoing bool `yaml:"enable_federated_sharing_outgoing" env:"FRONTEND_ENABLE_FEDERATED_SHARING_OUTGOING" desc:"Changing this value is NOT supported. Enables support for outgoing federated sharing for clients. The backend behaviour is not changed." introductionVersion:"pre5.0"`
|
||||
EnableFederatedSharingIncoming bool `yaml:"enable_federated_sharing_incoming" env:"OCIS_ENABLE_OCM;FRONTEND_ENABLE_FEDERATED_SHARING_INCOMING" desc:"Changing this value is NOT supported. Enables support for incoming federated sharing for clients. The backend behaviour is not changed." introductionVersion:"pre5.0"`
|
||||
EnableFederatedSharingOutgoing bool `yaml:"enable_federated_sharing_outgoing" env:"OCIS_ENABLE_OCM;FRONTEND_ENABLE_FEDERATED_SHARING_OUTGOING" desc:"Changing this value is NOT supported. Enables support for outgoing federated sharing for clients. The backend behaviour is not changed." introductionVersion:"pre5.0"`
|
||||
SearchMinLength int `yaml:"search_min_length" env:"FRONTEND_SEARCH_MIN_LENGTH" desc:"Minimum number of characters to enter before a client should start a search for Share receivers. This setting can be used to customize the user experience if e.g too many results are displayed." introductionVersion:"pre5.0"`
|
||||
Edition string `yaml:"edition" env:"OCIS_EDITION;FRONTEND_EDITION" desc:"Edition of oCIS. Used for branding purposes." introductionVersion:"pre5.0"`
|
||||
DisableSSE bool `yaml:"disable_sse" env:"OCIS_DISABLE_SSE;FRONTEND_DISABLE_SSE" desc:"When set to true, clients are informed that the Server-Sent Events endpoint is not accessible." introductionVersion:"pre5.0"`
|
||||
@@ -141,10 +141,10 @@ type OCS struct {
|
||||
CacheWarmupDriver string `yaml:"cache_warmup_driver,omitempty"` // not supported by the oCIS product, therefore not part of docs
|
||||
CacheWarmupDrivers CacheWarmupDrivers `yaml:"cache_warmup_drivers,omitempty"` // not supported by the oCIS product, therefore not part of docs
|
||||
EnableDenials bool `yaml:"enable_denials" env:"FRONTEND_OCS_ENABLE_DENIALS" desc:"EXPERIMENTAL: enable the feature to deny access on folders." introductionVersion:"pre5.0"`
|
||||
ListOCMShares bool `yaml:"list_ocm_shares" env:"FRONTEND_OCS_LIST_OCM_SHARES" desc:"Include OCM shares when listing shares. See the OCM service documentation for more details." introductionVersion:"5.0"`
|
||||
ListOCMShares bool `yaml:"list_ocm_shares" env:"OCIS_ENABLE_OCM;FRONTEND_OCS_LIST_OCM_SHARES" desc:"Include OCM shares when listing shares. See the OCM service documentation for more details." introductionVersion:"5.0"`
|
||||
IncludeOCMSharees bool `yaml:"include_ocm_sharees" env:"OCIS_ENABLE_OCM;FRONTEND_OCS_INCLUDE_OCM_SHAREES" desc:"Include OCM sharees when listing sharees." introductionVersion:"5.0"`
|
||||
PublicShareMustHavePassword bool `yaml:"public_sharing_share_must_have_password" env:"OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD;FRONTEND_OCS_PUBLIC_SHARE_MUST_HAVE_PASSWORD" desc:"Set this to true if you want to enforce passwords on all public shares." introductionVersion:"5.0"`
|
||||
WriteablePublicShareMustHavePassword bool `yaml:"public_sharing_writeableshare_must_have_password" env:"OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD;FRONTEND_OCS_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD" desc:"Set this to true if you want to enforce passwords for writable shares. Only effective if the setting for 'passwords on all public shares' is set to false." introductionVersion:"5.0"`
|
||||
IncludeOCMSharees bool `yaml:"include_ocm_sharees" env:"FRONTEND_OCS_INCLUDE_OCM_SHAREES" desc:"Include OCM sharees when listing sharees." introductionVersion:"5.0"`
|
||||
ShowUserEmailInResults bool `yaml:"show_email_in_results" env:"OCIS_SHOW_USER_EMAIL_IN_RESULTS" desc:"Include user email addresses in responses. If absent or set to false emails will be omitted from results. Please note that admin users can always see all email addresses." introductionVersion:"6.0.0"`
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ type Config struct {
|
||||
Application Application `yaml:"application"`
|
||||
Spaces Spaces `yaml:"spaces"`
|
||||
Identity Identity `yaml:"identity"`
|
||||
IncludeOCMSharees bool `yaml:"include_ocm_sharees" env:"GRAPH_INCLUDE_OCM_SHAREES" desc:"Include OCM sharees when listing users." introductionVersion:"5.0"`
|
||||
IncludeOCMSharees bool `yaml:"include_ocm_sharees" env:"OCIS_ENABLE_OCM;GRAPH_INCLUDE_OCM_SHAREES" desc:"Include OCM sharees when listing users." introductionVersion:"5.0"`
|
||||
Events Events `yaml:"events"`
|
||||
|
||||
Keycloak Keycloak `yaml:"keycloak"`
|
||||
|
||||
@@ -2,18 +2,13 @@ export OCM_OCM_PROVIDER_AUTHORIZER_PROVIDERS_FILE=tests/config/drone/providers.j
|
||||
export OCM_OCM_INVITE_MANAGER_INSECURE=true
|
||||
export OCM_OCM_SHARE_PROVIDER_INSECURE=true
|
||||
export OCM_OCM_STORAGE_PROVIDER_INSECURE=true
|
||||
export FRONTEND_OCS_INCLUDE_OCM_SHAREES=true
|
||||
export OCIS_BASE_DATA_PATH=${HOME}/.ocis-10200
|
||||
export OCIS_CONFIG_DIR=${HOME}/.ocis-10200/config
|
||||
export OCIS_EVENTS_ENDPOINT=127.0.0.1:10233
|
||||
export OCIS_LDAP_URI=ldaps://localhost:10235
|
||||
export OCIS_RUNTIME_PORT=10250
|
||||
export OCIS_URL=https://federation-ocis-server:10200
|
||||
export FRONTEND_OCS_LIST_OCM_SHARES=true
|
||||
export FRONTEND_ENABLE_FEDERATED_SHARING_INCOMING=true
|
||||
export FRONTEND_ENABLE_FEDERATED_SHARING_OUTGOING=true
|
||||
export OCIS_ADD_RUN_SERVICES=ocm
|
||||
export GRAPH_INCLUDE_OCM_SHAREES=true
|
||||
export OCIS_ENABLE_OCM=true
|
||||
export APP_PROVIDER_DEBUG_ADDR=127.0.0.1:10165
|
||||
export APP_PROVIDER_GRPC_ADDR=127.0.0.1:10164
|
||||
export APP_REGISTRY_DEBUG_ADDR=127.0.0.1:10243
|
||||
|
||||
Reference in New Issue
Block a user