Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Requesting as Guest

NameTypeNotes
name (for guest access)StringUsed to submit GOC ticket
email (for guest access)StringUsed to submit GOC ticket
phone (for guest access)StringUsed to submit GOC ticket
csrsArray of Stringsbase64 encoded pkcs10

...

Following sample shows how to make authenticated request (using port 443) using OIM registered user certificate. You do not need to provide name/email/phone for https request, since OIM will use the contact information stored in in OIM. Please substitute /home/hayashis/.globus with your user certificate.

Code Block
languagepython
 #!/usr/bin/python
-
import urllib
import httplib
import M2Crypto
ctx = M2Crypto.SSL.Context()
ctx.load_cert("/home/hayashis/.globus/soichi.2014.pem")
-
params = urllib.urlencode({
'csrs':  ["MIIC5DCCAcwCAQAwgZ4xCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdJbmRpYW5hMRQwEgYDVQQHEwtCbG9vbWluZ3RvbjEbMBkGA1UEChMSSW5kaWFuYSBVbml2ZXJzaXR5MQ0wCwYDVQQLEwRVSVRTMRswGQYDVQQDExJzb2ljaGkuZ3JpZC5pdS5lZHUxHjAcBgkqhkiG9w0BCQEWD2hheWFzaGlzQGl1LmVkdTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6TXTvVBUl2Rw1cLaJuF0zqOXxHmtizF/BRE16RxPS88AyAYgnMg5Aa+emqJXaMfeh2zXifoi0yPKsRJwztLrxSU8IXlzcUZ0mBEK+gzfK7GtFV5sRL4ecdYR1R9XVlj2iL0FpLknBJHQb9I7+WQ6rC9yhwKoH7Sm5EaNWo2ty4YVcarNw7pptizRVAUW972+jvcCNJWZyNJJtyKJOR0zkulYyXPohW5ovcT0hyCs9XTYNNg/O02fI1sEzEyOfoBNoHy06UH0L0xw9AkxwUmlzyZr+NB2OuhCEjm/QUefMgh+c8PFxbcW69M0lGR4A20ZJsd+2hui1Cz1wWfSIqqBMCAwEAAaAAMA0GCSqGSIb3DQEBBQUAA4IBAQC26RTFELEb0NhkmIarz/t1IciqbuYN1WIwfRpn5yIR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rYFhWbJIQzJib4WJ0e1M2FpFAuW6uyO9BCSXwliAdbUCh8TfyCoPfk/EHiSUnT3Yj2YDLof2Eh2v4cqhZv86AoA0rj5hlvCm/k8NMcKX2c4DrUQv5677oI0ah1gmpVfQPyrT49R6EREUmLWaJ34lgbRu/NaE0XKy8f11pll1cUBcC9AgqdLE3w09UobOpqQyPOzhiJAFIgj0FsmmO+VNu7ezROGuJZYdeMkNiNpmeDCltg=="]
}, True) #doseq
-
headers = {'Content-type': 'application/x-www-form-urlencoded', 'User-Agent': 'Test Client'}
conn = httplibM2Crypto.httpslib.HTTPSConnection("oim-itb.grid.iu.edu:443", keyssl_file="/home/hayashis/.globus/userkey.pem", cert_file="/home/hayashis/.globus/usercert.pem"context=ctx)
conn.set_debuglevel(1)
conn.request("POST", "/oim/rest?action=host_certs_request&version=1", params, headers)
response = conn.getresponse()
print response.status, response.reason
data = response.read()
conn.close()
print data

Output will look like following (python httplib will prompt for pem encryption password)

...