From a5861ad225db59ec1a5055949c069204c26540c5 Mon Sep 17 00:00:00 2001 From: Jamie Strandboge Date: Mon, 19 Sep 2016 15:22:40 -0500 Subject: update docs/interfaces.md for docker --- docs/interfaces.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'docs') diff --git a/docs/interfaces.md b/docs/interfaces.md index 12d7868fce..e86aa42915 100644 --- a/docs/interfaces.md +++ b/docs/interfaces.md @@ -258,6 +258,19 @@ printing. * Auto-Connect: no +### docker + +Can access snaps providing the docker interface which gives privileged access +to the system. Providing snaps can access resources and syscalls necessary to +run Docker application containers. Providing snaps can access resources to +run privileged Docker application containers when specifying +``privileged: true``. This interface currently may only be established with the +Docker project. + +* Auto-Connect: no +* Attributes: + * privileged (slot): true|false (defaults to ``false``) + ### firewall-control Can configure network firewalling giving privileged access to networking. -- cgit v1.2.3 From 518cb67ec8fd8edb1267bd77c769720095e50f38 Mon Sep 17 00:00:00 2001 From: Jamie Strandboge Date: Mon, 19 Sep 2016 15:38:35 -0500 Subject: clarify/correct use of the daemon-privileged attribute --- docs/interfaces.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/interfaces.md b/docs/interfaces.md index e86aa42915..fae9959739 100644 --- a/docs/interfaces.md +++ b/docs/interfaces.md @@ -261,15 +261,17 @@ printing. ### docker Can access snaps providing the docker interface which gives privileged access -to the system. Providing snaps can access resources and syscalls necessary to -run Docker application containers. Providing snaps can access resources to -run privileged Docker application containers when specifying -``privileged: true``. This interface currently may only be established with the -Docker project. +to the system. + +Providing snaps can access resources and syscalls necessary to run Docker +application containers. Providing snaps can access additional resources to run +privileged Docker application containers when specifying +``daemon-privileged: true``. Providing snaps specifying this interface +currently may only be established with the Docker project. * Auto-Connect: no * Attributes: - * privileged (slot): true|false (defaults to ``false``) + * daemon-privileged (plug): true|false (defaults to ``false``) ### firewall-control -- cgit v1.2.3 From b7eefbb33c3634bcd8ae974060a5aaba26c109bf Mon Sep 17 00:00:00 2001 From: Jamie Strandboge Date: Tue, 20 Sep 2016 10:28:02 -0500 Subject: drop daemon-privileged attribute (docker run --privileged no longer supported) --- docs/interfaces.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/interfaces.md b/docs/interfaces.md index fae9959739..4b8650677d 100644 --- a/docs/interfaces.md +++ b/docs/interfaces.md @@ -264,14 +264,11 @@ Can access snaps providing the docker interface which gives privileged access to the system. Providing snaps can access resources and syscalls necessary to run Docker -application containers. Providing snaps can access additional resources to run -privileged Docker application containers when specifying -``daemon-privileged: true``. Providing snaps specifying this interface -currently may only be established with the Docker project. +application containers. Priveleged containers are not supported at this time. +Providing snaps specifying this interface currently may only be established +with the Docker project. * Auto-Connect: no -* Attributes: - * daemon-privileged (plug): true|false (defaults to ``false``) ### firewall-control -- cgit v1.2.3 From 16510ed7470630d352e5197a5d2a6dcdea8551cd Mon Sep 17 00:00:00 2001 From: Jamie Strandboge Date: Tue, 20 Sep 2016 13:32:56 -0500 Subject: reorganize to create docker-support and docker interfaces Shuffle policy around to docker-support and docker interfaces to clarify connections. The docker interface is for client snaps to access snaps providing the docker interface. Slot implementations are reserved for the Docker project. The docker-support interface is modelled after lxd-support and is for snaps providing the docker interface to access resources and syscalls necessary to run Docker application containers. Providing snaps specifying this interface currently may only be established with the Docker project. --- docs/interfaces.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/interfaces.md b/docs/interfaces.md index 4b8650677d..5e3195c6ee 100644 --- a/docs/interfaces.md +++ b/docs/interfaces.md @@ -263,12 +263,18 @@ printing. Can access snaps providing the docker interface which gives privileged access to the system. -Providing snaps can access resources and syscalls necessary to run Docker -application containers. Priveleged containers are not supported at this time. -Providing snaps specifying this interface currently may only be established -with the Docker project. +* Auto-Connect: no + +### docker-support + +Can access resources and syscalls necessary to run Docker application +containers. The ``privileged`` attribute may be used to give the necessary +access to run privileged containers. Providing snaps specifying this interface +currently may only be established with the Docker project. * Auto-Connect: no +* Attributes: + * privileged (plug): true|false (defaults to ``false``) ### firewall-control -- cgit v1.2.3 From ea5bba2733829fb8b3fb8e0afd4cc32d0562f141 Mon Sep 17 00:00:00 2001 From: Jamie Strandboge Date: Tue, 20 Sep 2016 14:16:00 -0500 Subject: implement 'privileged-containers' attribute in docker-support --- docs/interfaces.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/interfaces.md b/docs/interfaces.md index 5e3195c6ee..b4ef1e9a30 100644 --- a/docs/interfaces.md +++ b/docs/interfaces.md @@ -268,13 +268,13 @@ to the system. ### docker-support Can access resources and syscalls necessary to run Docker application -containers. The ``privileged`` attribute may be used to give the necessary -access to run privileged containers. Providing snaps specifying this interface -currently may only be established with the Docker project. +containers. The ``privileged-containers`` attribute may be used to give the +necessary access to run privileged containers. Providing snaps specifying this +interface currently may only be established with the Docker project. * Auto-Connect: no * Attributes: - * privileged (plug): true|false (defaults to ``false``) + * privileged-containers (plug): true|false (defaults to ``false``) ### firewall-control -- cgit v1.2.3 From a6a6e50b73cc69be17b5816627d2b18907fddcf0 Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Thu, 22 Sep 2016 12:28:12 +0200 Subject: interfaces/builtin: add netplan-observe interface --- docs/interfaces.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/interfaces.md b/docs/interfaces.md index b4ef1e9a30..cb3f7060f2 100644 --- a/docs/interfaces.md +++ b/docs/interfaces.md @@ -383,6 +383,13 @@ apps. * Auto-Connect: no +### netplan-observe + +Can read netplan configuration files. This is restricted because it gives access +to system network configuration which can contain network security details. + +* Auto-Connect: no + ### network-control Can configure networking which gives wide, privileged access to networking. -- cgit v1.2.3 From 74c6f353cef78088b48d45a365e2ca149f7829cc Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Fri, 23 Sep 2016 09:18:02 +0200 Subject: interfaces/builtin: rename to network-setup-observe --- docs/interfaces.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'docs') diff --git a/docs/interfaces.md b/docs/interfaces.md index cb3f7060f2..de14523c86 100644 --- a/docs/interfaces.md +++ b/docs/interfaces.md @@ -383,13 +383,6 @@ apps. * Auto-Connect: no -### netplan-observe - -Can read netplan configuration files. This is restricted because it gives access -to system network configuration which can contain network security details. - -* Auto-Connect: no - ### network-control Can configure networking which gives wide, privileged access to networking. @@ -410,6 +403,13 @@ networking information. * Auto-Connect: no +### network-setup-observe + +Can read network setup configuration files. This is restricted because it gives +access to system network configuration which can contain network security details. + +* Auto-Connect: no + ### ppp Can access Point-to-Point protocol daemon which gives privileged access to -- cgit v1.2.3 From 104585516c19d1d8a2c72eab9194b99dc527d583 Mon Sep 17 00:00:00 2001 From: Pete Woods Date: Fri, 23 Sep 2016 10:34:05 +0100 Subject: Document the API changes --- docs/rest.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs') diff --git a/docs/rest.md b/docs/rest.md index 0a3a3da048..0b23dd293a 100644 --- a/docs/rest.md +++ b/docs/rest.md @@ -120,6 +120,8 @@ kind | value description `two-factor-failed` | the OTP provided wasn't recognised `login-required` | the requested operation cannot be performed without an authenticated user. This is the kind of any other 401 Unauthorized response. `invalid-auth-data` | the authentication data provided failed to validate (e.g. a malformed email address). The `value` of the error is an object with a key per failed field and a list of the failures on each field. +`tos-not-accepted` | the user has not accepted the store's terms of service. +`no-payment-methods` | the user does not have a payment method registered to complete a purchase. ### Timestamps @@ -603,6 +605,15 @@ Generally the UUID of a background operation you are interested in. } ``` +## /v2/buy/ready + +### GET + +* Description: Determine if the user's account ready to make purchases. +* Access: authenticated +* Operation: sync +* Return: bool true, or error. + ## /v2/buy/methods ### GET -- cgit v1.2.3 From 6fffe028d8fafc622f4f3ec90bfedb57b603aa27 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 26 Sep 2016 10:19:05 +0200 Subject: add the actual ssh keys that got added to the create-user response --- docs/rest.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/rest.md b/docs/rest.md index 0a3a3da048..0b6c333b80 100644 --- a/docs/rest.md +++ b/docs/rest.md @@ -671,7 +671,7 @@ Generally the UUID of a background operation you are interested in. * Description: Create a local user * Access: trusted * Operation: sync -* Return: an object with the created username and the amount of imported ssh keys +* Return: an object with the created username, the ssh keys imported and the amount of imported ssh keys Sample input: @@ -686,6 +686,7 @@ Sample return: ```javascript { "username":"mvo", - "ssk-key-count": 2 + "ssh-keys": ["key1","key2"] + "ssk-key-count": 2, } ``` -- cgit v1.2.3 From d7cad47ddc3d0035855c52d93ea55992fb1badcd Mon Sep 17 00:00:00 2001 From: Pete Woods Date: Mon, 26 Sep 2016 12:11:47 +0100 Subject: respond to Gustavo's review comments - Rename errorKindTOSNotAccepted->errorKindTermsNotAccepted. - Use simple values in API test instead of function. - Update rest.md accordingly. --- docs/rest.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/rest.md b/docs/rest.md index 0b23dd293a..66624a8cd6 100644 --- a/docs/rest.md +++ b/docs/rest.md @@ -120,7 +120,7 @@ kind | value description `two-factor-failed` | the OTP provided wasn't recognised `login-required` | the requested operation cannot be performed without an authenticated user. This is the kind of any other 401 Unauthorized response. `invalid-auth-data` | the authentication data provided failed to validate (e.g. a malformed email address). The `value` of the error is an object with a key per failed field and a list of the failures on each field. -`tos-not-accepted` | the user has not accepted the store's terms of service. +`terms-not-accepted` | the user has not accepted the store's terms of service. `no-payment-methods` | the user does not have a payment method registered to complete a purchase. ### Timestamps @@ -612,7 +612,7 @@ Generally the UUID of a background operation you are interested in. * Description: Determine if the user's account ready to make purchases. * Access: authenticated * Operation: sync -* Return: bool true, or error. +* Return: true, or error. ## /v2/buy/methods -- cgit v1.2.3