Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
wkloucek committed Feb 2, 2021
1 parent 1d39115 commit b3095ee
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions docs/ocis/deployment/basic-remote-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ If you need to access oCIS on a VM, docker container or a remote machine via an

### Start the oCIS fullstack server

If you start the oCIS fullstack for the first time with `./bin/ocis server` it will generate a file `identifier-registration.yml` in the config folder relative to its location. This file is used to configure the clients for the built-in Identity Provider.
If you start the oCIS fullstack for the first time with `./bin/ocis server` it will generate a file `identifier-registration.yml` in the config folder relative to your current working directory. This file is used to configure the clients for the built-in Identity Provider.

In the following examples you have the binary in your current working directory, it is named 'ocis' and is marked as executable.
For the following examples you need to have the binary in your current working directory, it must be named 'ocis' and needs to be marked as executable.

### Start the oCIS fullstack server

In order to run oCIS with self generated certificates please execute following command:
```bash
OCIS_LOG_LEVEL=WARN
KONNECTD_LOG_LEVEL=DEBUG
PROXY_HTTP_ADDR=0.0.0.0:443 \
PROXY_HTTP_ADDR=0.0.0.0:9200 \
OCIS_URL=https://ocis.owncloud.test:9200 \
sudo ./ocis server
./ocis server
```

When you have your own certificates in place, you also may running following command:
Expand Down
1 change: 1 addition & 0 deletions ocis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ go-mod-tidy:
.PHONY: clean-config
clean-config:
rm -rf $(CONFIG)
rm -rf ldap.crt ldap.key server.crt server.key

.PHONY: fmt
fmt: ## fmt
Expand Down
7 changes: 4 additions & 3 deletions proxy/pkg/crypto/gencert.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func pemBlockForKey(priv interface{}, l log.Logger) *pem.Block {
}

// GenCert generates TLS-Certificates
func GenCert(hosts []string, l log.Logger) error {
func GenCert(l log.Logger) error {
var priv interface{}
var err error

Expand All @@ -64,8 +64,8 @@ func GenCert(hosts []string, l log.Logger) error {
template := x509.Certificate{
SerialNumber: serialNumber,
Subject: pkix.Name{
Organization: []string{"ownCloud Infinite Scale"},
CommonName: "oCIS",
Organization: []string{"Acme Corp"},
CommonName: "OCIS",
},
NotBefore: notBefore,
NotAfter: notAfter,
Expand All @@ -75,6 +75,7 @@ func GenCert(hosts []string, l log.Logger) error {
BasicConstraintsValid: true,
}

hosts := []string{"127.0.0.1", "localhost"}
for _, h := range hosts {
if ip := net.ParseIP(h); ip != nil {
template.IPAddresses = append(template.IPAddresses, ip)
Expand Down
2 changes: 1 addition & 1 deletion proxy/pkg/server/http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func Server(opts ...Option) (svc.Service, error) {

if os.IsNotExist(certErr) || os.IsNotExist(keyErr) {
// GenCert has side effects as it writes 2 files to the binary running location
if err := crypto.GenCert([]string{options.Config.HTTP.Addr}, l); err != nil {
if err := crypto.GenCert(l); err != nil {
l.Fatal().Err(err).Msgf("Could not generate test-certificate")
os.Exit(1)
}
Expand Down

0 comments on commit b3095ee

Please sign in to comment.