From 202006149c208a2bb5bb2b90ef5caca8f7abf408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 22 Oct 2018 17:38:48 +0200 Subject: [PATCH] forcelogin: documentation, incl. newly added hooks --- docs/api/general.rst | 91 ++++++++++++++++++ docs/api/push.rst | 46 ++++++--- docs/bundledplugins/forcelogin.rst | 35 +++++++ docs/bundledplugins/index.rst | 1 + .../bundledplugins-forcelogin-dialog.png | Bin 0 -> 9808 bytes docs/plugins/hooks.rst | 39 ++++++++ 6 files changed, 198 insertions(+), 14 deletions(-) create mode 100644 docs/bundledplugins/forcelogin.rst create mode 100644 docs/images/bundledplugins-forcelogin-dialog.png diff --git a/docs/api/general.rst b/docs/api/general.rst index cc1cd0a72..7600cc80c 100644 --- a/docs/api/general.rst +++ b/docs/api/general.rst @@ -120,3 +120,94 @@ If CORS is not enabled you will get errors like the following:: XMLHttpRequest cannot load http://localhost:8081/api/files. No 'Access-Control-Allow-Origin' header is present on the requested resource. +.. _sec-api-general-login: + +Login +===== + +.. http:post:: /api/login + + Creates a login session or retrieves information about the currently existing session ("passive login"). + + Can be used in one of two ways: to login a user via username and password and create a persistent session (usually + from a UI in the browser), or to retrieve information about the active user (from an existing session or an API key) + via the ``passive`` flag. + + Will return a :http:statuscode:`200` with a :ref:`login response ` on successful + login, whether active or passive. The active (username/password) login may also return a :http:statuscode:`401` in + case of a username/password mismatch or unknown user and a :http:statuscode:`403` in case of a deactivated account. + + :json passive: If present, performs a passive login only, returning information about the current user that's + active either through an existing session or the used API key + :json user: (active login only) Username + :json pass: (active login only) Password + :json remember: (active login only) Whether to set a "remember me" cookie on the session + :status 200: Successful login + :status 401: Username/password mismatch or unknown user + :status 403: Deactivated account + +.. _sec-api-general-logout: + +Logout +====== + +.. http:post:: /api/logout + + Ends the current login session of the current user. + + Only makes sense in the context of browser based workflows. + + Will return a :http:statuscode:`204`. + + :status 204: No error + +.. _sec-api-general-datamodel: + +Data model +========== + +.. _sec-api-general-datamodel-login: + +Login response +-------------- + +.. list-table:: + :widths: 15 5 10 30 + :header-rows: 1 + + * - Name + - Multiplicity + - Type + - Description + * - ``name`` + - 1 + - string + - the user's name + * - ``active`` + - 1 + - boolean + - Whether the user's account is active or not + * - ``admin`` + - 1 + - boolean + - Whether the user has admin rights or not + * - ``user`` + - 1 + - boolean + - Whether the user has user rights or not (always ``true``) + * - ``apikey`` + - 1 + - string or None + - The user's API key, if set + * - ``settings`` + - 1 + - dict + - The user's settings, if any + * - ``session`` + - 1 + - string + - The session key, can be used to authenticate with the ``auth`` message on the :ref:`push API `. + * - ``_is_external_client`` + - 1 + - boolean + - Whether the client that made the request got detected as external from the local network or not. diff --git a/docs/api/push.rst b/docs/api/push.rst index 7d8813867..83fe2a486 100644 --- a/docs/api/push.rst +++ b/docs/api/push.rst @@ -47,23 +47,41 @@ Clients must ignore any unknown messages. The data model of the attached payloads is described further below. -OctoPrint's SockJS socket also accepts one command from the client to the server, -the ``throttle`` command. Usually, OctoPrint will push the general state update -in the ``current`` message twice per second. For some clients that might still -be too fast, so they can signal a different factor to OctoPrint utilizing the -``throttle`` message. OctoPrint expects a single integer here which represents -the multiplier for the base rate limit of one message every 500ms. A value of -1 hence will produce the default behaviour of getting every update. A value of -2 will set the rate limit to maximally one message every 1s, 3 to maximally one -message every 1.5s and so on. +OctoPrint's SockJS socket also accepts two commands from the client to the server. -Example for a ``throttle`` client-server-message: + * ``auth`` (since 1.3.10): With the ``auth`` message, clients may associate an + existing user session with the socket. That is of special importance to receive + any kind of messages if the bundled :ref:`Forcelogin Plugin ` is enabled + (as it is by default), since it will prevent any kind of status messages to be sent to connected unauthenticated + clients. -.. sourcecode:: javascript + The ``auth`` message expects a session key to be obtained from the successful payload of a + :ref:`(passive or active) login via the API `. - { - "throttle": 2 - } + Example for a ``auth`` client-server-message: + + .. sourcecode:: javascript + + { + "auth": "LGZ0trf8By" + } + + * ``throttle``: Usually, OctoPrint will push the general state update + in the ``current`` message twice per second. For some clients that might still + be too fast, so they can signal a different factor to OctoPrint utilizing the + ``throttle`` message. OctoPrint expects a single integer here which represents + the multiplier for the base rate limit of one message every 500ms. A value of + 1 hence will produce the default behaviour of getting every update. A value of + 2 will set the rate limit to maximally one message every 1s, 3 to maximally one + message every 1.5s and so on. + + Example for a ``throttle`` client-server-message: + + .. sourcecode:: javascript + + { + "throttle": 2 + } .. _sec-api-push-datamodel: diff --git a/docs/bundledplugins/forcelogin.rst b/docs/bundledplugins/forcelogin.rst new file mode 100644 index 000000000..bb69c35c9 --- /dev/null +++ b/docs/bundledplugins/forcelogin.rst @@ -0,0 +1,35 @@ +.. _sec-bundledplugins-forcelogin: + +Forcelogin Plugin +================= + +The Forcelogin Plugin comes bundled with OctoPrint (starting with version 1.3.10). It removes the anonymous +read-only access that up until 1.3.10 was standard when accessing OctoPrint instances without being logged in and +instead forces users to log in if they want to get any kind of information from OctoPrint. + +.. _fig-bundledplugins-forcelogin: +.. figure:: ../images/bundledplugins-forcelogin-dialog.png + :align: center + :alt: Forced login dialog + + OctoPrint's new forced login dialog. + +.. warning:: + + Keep in mind that **OctoPrint does not manage your webcam**, it merely embeds it. If you have a webcam, + it will still be accessible to users who are not logged in under its (guessable) URL. If you need to restrict + access to your webcam, you'll need to find a way to do so directly on the webcam server which - again - + is not OctoPrint itself. + +.. note:: + + If you want back the old behaviour of allowing anonymous read-only access to your OctoPrint instance, disable + the Forcelogin Plugin in OctoPrint's plugin manager. + +.. _sec-bundledplugins-forcelogin-sourcecode: + +Source code +----------- + +The source of the Backup plugin is bundled with OctoPrint and can be found in +its source repository under ``src/octoprint/plugins/forcelogin``. diff --git a/docs/bundledplugins/index.rst b/docs/bundledplugins/index.rst index ec90f709c..a1683a800 100644 --- a/docs/bundledplugins/index.rst +++ b/docs/bundledplugins/index.rst @@ -12,6 +12,7 @@ Bundled Plugins backup.rst cura.rst discovery.rst + forcelogin.rst logging.rst pluginmanager.rst printer_safety_check.rst diff --git a/docs/images/bundledplugins-forcelogin-dialog.png b/docs/images/bundledplugins-forcelogin-dialog.png new file mode 100644 index 0000000000000000000000000000000000000000..8508cb6d4edbb00ccdb72a1ba813e347da63ca7b GIT binary patch literal 9808 zcmdsdcTkhvws#C5RjPm}NTe!NieRXb-UN{vDM2A1(v(E$!H5k+3?N{nDMdt)j&x8F z2whNmm);Da1qhJ)0PlI{+&MGfH+Rl_XYPD|WHQ;$-uu~mmEZcUl@)%)RR0*$NhS~o zbj;8|=PC$vgaCY88IA%YbEQmZ;OhwLs=gK|x1E0u_(AJ->GCBIsNeM3HiLru3DB$cH0r{g&9X-00Fg6XCj?R;T>FL0`dbC%m7VXKZ z;#sE2FRj^LhKjWR6Y>NGw&I1B1(MR6d|o)$#F2yz6p^9ZK$5(WlsGGozav9zFNUhv!%Fe7M8mbU9H zEhp#;f+0iu|AP%e7+r{5%*gR?&7Sr>Qf+=Y@#|)vjfr0j{2$(kh}v?hWO3Pzv zgbSq9PX$vj|9%svccGzIlmWT*I74EUnw#AMkvA39uCRcikJt_FyJKN0#d|dPqPcKK z!#q*O$>Um(Bk$cwANAS?ppJkDP5Rul8V$|%IMjJKTidO^UdQ&dZZRkd&TCa zYmc{!o)CCB5+z+odh6>0g5!|l3fnOCe?VEWods$I~H6v0Gn)Nx^${Ly*Z zJ=C{4r^YK=QLopo%W}BG7V3j(-wu)XVDSkmP{ccX_IIZS6H$Rp^vW2#zChDFyX!QBGp`=)??gy81XQTIXz<>EWtuF#^_yIKBQk-cK*vknO_v z6%WNZXpuuMG2W?sKl>^$$(QTeH!%f69y4#@;Zw|#X-p13qbtN`{0Q3-ME&-Ll0hlW zbdJ>!WjMLCzpQ7cwNR(93&y&LJ0=-Ji7PelQ5!_8MYtgIQJ0aLGrG^Sci)}ENxp7w zP$l}JLT`##GGNg+tLc0vt7;6~VsnbWyKE^usjK!i@o(*{D}-JMP|h6?QSW@h7Rh4J zJJHtE^!cXmLW1<1bBQP0pU&r8fZZ^corai}xOS5M`x-tM1~gZMBu>)Qv@E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we7{iJ*(2e7z?R$j|Y4=9YS9RYH!QJ{PbqWe#l-v8~|8vq^qJuN`FYZCzmfpR;c z@EKR|9N{cZ+$`lK(9ZINDh&dSo!swF5yM6O65Rgr1D6Cv>6s?0)Jp&jBs6H5p8YlZ ztti5>j#X!gwN%V<>f8Br9xX=D`Q6!}kEq*jOPI@<7uLJ4a{o=kjvLWOFP) qcax<4SGF7dd;L&1q7x>mG@GkAN1q&*1RB0TAVXbKom?%a2mb{^KK8}{ literal 0 HcmV?d00001 diff --git a/docs/plugins/hooks.rst b/docs/plugins/hooks.rst index b97d8ff8f..4d20367da 100644 --- a/docs/plugins/hooks.rst +++ b/docs/plugins/hooks.rst @@ -1238,6 +1238,45 @@ octoprint.server.http.routes :return: a list of 3-tuples with additional routes as defined above :rtype: list +.. _sec-plugins-hook-server-sockjs-register: + +octoprint.server.sockjs.register +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. py:function:: socket_registration_hook(socket, user, *args, **kwargs): + + Allows plugins to prevent a new :ref:`push socket client ` to be registered to the system. + + Handlers should return either ``True`` or ``False``. ``True`` signals to proceed with normal registration. ``False`` + signals to not register the client. + + See the bundled :ref:`Forcelogin Plugin ` for an example on how to utilize this. + + :param object socket: the socket object which is about to be registered + :param object user: the user currently authenticated on the socket - might be None + :return: whether to proceed with registration (``True``) or not (``False``) + :rtype: boolean + +.. _sec-plugins-hook-server-sockjs-emit: + +octoprint.server.sockjs.emit +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. py:function:: socket_emit_hook(socket, user, message, payload, *args, **kwargs): + + Allows plugins to prevent any messages to be emitted on an existing :ref:`push connection `. + + Handlers should return either ``True`` to allow the message to be emitted, or ``False`` to prevent it. + + See the bundled :ref:`Forcelogin Plugin ` for an example on how to utilize this. + + :param object socket: the socket object on which a message is about to be emitted + :param object user: the user currently authenticated on the socket - might be None + :param string message: the message type about to be emitted + :param dict payload: the payload of the message about to be emitted (may be None) + :return: whether to proceed with sending the message (``True``) or not (``False``) + :rtype: boolean + .. _sec-plugins-hook-timelapse-extensions: octoprint.timelapse.extensions