Add Server SSL keyfile option + Def to listen interface

dev-linux
Ivan Maslov 4 years ago
parent fed27536d6
commit dff69296e8

@ -24,13 +24,8 @@ elif __name__ == "__main__": # New init way - allow run as module -m PyOpenRPA.O
# TEST Add Supertoken for the all access between robots
Orchestrator.UACSuperTokenUpdate(inGSettings=gSettings, inSuperTokenStr="1992-04-03-0643-ru-b4ff-openrpa52zzz")
# Add 2 interfaces!
gSettings["ServerDict"]["ListenDict"]["Int2"]={
"AddressStr":"",
"PortInt":8080,
"CertFilePEMPathStr":"test.pem",
"ServerInstance": None
}
# Add first interface!
Orchestrator.WebListenCreate(inGSettings=gSettings)
# Restore DUMP
Orchestrator.OrchestratorSessionRestore(inGSettings=gSettings)

@ -463,6 +463,7 @@ def Update(inGSettings):
"AddressStr": "",
"PortInt": lPortInt,
"CertFilePEMPathStr": None,
"KeyFilePathStr": None,
"ServerInstance": None
}
}

@ -540,7 +540,9 @@ class RobotDaemonServer(Thread):
lAddressStr=lServerDict["AddressStr"]
lPortInt=lServerDict["PortInt"]
lCertFilePathStr = lServerDict["CertFilePEMPathStr"]
lKeyFilePathStr = lServerDict["KeyFilePathStr"]
if lCertFilePathStr == "": lCertFilePathStr = None
if lKeyFilePathStr == "": lKeyFilePathStr = None
# Server settings
# Choose port 8080, for port 80, which is normally used for a http server, you need root access
server_address = (lAddressStr, lPortInt)
@ -548,6 +550,9 @@ class RobotDaemonServer(Thread):
#httpd.serve_forever()
httpd = ThreadedHTTPServer(server_address, testHTTPServer_RequestHandler)
if lCertFilePathStr is not None:
if lKeyFilePathStr is not None:
httpd.socket = ssl.wrap_socket(httpd.socket, server_side=True, certfile=lCertFilePathStr, keyfile=lKeyFilePathStr)
else:
httpd.socket = ssl.wrap_socket(httpd.socket, server_side=True, certfile=lCertFilePathStr)
if lL: lL.info(f"Web Server init (with SSL). Name: {self.name}, Listen URL: {lAddressStr}, Listen port: {lPortInt}, Cert path: {lCertFilePathStr}")
else:

@ -45,12 +45,13 @@ def __Create__():
"WorkingDirectoryPathStr": None, # Will be filled automatically
"RequestTimeoutSecFloat": 300, # Time to handle request in seconds,
"ListenDict": { # Prototype
"Default":{
"AddressStr":"",
"PortInt":80,
"CertFilePEMPathStr":"",
"ServerInstance": None
}
#"Default":{
# "AddressStr":"",
# "PortInt":80,
# "CertFilePEMPathStr":None,
# "KeyFilePathStr":None,
# "ServerInstance": None
#}
},
"AccessUsers": { # Default - all URL is blocked
"FlagCredentialsAsk": True, # Turn on Authentication

@ -577,6 +577,27 @@ def WebURLConnectFile(inGSettings, inMethodStr, inURLStr, inMatchTypeStr, inFile
}
inGSettings["ServerDict"]["URLList"].append(lURLItemDict)
def WebListenCreate(inGSettings, inServerKeyStr="Default", inAddressStr="", inPortInt=80, inCertFilePEMPathStr=None, inKeyFilePathStr=None):
"""
Create listen interface for the web server
:param inGSettings: Global settings dict (singleton)
:param inAddressStr: IP interface to listen
:param inPortInt: Port int to listen for HTTP default is 80; for HTTPS default is 443
:param inCertFilePEMPathStr: Path to .pem (base 64) certificate. Required for SSL connection. ATTENTION - do not use certificate with password
:param inKeyFilePathStr: Path to the private key file
:return:
"""
inGSettings["ServerDict"]["ListenDict"][inServerKeyStr]={
"AddressStr":inAddressStr,
"PortInt":inPortInt,
"CertFilePEMPathStr":inCertFilePEMPathStr,
"KeyFilePathStr":inKeyFilePathStr,
"ServerInstance": None
}
def WebCPUpdate(inGSettings, inCPKeyStr, inHTMLRenderDef=None, inJSONGeneratorDef=None, inJSInitGeneratorDef=None):
"""
Add control panel HTML, JSON generator or JS when page init

@ -417,22 +417,25 @@
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebCPUpdate" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebCPUpdate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebCPUpdate</span></code></a>(inGSettings, inCPKeyStr[, …])</p></td>
<td><p>Add control panel HTML, JSON generator or JS when page init</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectDef" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectDef"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebURLConnectDef</span></code></a>(inGSettings, inMethodStr, …)</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebListenCreate" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebListenCreate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebListenCreate</span></code></a>(inGSettings[, …])</p></td>
<td><p>Create listen interface for the web server</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectDef" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectDef"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebURLConnectDef</span></code></a>(inGSettings, inMethodStr, …)</p></td>
<td><p>Connect URL to DEF</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFile" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebURLConnectFile</span></code></a>(inGSettings, inMethodStr, …)</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFile" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebURLConnectFile</span></code></a>(inGSettings, inMethodStr, …)</p></td>
<td><p>Connect URL to File</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFolder" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFolder"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebURLConnectFolder</span></code></a>(inGSettings, …)</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFolder" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFolder"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebURLConnectFolder</span></code></a>(inGSettings, …)</p></td>
<td><p>Connect URL to Folder</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserInfoGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebUserInfoGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebUserInfoGet</span></code></a>(inRequest)</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserInfoGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebUserInfoGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebUserInfoGet</span></code></a>(inRequest)</p></td>
<td><p>Return User info about request</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserIsSuperToken" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebUserIsSuperToken"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebUserIsSuperToken</span></code></a>(inRequest, inGSettings)</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserIsSuperToken" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebUserIsSuperToken"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebUserIsSuperToken</span></code></a>(inRequest, inGSettings)</p></td>
<td><p>Return bool if request is authentificated with supetoken (token which is never expires)</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserUACHierarchyGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebUserUACHierarchyGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebUserUACHierarchyGet</span></code></a>(inRequest)</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserUACHierarchyGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebUserUACHierarchyGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebUserUACHierarchyGet</span></code></a>(inRequest)</p></td>
<td><p>Return User UAC Hierarchy DICT Return {…}</p></td>
</tr>
</tbody>
@ -1805,6 +1808,26 @@ Var 2 (Backward compatibility): inGSettings, inRDPSessionKeyStr, inHostStr, inPo
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.WebListenCreate">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">WebListenCreate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inGSettings</span></em>, <em class="sig-param"><span class="n">inServerKeyStr</span><span class="o">=</span><span class="default_value">'Default'</span></em>, <em class="sig-param"><span class="n">inAddressStr</span><span class="o">=</span><span class="default_value">''</span></em>, <em class="sig-param"><span class="n">inPortInt</span><span class="o">=</span><span class="default_value">80</span></em>, <em class="sig-param"><span class="n">inCertFilePEMPathStr</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inKeyFilePathStr</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebListenCreate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebListenCreate" title="Permalink to this definition"></a></dt>
<dd><p>Create listen interface for the web server</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inGSettings</strong> Global settings dict (singleton)</p></li>
<li><p><strong>inAddressStr</strong> IP interface to listen</p></li>
<li><p><strong>inPortInt</strong> Port int to listen for HTTP default is 80; for HTTPS default is 443</p></li>
<li><p><strong>inCertFilePEMPathStr</strong> Path to .pem (base 64) certificate. Required for SSL connection. ATTENTION - do not use certificate with password</p></li>
<li><p><strong>inKeyFilePathStr</strong> Path to the private key file</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectDef">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">WebURLConnectDef</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inGSettings</span></em>, <em class="sig-param"><span class="n">inMethodStr</span></em>, <em class="sig-param"><span class="n">inURLStr</span></em>, <em class="sig-param"><span class="n">inMatchTypeStr</span></em>, <em class="sig-param"><span class="n">inDef</span></em>, <em class="sig-param"><span class="n">inContentTypeStr</span><span class="o">=</span><span class="default_value">'application/octet-stream'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebURLConnectDef"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectDef" title="Permalink to this definition"></a></dt>

@ -232,12 +232,13 @@
<span class="s2">&quot;WorkingDirectoryPathStr&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Will be filled automatically</span>
<span class="s2">&quot;RequestTimeoutSecFloat&quot;</span><span class="p">:</span> <span class="mi">300</span><span class="p">,</span> <span class="c1"># Time to handle request in seconds,</span>
<span class="s2">&quot;ListenDict&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Prototype</span>
<span class="s2">&quot;Default&quot;</span><span class="p">:{</span>
<span class="s2">&quot;AddressStr&quot;</span><span class="p">:</span><span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="s2">&quot;PortInt&quot;</span><span class="p">:</span><span class="mi">80</span><span class="p">,</span>
<span class="s2">&quot;CertFilePEMPathStr&quot;</span><span class="p">:</span><span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="s2">&quot;ServerInstance&quot;</span><span class="p">:</span> <span class="kc">None</span>
<span class="p">}</span>
<span class="c1">#&quot;Default&quot;:{</span>
<span class="c1"># &quot;AddressStr&quot;:&quot;&quot;,</span>
<span class="c1"># &quot;PortInt&quot;:80,</span>
<span class="c1"># &quot;CertFilePEMPathStr&quot;:None,</span>
<span class="c1"># &quot;KeyFilePathStr&quot;:None,</span>
<span class="c1"># &quot;ServerInstance&quot;: None</span>
<span class="c1">#}</span>
<span class="p">},</span>
<span class="s2">&quot;AccessUsers&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Default - all URL is blocked</span>
<span class="s2">&quot;FlagCredentialsAsk&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Turn on Authentication</span>

@ -219,13 +219,8 @@
<span class="c1"># TEST Add Supertoken for the all access between robots</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">UACSuperTokenUpdate</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">gSettings</span><span class="p">,</span> <span class="n">inSuperTokenStr</span><span class="o">=</span><span class="s2">&quot;1992-04-03-0643-ru-b4ff-openrpa52zzz&quot;</span><span class="p">)</span>
<span class="c1"># Add 2 interfaces!</span>
<span class="n">gSettings</span><span class="p">[</span><span class="s2">&quot;ServerDict&quot;</span><span class="p">][</span><span class="s2">&quot;ListenDict&quot;</span><span class="p">][</span><span class="s2">&quot;Int2&quot;</span><span class="p">]</span><span class="o">=</span><span class="p">{</span>
<span class="s2">&quot;AddressStr&quot;</span><span class="p">:</span><span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="s2">&quot;PortInt&quot;</span><span class="p">:</span><span class="mi">8080</span><span class="p">,</span>
<span class="s2">&quot;CertFilePEMPathStr&quot;</span><span class="p">:</span><span class="s2">&quot;test.pem&quot;</span><span class="p">,</span>
<span class="s2">&quot;ServerInstance&quot;</span><span class="p">:</span> <span class="kc">None</span>
<span class="p">}</span>
<span class="c1"># Add first interface!</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">WebListenCreate</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">gSettings</span><span class="p">)</span>
<span class="c1"># Restore DUMP</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorSessionRestore</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">gSettings</span><span class="p">)</span>

@ -758,6 +758,27 @@
<span class="p">}</span>
<span class="n">inGSettings</span><span class="p">[</span><span class="s2">&quot;ServerDict&quot;</span><span class="p">][</span><span class="s2">&quot;URLList&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">lURLItemDict</span><span class="p">)</span></div>
<div class="viewcode-block" id="WebListenCreate"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebListenCreate">[docs]</a><span class="k">def</span> <span class="nf">WebListenCreate</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inServerKeyStr</span><span class="o">=</span><span class="s2">&quot;Default&quot;</span><span class="p">,</span> <span class="n">inAddressStr</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">inPortInt</span><span class="o">=</span><span class="mi">80</span><span class="p">,</span> <span class="n">inCertFilePEMPathStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inKeyFilePathStr</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Create listen interface for the web server</span>
<span class="sd"> :param inGSettings: Global settings dict (singleton)</span>
<span class="sd"> :param inAddressStr: IP interface to listen</span>
<span class="sd"> :param inPortInt: Port int to listen for HTTP default is 80; for HTTPS default is 443</span>
<span class="sd"> :param inCertFilePEMPathStr: Path to .pem (base 64) certificate. Required for SSL connection. ATTENTION - do not use certificate with password</span>
<span class="sd"> :param inKeyFilePathStr: Path to the private key file</span>
<span class="sd"> :return: </span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">inGSettings</span><span class="p">[</span><span class="s2">&quot;ServerDict&quot;</span><span class="p">][</span><span class="s2">&quot;ListenDict&quot;</span><span class="p">][</span><span class="n">inServerKeyStr</span><span class="p">]</span><span class="o">=</span><span class="p">{</span>
<span class="s2">&quot;AddressStr&quot;</span><span class="p">:</span><span class="n">inAddressStr</span><span class="p">,</span>
<span class="s2">&quot;PortInt&quot;</span><span class="p">:</span><span class="n">inPortInt</span><span class="p">,</span>
<span class="s2">&quot;CertFilePEMPathStr&quot;</span><span class="p">:</span><span class="n">inCertFilePEMPathStr</span><span class="p">,</span>
<span class="s2">&quot;KeyFilePathStr&quot;</span><span class="p">:</span><span class="n">inKeyFilePathStr</span><span class="p">,</span>
<span class="s2">&quot;ServerInstance&quot;</span><span class="p">:</span> <span class="kc">None</span>
<span class="p">}</span></div>
<div class="viewcode-block" id="WebCPUpdate"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebCPUpdate">[docs]</a><span class="k">def</span> <span class="nf">WebCPUpdate</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inCPKeyStr</span><span class="p">,</span> <span class="n">inHTMLRenderDef</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inJSONGeneratorDef</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inJSInitGeneratorDef</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Add control panel HTML, JSON generator or JS when page init</span>

@ -474,12 +474,14 @@
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebCPUpdate">WebCPUpdate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectDef">WebURLConnectDef() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebListenCreate">WebListenCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFile">WebURLConnectFile() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectDef">WebURLConnectDef() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFile">WebURLConnectFile() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFolder">WebURLConnectFolder() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserInfoGet">WebUserInfoGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>

Binary file not shown.

File diff suppressed because one or more lines are too long

@ -318,6 +318,11 @@ Work with activity scheduling.
| Add control panel HTML, JSON generator or JS when page init
|
| `WebListenCreate`(inGSettings[, …])
| Create listen interface for the web server
|
| `WebURLConnectDef`(inGSettings, inMethodStr, …)
@ -2043,6 +2048,34 @@ Add control panel HTML, JSON generator or JS when page init
### pyOpenRPA.Orchestrator.__Orchestrator__.WebListenCreate(inGSettings, inServerKeyStr='Default', inAddressStr='', inPortInt=80, inCertFilePEMPathStr=None, inKeyFilePathStr=None)
Create listen interface for the web server
* **Parameters**
* **inGSettings** Global settings dict (singleton)
* **inAddressStr** IP interface to listen
* **inPortInt** Port int to listen for HTTP default is 80; for HTTPS default is 443
* **inCertFilePEMPathStr** Path to .pem (base 64) certificate. Required for SSL connection. ATTENTION - do not use certificate with password
* **inKeyFilePathStr** Path to the private key file
* **Returns**
### pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectDef(inGSettings, inMethodStr, inURLStr, inMatchTypeStr, inDef, inContentTypeStr='application/octet-stream')
> Connect URL to DEF

@ -50,12 +50,13 @@ def __Create__():
"WorkingDirectoryPathStr": None, # Will be filled automatically
"RequestTimeoutSecFloat": 300, # Time to handle request in seconds,
"ListenDict": { # Prototype
"Default":{
"AddressStr":"",
"PortInt":80,
"CertFilePEMPathStr":"",
"ServerInstance": None
}
#"Default":{
# "AddressStr":"",
# "PortInt":80,
# "CertFilePEMPathStr":None,
# "KeyFilePathStr":None,
# "ServerInstance": None
#}
},
"AccessUsers": { # Default - all URL is blocked
"FlagCredentialsAsk": True, # Turn on Authentication

@ -39,13 +39,8 @@ elif __name__ == "__main__": # New init way - allow run as module -m PyOpenRPA.O
# TEST Add Supertoken for the all access between robots
Orchestrator.UACSuperTokenUpdate(inGSettings=gSettings, inSuperTokenStr="1992-04-03-0643-ru-b4ff-openrpa52zzz")
# Add 2 interfaces!
gSettings["ServerDict"]["ListenDict"]["Int2"]={
"AddressStr":"",
"PortInt":8080,
"CertFilePEMPathStr":"test.pem",
"ServerInstance": None
}
# Add first interface!
Orchestrator.WebListenCreate(inGSettings=gSettings)
# Restore DUMP
Orchestrator.OrchestratorSessionRestore(inGSettings=gSettings)

Loading…
Cancel
Save