@@ -162,6 +162,47 @@ the `encryption_*` and `ssl_*` options
162
162
directly to the constructor as keyword arguments, even though it is
163
163
required when they are placed in the environment file.
164
164
165
+ Creating PAM or Native Credentials File (.irodsA)
166
+ -------------------------------------------------
167
+
168
+ Two free functions exist for creating encoded authentication files:
169
+ ```
170
+ irods.client_init.write_native_credentials_to_secrets_file
171
+ irods.client_init.write_pam_credentials_to_secrets_file
172
+ ```
173
+
174
+ Each takes a cleartext password and writes an appropriately processed version of it
175
+ into an .irodsA (secrets) file in the login environment.
176
+
177
+ Note, in the ` pam_password ` case, this involves sending the cleartext password
178
+ to the server (SSL should thus be enabled!) and then writing the scrambled token that
179
+ returns from the transaction.
180
+
181
+ If an .irodsA file exists already, it will be overwritten.
182
+
183
+ Examples:
184
+ For the ` native ` authentication scheme, we can use the currently set iRODS password to create .irodsA file from Python thus:
185
+
186
+ ``` python
187
+ import irods.client_init as iinit
188
+ iinit.write_native_credentials_to_secrets_file(irods_password)
189
+ ```
190
+
191
+ For the ` pam_password ` authentication scheme, we must first ensure an ` irods_environment.json ` file exists in the
192
+ client environment (necessary for establishing SSL/TLS connection parameters as well as obtaining a PAM token from the server after connecting)
193
+ and then make the call to write .irodsA using the Bash commands:
194
+
195
+ ``` bash
196
+ $ cat > ~ /.irods/irods_environment.json << EOF
197
+ {
198
+ "irods_user_name":"rods",
199
+ "irods_host":"server-hostname",
200
+ ... [all other connection settings, including SSL parameters, needed for communication with iRODS] ...
201
+ }
202
+ EOF
203
+ $ python -c " import irods.client_init as iinit; iinit.write_pam_credentials_to_secrets_file(pam_cleartext_password)"
204
+ ```
205
+
165
206
PAM logins
166
207
----------
167
208
@@ -171,6 +212,16 @@ iCommands.
171
212
Caveat for iRODS 4.3+: when upgrading from 4.2, the "irods_authentication_scheme" setting must be changed from "pam" to "pam_password" in
172
213
` ~/.irods/irods_environment.json ` for all file-based client environments.
173
214
215
+ To use the PRC PAM login credentials update function for the client login environment, we can set these two configuration variables:
216
+
217
+ ```
218
+ legacy_auth.pam.password_for_auto_renew "my_pam_password"
219
+ legacy_auth.pam.store_password_to_environment True
220
+ ```
221
+
222
+ Optionally, the ` legacy_auth.pam.time_to_live_in_hours ` may also be set to determine the time-to-live for the new password.
223
+ Leaving it at the default value defers this decision to the server.
224
+
174
225
Maintaining a connection
175
226
------------------------
176
227
0 commit comments