comparison doc/jp/profile.rst @ 3041:72583524cfd3

doc (jp): jp commands are now fully documented: rel 232
author Goffi <goffi@goffi.org>
date Tue, 01 Oct 2019 22:49:06 +0200
parents
children d6f903c59a56
comparison
equal deleted inserted replaced
3040:fee60f17ebac 3041:72583524cfd3
1 =============================
2 profile: SàT profile handling
3 =============================
4
5 Profiles are the names associated with accounts in SàT, for more informations you can
6 check :ref:`glossary`. The `profile` commands help you create/delete/modify and manage
7 profiles.
8
9
10 connect
11 =======
12
13 Unsurprisingly this command connects your profile, i.e. log-in your XMPP account. This
14 command uses :ref:`jp-common_profile` common commands, so you can use either ``-c,
15 --connect`` to connect to XMPP server, or ``--start-session`` if you want to start SàT
16 profile session without connecting to XMPP server (for instance if you want to modify
17 parameters without connecting to XMPP server).
18
19 Note that :ref:`jp-common_profile` common commands are available in commands needing a
20 connected profile, ``jp profile connect`` is interesting if you only want to connect your
21 profile/start a session.
22
23 example
24 -------
25
26 Connect the default profile::
27
28 $ jp profile connect -c
29
30
31 disconnect
32 ==========
33
34 Disconnect your profile from XMPP server. There is no option beside the
35 :ref:`jp-common_profile` common options.
36
37 example
38 -------
39
40 Disconnect the profile ``pierre``::
41
42 $ jp profile disconnect -p pierre
43
44
45 create
46 ======
47
48 Create a new SàT profile. The only mandatory argument is the profile name, but you'll
49 probably want to associate an XMPP jid with ``-j JID, --jid JID`` and a profile password
50 with ``-p PASSWORD, --password PASSWORD``. By default, profile password will be used for
51 XMPP password (see note below), but you may specify XMPP password with ``-x PASSWORD,
52 --xmpp-password PASSWORD``.
53
54 SàT is also capable to manage components, which can be seen as XMPP server independent
55 plugins. To create a component profile, you'll have to use ``-C COMPONENT, --component
56 COMPONENT`` where ``COMPONENT`` is the component entry point (check the documentation of
57 the component that you want to use to get its entry point).
58
59 .. note::
60
61 profile password and XMPP password are not the same: the profile password is the
62 password of your SàT profile, while the XMPP password is the one checked by your XMPP
63 server. If specify a jid with ``--jid`` and you don't specify an XMPP password, the
64 profile password will be used by default.
65
66 The reason to have distinct password is that you may use a different password for
67 profile, including an empty one if you want SàT to connect your profile without
68 having to enter a password. Also the XMPP password is encrypted in database using the
69 profile password (which is not stored in database, only a hash is kept).
70
71
72 .. note::
73
74 passwords in jp are currently specified directly on the command-line and not prompted,
75 this is not safe from a security point of view as people can see it on the screen, it
76 may stay in your shell history, or visible on process list. Keep that in mind if you're
77 in a public environment or on a public machine. This will be improved for SàT 0.8.
78
79 examples
80 --------
81
82 Nestor wants to create a profile for its account on ``example.org``, he specifies a
83 profile password only, so it will also be used as the XMPP password::
84
85 $ jp profile create nestor -j nestor@example.org -p some_password
86
87 Create a component profile for the file sharing component (whose entry point is
88 ``file_sharing``). The jid of the service is specified with ``--jid`` (note that we don't
89 use a node as it is a jid of a component) and the ``--xmpp-password`` is the shared
90 secret. Here the profile password is kept empty to not have to enter manually the XMPP
91 password each time we connect the service::
92
93 $ jp profile create file_sharing -j files.example.org -p "" --xmpp-password
94 some_shared_secret -C file_sharing
95
96
97 default
98 =======
99
100 This command simply prints the default profile (i.e. the profile used when none is
101 specified with ``-p PROFILE, --profile PROFILE``). The default profile is either the first
102 one that you've created, or the one you have explicitly set as default.
103
104 example
105 -------
106
107 Print default profile::
108
109 $ jp profile default
110
111
112 delete
113 ======
114
115 Delete a profile and all its associated data. This delete the SàT profile and associated
116 data (i.e. local data), but doesn't request the XMPP server to delete anything.
117
118 By default a confirmation is requested, use ``-f, --force`` to avoid it (be cautious with
119 this option).
120
121 example
122 -------
123
124 Delete the profile of Pierre::
125
126 $ jp profile delete pierre
127
128
129 info
130 ====
131
132 Display information on a profile. For now, only the registered jid is shown, and
133 optionally the XMPP password. To display the XMPP password, use ``--show-password`` but be
134 careful that nobody can see your screen, as **this password will be shown in clear text**.
135
136 example
137 -------
138
139 Show jid and XMPP password for default profile::
140
141 $ jp profile info --show-password
142
143
144 list
145 ====
146
147 Show all profiles. You can use ``-c, --clients`` to show only client profiles, and ``-C,
148 --components`` to show only component profiles.
149
150 example
151 -------
152
153 Show all profiles::
154
155 $ jp profile list
156
157
158 modify
159 ======
160
161 Update an existing profile. You can use this command to change profile password (with ``-w
162 PASSWORD, --password PASSWORD``) or even disable it (with ``--disable-password``, this is
163 equivalent to using an empty profile password ; be cautious with this option, see the note
164 below).
165
166 With ``-j JID, --jid JID`` and ``-x PASSWORD, --xmpp-password PASSWORD`` you can change
167 XMPP jid and password.
168
169 This command can also be used to select the default password, use the ``-D, --default``
170 flag for that.
171
172 .. note::
173
174 Be cautious with ``--disable-password`` that means that no password will be needed with
175 any frontend of SàT to use this profile, and that XMPP password will be easy to
176 retrieve for anybody having an access to the machine where SàT is installed
177
178 examples
179 --------
180
181 Pierre has changed server, he can update his jid and password like this::
182
183 $ jp profile modify -p pierre -j pierre@example.org -x new_password
184
185 Use ``louise`` as default profile::
186
187 $ jp profile modify -p louise -D
188
189 Disable profile password for default profile (be cautious, see the note above)::
190
191 $ jp profile modify --disable-password