Skip to content

Commit fe812aa

Browse files
committed
review chgs to README & authfmwork
1 parent 226f6d9 commit fe812aa

File tree

4 files changed

+17
-18
lines changed

4 files changed

+17
-18
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -137,23 +137,23 @@ The following free functions may be used to create the authentication secrets fi
137137
- `irods.client_init.write_native_irodsA_file`
138138
- `irods.client_init.write_pam_irodsA_file`
139139

140-
These functions can roughly be described as duplicating the function of `iinit`,
140+
These functions can roughly be described as duplicating the "authentication" functionality of `iinit`,
141141
provided that a valid `irods_environment.json` has already been created.
142142

143143
Each of the above functions can take a cleartext password and write an appropriately encoded
144-
version of it into an authentication in the appropriate location. That location is
144+
version of it into an authentication file in the appropriate location. That location is
145145
`~/.irods/.irodsA` unless the environment variable IRODS_AUTHENTICATION_FILE has been set
146146
in the command shell to dictate an alternative file path.
147147

148148
As an example, here we write a native `.irodsA` file using the first of the two functions. We
149-
provide the one required argument, a password string entered - in this case - interactively at the
149+
provide the one required argument, a password string which entered interactively at the
150150
terminal.
151151

152152
```bash
153-
bash$ echo '{ "irods_user_name":"rods",
154-
... # other parameters as needed
155-
}'> ~/.irods/irods_environment.json
156-
bash$ python -c "import irods.client_init, getpass
153+
$ echo '{ "irods_user_name":"rods",
154+
... # other parameters as needed
155+
}'> ~/.irods/irods_environment.json
156+
$ python -c "import irods.client_init, getpass
157157
irods.client_init.write_native_irodsA_file(getpass.getpass('Enter iRODS password -> '))"
158158
```
159159

@@ -164,22 +164,22 @@ is raised to warn of any older `.irodsA` file that might otherwise have been ove
164164
Equivalently to the above, we can issue the following command.
165165

166166
```bash
167-
bash$ prc_write_irodsA.py native <<<"${MY_CURRENT_IRODS_PASSWORD}"
167+
$ prc_write_irodsA.py native <<<"${MY_CURRENT_IRODS_PASSWORD}"
168168
```
169169

170170
The redirect may of course be left off, in which case the user is prompted for the iRODS password
171-
and echo of the keyboard input will be suppressed, in the style of `iinit`. Regardless
171+
and echo of the keyboard input will be suppressed, in the style of `iinit`. Regardless of
172172
which technique is used, no password will be visible on the terminal during or after input.
173173

174174
For the `pam_password` scheme, typically SSL/TLS must first be enabled to avoid sending data related
175175
to the password - or even sending the raw password itself - over a network connection in the clear.
176176

177-
Thus for `pam_password` authentication to work well, we should first ensure, when setting up the
177+
Thus, for `pam_password` authentication to work well, we should first ensure, when setting up the
178178
client environment, to include within `irods_environment.json` the appropriate SSL/TLS connection
179179
parameters. In a pinch, `iinit` can be used to verify this prerequisite is fulfilled,
180-
as its invocation would then create a valid .irodsA from merely prompting the user for their PAM password.
180+
as its invocation would then create a valid `.irodsA` from merely prompting the user for their PAM password.
181181

182-
Once again, this can also be done either using the free function directly:
182+
Once again, this can also be done using the free function directly:
183183

184184
```python
185185
irods.client_init.write_pam_irodsA_file(getpass.getpass('Enter current PAM password -> '))
@@ -188,10 +188,10 @@ irods.client_init.write_pam_irodsA_file(getpass.getpass('Enter current PAM passw
188188
or from the Bash command shell:
189189

190190
```bash
191-
bash$ prc_write_irodsA.py pam_password <<<"${MY_CURRENT_PAM_PASSWORD}"
191+
$ prc_write_irodsA.py pam_password <<<"${MY_CURRENT_PAM_PASSWORD}"
192192
```
193193

194-
As a final note, in the "pam_password" scheme the default SSL requirement can be disabled.
194+
As a final note, in the `pam_password` scheme, the default SSL requirement can be disabled.
195195
**Warning:** Disabling the SSL requirement may cause user passwords to be sent over the network
196196
in the clear. This should only be done for purposes of testing. Here's how to do it:
197197

irods/auth/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class AuthStorage:
2121
"""A class that facilitates flexible means password storage.
2222
23-
Using an instance of this class, passwords may either be
23+
Using an instance of this class, passwords may either be one of the following:
2424
2525
- directly placed in a member attribute (pw), or
2626
@@ -32,7 +32,6 @@ class AuthStorage:
3232
password is stored in RAM or in the filesystem depends on whether it was read
3333
originally as a function parameter or from an authentication file, respectively,
3434
when the session was created.
35-
3635
"""
3736

3837
@staticmethod

irods/auth/native.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
def login(conn, **extra_opt):
19-
"""When the Python iRODS client loads this(or any plugin) for authenticating a connection object,
19+
"""When the Python iRODS client loads this (or any) plugin for authenticating a connection object,
2020
login is the hook function that gets called.
2121
"""
2222
opt = {"user_name": conn.account.proxy_user, "zone_name": conn.account.proxy_zone}

irods/test/scripts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ now implemented in a development branch but slated for release in a later versio
66
of python-irodsclient. (See issue #502.)
77

88
Each BATS script is designed such that a "main" function is executed to assert
9-
the relevant test outcomes. In effect this is realized because BATS fails the
9+
the relevant test outcomes. In effect, this is realized because BATS fails the
1010
test if any individual command in the function fails.
1111

1212
The BATS tests are designed to be run by the recipe below:

0 commit comments

Comments
 (0)