Using secured connections

From i2Rest
Revision as of 13:05, 29 June 2020 by Pavel.lobko (talk | contribs)
Jump to: navigation, search

i2Rest Server uses standard IBM i GSK API to protect connections. All required parameters are configured using DCM, see detailed guide.
Basic configuration SSL secured variant(differences are highlighted in blue):

{
   "gates":
   {
      "main"       : {"url":"https://<host_name>[:port](for example api.i2rest.com:1234), "dcm_server_id":"MYSERVER" "},
      "management" : {"url":"http://<host_name>[:port] (for example api.i2rest.com:4321)"}
   },
   "session_systems":
   [
      {  "name"   : "*ANONYMOUS", 
         "submit" : "SBMJOB JOB(I2RESTA)                \
                            USER(${user})               \
                            CMD(CALL I2REST             \
                               PARM('-session'          \
                                    '-url' '${surl}'    \
                                    '-uid' '${uid}'     \
          '-dcm_client_id' 'MYCLIENT' \                    \
                                    '-user' '${user}')) \
                            INLLIBL(I2REST)"
      }
   ],
   "pcmls":
   [
      {
         "pcml_mount"         : "echo",
         "pcml_file"          : "<complete name of i2restecho.pcml on IFS (for example /tmp/PCML/i2restecho.pcml)>", 
         "valid_in_anonymous" : true
      }
   ]
}