Skip to content

Instantly share code, notes, and snippets.

@refs
Last active December 15, 2020 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save refs/91d634ebdc83efb1a1dc99ae322a6e0b to your computer and use it in GitHub Desktop.
Save refs/91d634ebdc83efb1a1dc99ae322a6e0b to your computer and use it in GitHub Desktop.

Running OCIS on a remote host

  1. clone github.com/owncloud.ocis
  2. either make clean build or go run...
    1. if no support for mDNS set MICRO_REGISTRY=etcd and run etcd > etcd &
  3. edit environment to configure konnectd:
OCIS_BASE_URL=your.machine:9200
PROXY_HTTP_ADDR=0.0.0.0:9200
PROXY_OIDC_ISSUER=https://${OCIS_BASE_URL:-localhost}/
WEB_OIDC_AUTHORITY=https://${OCIS_BASE_URL:-localhost}/
WEB_UI_CONFIG_SERVER=https://${OCIS_BASE_URL:-localhost}/
WEB_OIDC_METADATA_URL=https://${OCIS_BASE_URL:-localhost}/.well-known/openid-configuration
WEB_UI_CONFIG=/etc/ocis/phoenix/config.json
OCIS_LOG_LEVEL=warn
OCIS_TRACING_ENABLED=false
OCIS_TRACING_ENDPOINT=jaegertracing:6831
OCIS_TRACING_COLLECTOR=http://jaegertracing:14268/api/traces
STORAGE_STORAGE_OWNCLOUD_REDIS_ADDR=redis:6379
STORAGE_OIDC_ISSUER=https://${OCIS_BASE_URL:-localhost}/
STORAGE_DATAGATEWAY_PUBLIC_URL=https://${OCIS_BASE_URL:-localhost}/data
STORAGE_FRONTEND_PUBLIC_URL=https://${OCIS_BASE_URL:-localhost}/
STORAGE_LDAP_IDP=https://${OCIS_BASE_URL:-localhost}/
KONNECTD_LOG_LEVEL=debug
KONNECTD_IDENTIFIER_REGISTRATION_CONF=/etc/ocis/identifier-registration.yml
KONNECTD_TLS=0
KONNECTD_ISS=https://${OCIS_BASE_URL:-localhost}/
KONNECTD_ENCRYPTION_SECRET=/etc/ocis/konnectd/secret_key
KONNECTD_SIGNING_KID=konnectd_private
KONNECTD_SIGNING_PRIVATE_KEY=/etc/ocis/konnectd/keys/konnectd_private.pem
KONNECTD_VALIDATION_KEYS_PATH=/etc/ocis/konnectd/keys
KONNECTD_ALLOW_DYNAMIC_CLIENT_REGISTRATION=true
KONNECTD_ACCESS_TOKEN_EXPIRATION=3600

note the port on OCIS_BASE_URL

  1. on identifier-registration.yaml change the redirect_uris and origins from localhost to your domain.

Notes

KONNECTD_ENCRYPTION_SECRET=/etc/ocis/konnectd/secret_key
KONNECTD_SIGNING_KID=konnectd_private
KONNECTD_SIGNING_PRIVATE_KEY=/etc/ocis/konnectd/keys/konnectd_private.pem
KONNECTD_VALIDATION_KEYS_PATH=/etc/ocis/konnectd/keys

Where secret_key is a 32 byte randomly generated key The keys are a RSA keypair on a directory containing the key pair, not the pair encoded in one file keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment