Skip to content

Commit dd2f1e6

Browse files
authored
Correct default passwd file suffix ECFLOW-2056
2 parents d10768e + f270134 commit dd2f1e6

File tree

16 files changed

+729
-161
lines changed

16 files changed

+729
-161
lines changed

docs/client_api/api/reloadcustompasswdfile.rst

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,52 @@ The following help text is generated by :code:`ecflow_client --help=reloadcustom
2222
reloadcustompasswdfile
2323
----------------------
2424
25-
Reload the server custom password file. For those user's who don't use login name
26-
This should be used when most users use the machine login name, but a few users specify their own user name,
27-
in this case these user must provide a password.
28-
Although the password file can be reloaded(i.e to add/remove users), its location can't be changed
29-
The password file is located by the ECF_CUSTOM_PASSWD environment variable, both for the client and server
30-
On the server the default file name is <host>.<port>.ecf.custom_passwd
31-
On the client the default file name is ecf.custom_passwd
25+
Reload the server custom password file.
26+
27+
The custom password file (authentication) is used by the server to authenticate a 'user' by
28+
verifying if the password provided by the user matches the one held by the server. This
29+
particular file is used for authentication of users that explicitly specify the user name
30+
(either via the environment variable ECF_USER or the --user option).
31+
32+
This mechanism should be used when most users use the machine login name, but a few users
33+
specify their own user name, in which case the password must also be explicitly provided.
34+
35+
The file path is specified as the ECF_CUSTOM_PASSWD environment variable, both for the
36+
client and server, and is loaded only by the server on *startup*. This means that the file
37+
contents can be updated (i.e., add/remove users), but the file location cannot change during
38+
the server execution.
39+
40+
The server automatically loads the password file content as part of the startup procedure.
41+
42+
The ECF_CUSTOM_PASSWD environment variable is used to specify the password file location,
43+
considering that
44+
- On the server the default file name is <host>.<port>.ecf.custom_passwd
45+
- On the client the default file name is ecf.custom_passwd
46+
3247
The format of the file is same for client and server:
3348
49+
3450
4.5.0
3551
# comment
3652
<user> <host> <port> <passwd> # comment
3753
38-
i.e
54+
The following is an example
55+
3956
4.5.0 # the version
4057
fred machine1 3142 xxyyyd
4158
fred machine2 3133 xxyyyd # comment
4259
bill machine2 3133 xxyggyyd
4360
44-
The same user may appear multiple times. i.e with different host/port. This allows the password file
45-
to be used for multiple servers
46-
For the password authentication to work. It must be:
47-
- Defined for the client and server
48-
- Creating an empty password file,(i.e with just the version) will mean, no client can reload it.
49-
Hence at least the server administrator needs to be added to the file
50-
- The password file permission's must be set for reading by the user only
61+
Notice that the same user may appear multiple times (associated with different host/port).
62+
This allows the client to use the same password file to contact multiple servers.
63+
64+
For the password authentication to work, ensure the following:
65+
- The password is defined for the client and server
66+
- On the server, add at least the server administrator to the password file
67+
Note: If an empty password file (i.e., containing just the version) is used,
68+
no user is allowed access.
69+
- On the client, the password file should be readable only by the 'user' itself
70+
5171
Usage:
5272
--reloadcustompasswdfile
5373

docs/client_api/api/reloadpasswdfile.rst

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,52 @@ The following help text is generated by :code:`ecflow_client --help=reloadpasswd
2222
reloadpasswdfile
2323
----------------
2424
25-
Reload the server password file. To be used when ALL users have a password
26-
Although the password file can be reloaded(i.e to add/remove users), its location can't be changed
27-
The password file is located by the ECF_PASSWD environment variable, both for the client and server
28-
On the server the default file name is <host>.<port>.ecf.passwd
29-
On the client the default file name is ecf.passwd
25+
Reload the server password file.
26+
27+
The password file (authentication) is used by the server to authenticate a 'user' by
28+
verifying if the password provided by the user matches the one held by the server.
29+
The password file is also used on the client to automatically load the password for the
30+
'user' when connecting to the server.
31+
32+
When the server is configured to use a password file, then ALL users must have a password.
33+
34+
The file path is specified as the ECF_PASSWD environment variable, both for the client and
35+
server, and is loaded only by the server on *startup*. This means that the file contents
36+
can be updated (i.e., add/remove users), but the file location cannot change during the
37+
server execution.
38+
39+
The server automatically loads the password file content as part of the startup procedure.
40+
41+
The ECF_PASSWD environment variable is used to specify the password file location,
42+
considering that
43+
- On the server, the default file name is <host>.<port>.ecf.passwd
44+
- On the client, the default file name is ecf.passwd
45+
3046
The format of the file is same for client and server:
3147
48+
3249
4.5.0
3350
# comment
3451
<user> <host> <port> <passwd> # comment
3552
36-
i.e
53+
The following is an example
54+
3755
4.5.0 # the version
3856
fred machine1 3142 xxyyyd
3957
fred machine2 3133 xxyyyd # comment
4058
bill machine2 3133 xxyggyyd
4159
42-
The same user may appear multiple times. i.e with different host/port. This allows the password file
43-
to be used for multiple servers
44-
For the password authentication to work. It must be:
45-
- Defined for the client and server
46-
- Creating an empty password file,(i.e with just the version) will mean, no client can reload it.
47-
Hence at least the server administrator needs to be added to the file
48-
- The password file permission's must be set for reading by the user only
60+
61+
Notice that the same user may appear multiple times (associated with different host/port).
62+
This allows the client to use the same password file to contact multiple servers.
63+
64+
For the password authentication to work, ensure the following:
65+
- The password is defined for the client and server
66+
- On the server, add at least the server administrator to the password file
67+
Note: If an empty password file (i.e., containing just the version) is used,
68+
no user is allowed access.
69+
- On the client, the password file should be readable only by the 'user' itself
70+
4971
Usage:
5072
--reloadpasswdfile
5173

docs/client_api/api/reloadwsfile.rst

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,47 @@ The following help text is generated by :code:`ecflow_client --help=reloadwsfile
2323
------------
2424
2525
Reload the white list file.
26-
The white list file is used to authenticate 'user' commands.
27-
File path is specified by ECF_LISTS environment, read by the server on *startup*.
28-
Hence the contents of the file can be changed but not the location
29-
If ECF_LISTS is not specified, or is specified and is 'ecf.lists' then by default
30-
it will open <host>.<port>.ecf.lists.If a path like /var/tmp/ecf.lists was specified
31-
for ECF_LISTS, then this is the path used for reloading the white list file
32-
On startup, if the file is not present or is present but is empty (i.e just contains the version number)
33-
then all users have read/write access
34-
However on reload it will raises an error if file does not exist, or fails to parse
26+
27+
The white list file (authorisation) is used to verify if a 'user' is allowed to perform a
28+
specific command.
29+
30+
The file path is specified as the ECF_LISTS variable, and loaded only once by the server
31+
(on *startup*). This means that the file contents can be updated, but the file location
32+
cannot change during the server execution.
33+
34+
The ECF_LISTS variable can be used as follows:
35+
- if ECF_LISTS is not specified, or if it is specified with value `ecf.lists`,
36+
then the server will use the value `<host>.<port>.ecf.lists`
37+
- if ECF_LISTS is specified to be a path, such as /var/tmp/ecf.lists,
38+
then the server will use this path to reload the white list file
39+
40+
The server automatically loads the white list file content as part of the startup procedure,
41+
considering that if the file is not present or is empty (i.e., just contains the version
42+
number) then all users have read/write access.
43+
44+
The reload operation will fail if file does not exist or if the content is invalid.
45+
3546
Expected format for this file is:
3647
37-
# comment
38-
4.4.14 # version number, this must be present, even if no users specified
3948
49+
# all characters after the first # in a line are considered comments and are discarded
50+
# empty lines are also discarded
51+
52+
4.4.14 # the version number is mandatory, even if no users are specified
4053
# Users with read/write access
41-
user1 # comment
54+
user1
4255
user2 # comment
43-
4456
* # use this form if you want all users to have read/write access
4557
4658
# Users with read access, must have - before user name
4759
-user3 # comment
4860
-user4
49-
5061
-* # use this form if you want all users to have read access
5162
63+
64+
Usage:
65+
--reloadwsfile
66+
5267
The client considers, for both user and child commands, the following environment variables:
5368
5469
ECF_HOST <string> [mandatory*]

docs/client_api/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,11 @@ The list of commands, amongst other details, can be displayed by using the optio
231231

232232
* - :ref:`reloadcustompasswdfile_cli`
233233
- :term:`user command`
234-
- Reload the server custom password file. For those user's who don't use login name
234+
- Reload the server custom password file.
235235

236236
* - :ref:`reloadpasswdfile_cli`
237237
- :term:`user command`
238-
- Reload the server password file. To be used when ALL users have a password
238+
- Reload the server password file.
239239

240240
* - :ref:`reloadwsfile_cli`
241241
- :term:`user command`

0 commit comments

Comments
 (0)