Skip to content

Commit d09b520

Browse files
committed
pp_inline.py test
1 parent b1e4159 commit d09b520

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

irods/test/scripts/pp_inline.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#was in irods/test/scripts
2+
from irods.session import iRODSSession
3+
from irods.test.login_auth_test_must_run_manually import pam_password_in_plaintext
4+
import irods.client_configuration as cfg
5+
6+
## -- Only for forcing 4.3 servers into obeying the old auth protocol & APIs
7+
# cfg.legacy_auth.force_legacy_auth = True
8+
9+
with iRODSSession(user = 'rods', password = 'rods',
10+
zone = 'tempZone', host = 'localhost', port = 1247) as adm:
11+
if adm.server_version_without_auth() < (4,3):
12+
SCHEME = "pam"
13+
else:
14+
SCHEME = "pam_password"
15+
16+
print (f'{SCHEME = }')
17+
18+
CLIENT_OPTIONS_FOR_SSL = {
19+
"irods_client_server_policy": "CS_NEG_REQUIRE",
20+
"irods_client_server_negotiation": "request_server_negotiation",
21+
"irods_ssl_ca_certificate_file": "/etc/irods/ssl/irods.crt",
22+
"irods_ssl_verify_server": "cert",
23+
"irods_encryption_key_size": 16,
24+
"irods_encryption_salt_size": 8,
25+
"irods_encryption_num_hash_rounds": 16,
26+
"irods_encryption_algorithm": "AES-256-CBC",
27+
}
28+
29+
options = {}
30+
31+
#options.update(CLIENT_OPTIONS_FOR_SSL)
32+
33+
ses = iRODSSession(
34+
user = 'alice', password = 'test123', zone = 'tempZone',
35+
host = 'localhost', port = 1247,
36+
authentication_scheme = SCHEME,
37+
**options
38+
)
39+
with pam_password_in_plaintext():
40+
pass
41+
#if 0:
42+
c = ses.collections.get("/tempZone/home/alice")
43+
print(c.path)

0 commit comments

Comments
 (0)