Commit graph

295 commits

Author SHA1 Message Date
Joas Schilling
930fd6fb56
Also fix "occ status" 2016-09-06 16:13:41 +02:00
Daniel Hansson
d92f6fbd69 ownCloud -> Nextcloud 2016-08-05 14:46:07 +02:00
Joas Schilling
ca6a7d9e6a
Run the license script 2016-07-22 09:48:05 +02:00
Joas Schilling
06ac822b71
Use the themed Defaults everywhere 2016-07-15 09:22:44 +02:00
Morris Jobke
11e834ea74
Merge branch 'stable9' into sync-stable9 2016-07-07 12:03:34 +02:00
Thomas Müller
4ac256ea6c [stable9] Fix decrypt message stable9 (#25188)
* Fix Decrypt message via occ

* Comments fixed

* Fixed reviews

* Originally:
commit 2304e4bda027e61ff1302c55c2f70f8e4c8f47d0
Author: Joas Schilling <nickvergessen@owncloud.com>
Date:   Tue Jun 7 09:13:11 2016 +0200

    Allow to decrypt user '0' files only

* Fix uid comparison
2016-07-01 11:30:39 +02:00
Morris Jobke
8abf6e0ed1
fixed code 2016-06-20 18:50:56 +02:00
Jörn Friedrich Dreyer
38663e13cc
Allow empty host when installing on oracle via CLI (#25034) 2016-06-20 17:37:31 +02:00
Jörn Friedrich Dreyer
ea330dfa6a Allow empty host when installing on oracle via CLI (#25034) 2016-06-14 20:09:44 +02:00
Lukas Reschke
4e10b81eb0
Move file since stable9 uses old autoloader 2016-05-10 16:53:50 +02:00
Joas Schilling
e5bec54e4e
Make the version a string 2016-04-06 15:41:25 +02:00
Victor Dubiniuk
b87b27cbd9
Show hint in CLI 2016-04-06 15:34:16 +02:00
Carla Schroder
e7152f495c Some typo corrections in occ command output 2016-03-17 07:05:34 -07:00
Lukas Reschke
933f60e314 Update author information
Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
2016-03-01 17:25:15 +01:00
Thomas Müller
f6dcc9d615 Merge pull request #22419 from owncloud/issue-20663-console-add-user-group-with-shares
Make sure to init the users Filesystem so we can add group shares
2016-02-17 10:57:23 +01:00
Joas Schilling
560085e1a4 Make sure to init the users Filesystem so we can add group shares 2016-02-16 11:46:35 +01:00
Joas Schilling
4eef8afe9b Remove inaccurate "is already enabled" message 2016-02-16 10:59:06 +01:00
Pierre Ozoux
e611b85f51 typo 2016-02-15 16:03:16 +00:00
Thomas Müller
60c1ff7634 Register process control signel handlers only on execution of the command 2016-02-09 15:52:19 +01:00
Victor Dubiniuk
5910b82de1 Cut authors list. Declare a member variable 2016-02-08 20:37:05 +03:00
Victor Dubiniuk
b91bc80ea4 Optional path parameter 2016-02-05 21:51:58 +03:00
Victor Dubiniuk
fef7fc1248 CLI commands to check app and core signatures 2016-02-05 21:10:22 +03:00
Lukas Reschke
5f300ac275 Allow specifing the signing path 2016-02-03 20:08:40 +01:00
Morris Jobke
0a66734416 Revert "setting to skip migration tests by default" 2016-02-03 12:59:47 +01:00
Morris Jobke
2e444e6e37 setting to skip migration tests by default
* if you install owncloud via package it is not
  possible to skip migration tests
* this also allows to disable migration tests for
  an instance by default
2016-02-03 09:08:27 +01:00
Thomas Müller
0202acb926 Move signal handling to the base class to allow other commands to reuse this feature 2016-02-01 09:47:13 +01:00
Thomas Müller
ce753231eb Merge pull request #18444 from owncloud/occ-config-types
occ config:system:set can now set other value types
2016-01-25 10:02:51 +01:00
Thomas Müller
2d569d92eb Merge pull request #21850 from owncloud/more-output-for-integrity-check
Print output for integrity check during ./occ upgrade
2016-01-22 14:59:29 +01:00
Morris Jobke
e7aab8f31f Print output for integrity check during ./occ upgrade 2016-01-22 13:18:00 +01:00
Lukas Reschke
ea367b598a Use path instead of app id
This change requires the usage of a path instead of the App ID when signing code. This has the advantage that developers can also sign code under a different location to make it easier. (e.g. remove `.git`, …)

Also it adds an example command usage as well as a link to the documentation
2016-01-20 20:38:18 +01:00
Joas Schilling
56184f799e Make it possible to enable apps for groups only via occ 2016-01-19 14:29:12 +01:00
Joas Schilling
78a02d1b2f Make it possible to disable apps via the console, which are not enabled for the current user 2016-01-19 14:29:01 +01:00
Joas Schilling
d2285113a8 Make sure to list "group enabled" apps as enabled
also when they are not enabled for the current user
2016-01-19 14:29:01 +01:00
Joas Schilling
fc08f71c12 Sort the list before saving 2016-01-18 11:13:09 +01:00
Joas Schilling
f2cb03e155 Allow array recursion in get 2016-01-14 15:02:55 +01:00
Joas Schilling
a06f0256a9 Allow deleting a nested system config value 2016-01-14 15:02:54 +01:00
Joas Schilling
00ab50defc Retain backwards compatibility 2016-01-14 15:02:54 +01:00
Robin McCorkell
b9d384d837 occ config:system:set can now set other value types
Integers, doubles, booleans and even arrays can now be set, with the
--type=... option. Array setting can be specified by passing multiple
name arguments, e.g. `./occ config:system:set redis port --value=123
--type=integer`
2016-01-14 15:02:54 +01:00
Robin Appelman
c67a09112b Add occ commands to manager trusted certificates 2016-01-13 14:35:37 +01:00
Thomas Müller
682821c71e Happy new year! 2016-01-12 15:02:18 +01:00
Thomas Müller
1cc6fddead Merge pull request #21498 from owncloud/cleanup-OC_DB
Cleanup OC_DB methods
2016-01-07 20:13:16 +01:00
Joas Schilling
c55da1fc8d Add a warning to the app:check-code if the version is missing 2016-01-07 15:04:36 +01:00
Morris Jobke
190cc2bb67 Remove OC_DB::getConnection 2016-01-07 14:54:55 +01:00
Björn Schießle
58b1221ad3 don't show previous log level in upgrade message 2016-01-04 11:50:07 +01:00
Morris Jobke
ed98cdf532 Use OCP\Util::getVersion instead of the internal private implementation 2015-12-18 15:26:54 +01:00
Victor Dubiniuk
b59285d0d0 Add occ command to get app path 2015-12-09 11:22:13 +01:00
Morris Jobke
d39b018893 Allow occ install on OS X - same behaviour as web setup 2015-12-09 10:49:54 +01:00
Lukas Reschke
4971015544 Add code integrity check
This PR implements the base foundation of the code signing and integrity check. In this PR implemented is the signing and verification logic, as well as commands to sign single apps or the core repository.

Furthermore, there is a basic implementation to display problems with the code integrity on the update screen.

Code signing basically happens the following way:

- There is a ownCloud Root Certificate authority stored `resources/codesigning/root.crt` (in this PR I also ship the private key which we obviously need to change before a release 😉). This certificate is not intended to be used for signing directly and only is used to sign new certificates.
- Using the `integrity:sign-core` and `integrity:sign-app` commands developers can sign either the core release or a single app. The core release needs to be signed with a certificate that has a CN of `core`,  apps need to be signed with a certificate that either has a CN of `core` (shipped apps!)  or the AppID.
- The command generates a signature.json file of the following format:
```json
{
    "hashes": {
        "/filename.php": "2401fed2eea6f2c1027c482a633e8e25cd46701f811e2d2c10dc213fd95fa60e350bccbbebdccc73a042b1a2799f673fbabadc783284cc288e4f1a1eacb74e3d",
        "/lib/base.php": "55548cc16b457cd74241990cc9d3b72b6335f2e5f45eee95171da024087d114fcbc2effc3d5818a6d5d55f2ae960ab39fd0414d0c542b72a3b9e08eb21206dd9"
    },
    "certificate": "-----BEGIN CERTIFICATE-----MIIBvTCCASagAwIBAgIUPvawyqJwCwYazcv7iz16TWxfeUMwDQYJKoZIhvcNAQEF\nBQAwIzEhMB8GA1UECgwYb3duQ2xvdWQgQ29kZSBTaWduaW5nIENBMB4XDTE1MTAx\nNDEzMTcxMFoXDTE2MTAxNDEzMTcxMFowEzERMA8GA1UEAwwIY29udGFjdHMwgZ8w\nDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANoQesGdCW0L2L+a2xITYipixkScrIpB\nkX5Snu3fs45MscDb61xByjBSlFgR4QI6McoCipPw4SUr28EaExVvgPSvqUjYLGps\nfiv0Cvgquzbx/X3mUcdk9LcFo1uWGtrTfkuXSKX41PnJGTr6RQWGIBd1V52q1qbC\nJKkfzyeMeuQfAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAvF/KIhRMQ3tYTmgHWsiM\nwDMgIDb7iaHF0fS+/Nvo4PzoTO/trev6tMyjLbJ7hgdCpz/1sNzE11Cibf6V6dsz\njCE9invP368Xv0bTRObRqeSNsGogGl5ceAvR0c9BG+NRIKHcly3At3gLkS2791bC\niG+UxI/MNcWV0uJg9S63LF8=\n-----END CERTIFICATE-----",
    "signature": "U29tZVNpZ25lZERhdGFFeGFtcGxl"
}
```
`hashes` is an array of all files in the folder with their corresponding SHA512 hashes (this is actually quite cheap to calculate), the `certificate` is the  certificate used for signing. It has to be issued by the ownCloud Root Authority and it's CN needs to be permitted to perform the required action. The `signature` is then a signature of the `hashes` which can be verified using the `certificate`.

Steps to do in other PRs, this is already a quite huge one:
- Add nag screen in case the code check fails to ensure that administrators are aware of this.
- Add code verification also to OCC upgrade and unify display code more.
- Add enforced code verification to apps shipped from the appstore with a level of "official"
- Add enfocrced code verification to apps shipped from the appstore that were already signed in a previous release
- Add some developer documentation on how devs can request their own certificate
- Check when installing ownCloud
- Add support for CRLs to allow revoking certificates

**Note:** The upgrade checks are only run when the instance has a defined release channel of `stable` (defined in `version.php`). If you want to test this, you need to change the channel thus and then generate the core signature:

```
➜  master git:(add-integrity-checker) ✗ ./occ integrity:sign-core --privateKey=resources/codesigning/core.key --certificate=resources/codesigning/core.crt
Successfully signed "core"
```

Then increase the version and you should see something like the following:

![2015-11-04_12-02-57](https://cloud.githubusercontent.com/assets/878997/10936336/6adb1d14-82ec-11e5-8f06-9a74801c9abf.png)

As you can see a failed code check will not prevent the further update. It will instead just be a notice to the admin. In a next step we will add some nag screen.

For packaging stable releases this requires the following additional steps as a last action before zipping:
1. Run `./occ integrity:sign-core` once
2. Run `./occ integrity:sign-app` _for each_ app. However, this can be simply automated using a simple foreach on the apps folder.
2015-12-01 11:55:20 +01:00
Victor Dubiniuk
8d9353a640 Add cmdline key to show shipped/non-shipped apps only 2015-11-23 09:06:35 +01:00
Joas Schilling
fe04451cb1 Do not allow two different version requirements 2015-11-09 11:10:37 +01:00