jetconf issueshttps://gitlab.nic.cz/labs/jetconf/-/issues2020-07-15T06:31:30+02:00https://gitlab.nic.cz/labs/jetconf/-/issues/42HTTP 1.1 support (feature request)2020-07-15T06:31:30+02:00Jake HollandHTTP 1.1 support (feature request)There are a number of clients that still do not support H2 (for example, curl on macos, and some fronting web servers). It would be helpful to support both H2 and HTTP over TLS.There are a number of clients that still do not support H2 (for example, curl on macos, and some fronting web servers). It would be helpful to support both H2 and HTTP over TLS.https://gitlab.nic.cz/labs/jetconf/-/issues/41WSGI integration (feature request)2020-07-13T20:43:10+02:00Jake HollandWSGI integration (feature request)In some environments (e.g. Elastic Beanstalk) python generally use WSGI to integrate more efficiently with nginx or other web servers.
It would be nice if jetconf had WSGI support to handle this mode of operation, by defining an "applic...In some environments (e.g. Elastic Beanstalk) python generally use WSGI to integrate more efficiently with nginx or other web servers.
It would be nice if jetconf had WSGI support to handle this mode of operation, by defining an "application(environ, start_response)" entry point that can be used to receive requests and provide appropriate RESTCONF responses when invoked by a WSGI gateway, rather than listening on a socket as when jetconf is executed from the command line.
https://www.python.org/dev/peps/pep-3333/#abstracthttps://gitlab.nic.cz/labs/jetconf/-/issues/40Getting 'Invalid HTTP/2 preamble' when 'DISABLE_SSL: true'2019-11-15T10:25:14+01:00rmanusGetting 'Invalid HTTP/2 preamble' when 'DISABLE_SSL: true'I have my jetconf server working fine with 'DISABLE_SSL: false'
When I try to use jetconf with http instead of https, it fails with 'Invalid HTTP/2 preamble'
So, I set 'DISABLE_SSL: true' and restart jetconf server
```
/usr/local/bin...I have my jetconf server working fine with 'DISABLE_SSL: false'
When I try to use jetconf with http instead of https, it fails with 'Invalid HTTP/2 preamble'
So, I set 'DISABLE_SSL: true' and restart jetconf server
```
/usr/local/bin/curl --http2 -v http://localhost:8443/restconf/data/jnas:nas/storage/disk
* Trying ::1:8443...
* TCP_NODELAY set
* Connected to localhost (::1) port 8443 (#0)
> GET /restconf/data/jnas:nas/storage/disk HTTP/1.1
> Host: localhost:8443
> User-Agent: curl/7.67.0-DEV
> Accept: */*
> Connection: Upgrade, HTTP2-Settings
> Upgrade: h2c
> HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
>
* Empty reply from server
* Connection #0 to host localhost left intact
curl: (52) Empty reply from server
```
```
2019-11-12 16:41:38,514 INFO Jetconf version 0.3.7.dev3+g487d7a5.d20191112
2019-11-12 16:41:38,517 INFO Using config:
GLOBAL:
BACKEND_PACKAGE: jnas
CLIENT_CN: false
DATA_JSON_FILE: data.json
LOGFILE: '-'
LOG_DBG_MODULES:
GLOBAL:
- '*'
LOG_LEVEL: debug
PERSISTENT_CHANGES: true
PIDFILE: /tmp/jetconf.pid
TIMEZONE: Europe/Paris
VALIDATE_TRANSACTIONS: true
YANG_LIB_DIR: models/
HTTP_SERVER:
API_ROOT: /restconf
API_ROOT_RUNNING: /restconf_running
CA_CERT: /root/my_ca_cert/ca_localhost.pem
DBG_DISABLE_CERT: true
DISABLE_SSL: true
DOC_DEFAULT_NAME: index.html
DOC_ROOT: doc-root
LISTEN_LOCALHOST_ONLY: false
PORT: 8443
SERVER_NAME: jnas-server
SERVER_SSL_CERT: /root/my_ca_cert/server_localhost.crt
SERVER_SSL_PRIVKEY: /root/my_ca_cert/server_localhost.key
UPLOAD_SIZE_LIMIT: 1
NACM:
ALLOWED_USERS:
- example@mail.cz
ENABLED: false
2019-11-12 16:41:38,693 INFO Backend: init
2019-11-12 16:41:38,700 INFO Server started on ('::', 8443, 0, 0)
2019-11-12 16:41:44,240 ERROR Fatal error: protocol.data_received() call failed.
protocol: <jetconf.rest_server.H2Protocol object at 0x7f2fdfaac358>
transport: <_SelectorSocketTransport fd=9 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/selector_events.py", line 813, in _read_ready__data_received
self._protocol.data_received(data)
File "/root/jetconf/jetconf/rest_server.py", line 76, in data_received
events = self.conn.receive_data(data)
File "/root/jetconf/lib/python3.7/site-packages/h2/connection.py", line 1448, in receive_data
self.incoming_buffer.add_data(data)
File "/root/jetconf/lib/python3.7/site-packages/h2/frame_buffer.py", line 52, in add_data
raise ProtocolError("Invalid HTTP/2 preamble.")
h2.exceptions.ProtocolError: Invalid HTTP/2 preamble.
```
Am I missing something ?https://gitlab.nic.cz/labs/jetconf/-/issues/39traceback after wrong DELETE request2018-11-03T12:49:48+01:00Petr Špačektraceback after wrong DELETE requestFollowing nonsensical request causes traceback:
```
curl --http2 -k -X DELETE 'https://127.0.0.1:8443/restconf/data/dns-server:dns-server/server-options/listen-endpoi'
```
```
During handling of the above exception, another exception oc...Following nonsensical request causes traceback:
```
curl --http2 -k -X DELETE 'https://127.0.0.1:8443/restconf/data/dns-server:dns-server/server-options/listen-endpoi'
```
```
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pspacek/pkg/jetconf/CLEAN/jetconf/jetconf/http_handlers.py", line 123, in error
err_body["error-message"] = exception.__class__.__name__ + ": " + str(exception.message)
AttributeError: 'NonexistentSchemaNode' object has no attribute 'message'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib64/python3.6/asyncio/events.py", line 145, in _run
self._callback(*self._args)
File "/usr/lib64/python3.6/asyncio/selector_events.py", line 734, in _read_ready
self._protocol.data_received(data)
File "/usr/lib64/python3.6/asyncio/sslproto.py", line 518, in data_received
self._app_protocol.data_received(chunk)
File "/home/pspacek/pkg/jetconf/CLEAN/jetconf/jetconf/rest_server.py", line 115, in data_received
self.run_request_handler(headers, event.stream_id, None)
File "/home/pspacek/pkg/jetconf/CLEAN/jetconf/jetconf/rest_server.py", line 190, in run_request_handler
resp = h(headers, data, self.client_cert)
File "/home/pspacek/pkg/jetconf/CLEAN/jetconf/jetconf/http_handlers.py", line 681, in delete_api
http_resp = self._delete(api_pth, username)
File "/home/pspacek/pkg/jetconf/CLEAN/jetconf/jetconf/http_handlers.py", line 648, in _delete
exception=e
File "/home/pspacek/pkg/jetconf/CLEAN/jetconf/jetconf/http_handlers.py", line 125, in error
err_body["error-message"] = exception.__class__.__name__ + ": " + str(exception)
File "/home/pspacek/pkg/jetconf/CLEAN/jetconf/lib64/python3.6/site-packages/yangson/exceptions.py", line 289, in __str__
prefix = "" if self.ns == self.qn[1] else self.ns + ":"
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
```https://gitlab.nic.cz/labs/jetconf/-/issues/38IPV6 support in jetconf2018-02-26T11:52:10+01:00MonalisaIPV6 support in jetconfHello Experts,
Is IPV6 support provided in jetconf, if yes kindly let me know which version it is provided
and any documentation available how to use it.
If IPV6 support is not present, i want to provide support for the same.
Since i am...Hello Experts,
Is IPV6 support provided in jetconf, if yes kindly let me know which version it is provided
and any documentation available how to use it.
If IPV6 support is not present, i want to provide support for the same.
Since i am new to socket programming kindly let me know useful links and python libraries
i can use to achieve it.
Any kind of support and help is appreciated.
Thanks & Best Regards,
Monalisahttps://gitlab.nic.cz/labs/jetconf/-/issues/37How to add multiple user to the Config file ?2018-02-12T13:04:07+01:00jayganatraHow to add multiple user to the Config file ?Hi just want to add the Username:"admin" and "user1" to the config.yaml in below format.
ALLOWED_USERS: ["admin","user1"]
I have generated the certificates for both user but can't able to connect to the server.
Can you help me with th...Hi just want to add the Username:"admin" and "user1" to the config.yaml in below format.
ALLOWED_USERS: ["admin","user1"]
I have generated the certificates for both user but can't able to connect to the server.
Can you help me with that problem?
Thanks in advance.https://gitlab.nic.cz/labs/jetconf/-/issues/36While giving PUT command request getting an error traceback in code2018-02-07T12:41:53+01:00MonalisaWhile giving PUT command request getting an error traceback in codeIf by mistake the PUT command request formed incorrectly, instead of throwing error it is giving error in code.
Following is the wrong request formed mistakenly
PUT https://10.102.3.244:8443/restconf/data/ModuleName:MainContainer/subcon...If by mistake the PUT command request formed incorrectly, instead of throwing error it is giving error in code.
Following is the wrong request formed mistakenly
PUT https://10.102.3.244:8443/restconf/data/ModuleName:MainContainer/subcontainer/mynode/
{
{
"ModuleName:subcontainer":{
"mynode" : "myValue"
}
}
This request is raising following error in code.
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/events.py", line 125, in _run
self._callback(*self._args)
File "/usr/lib/python3.5/asyncio/selector_events.py", line 669, in _read_ready
self._protocol.data_received(data)
File "/usr/lib/python3.5/asyncio/sslproto.py", line 506, in data_received
self._app_protocol.data_received(chunk)
File "/usr/local/lib/python3.5/dist-packages/restconf-0.3.4.dev2+g1be0916.d20180206-py3.5.egg/jetconf/rest_server.py", line 118, in data_received
self.run_request_handler(headers, event.stream_id, body)
File "/usr/local/lib/python3.5/dist-packages/restconf-0.3.4.dev2+g1be0916.d20180206-py3.5.egg/jetconf/rest_server.py", line 190, in run_request_handler
resp = h(headers, data, self.client_cert)
File "/usr/local/lib/python3.5/dist-packages/restconf-0.3.4.dev2+g1be0916.d20180206-py3.5.egg/jetconf/http_handlers.py", line 613, in put_api
http_resp = self._put(api_pth, username, data)
File "/usr/local/lib/python3.5/dist-packages/restconf-0.3.4.dev2+g1be0916.d20180206-py3.5.egg/jetconf/http_handlers.py", line 565, in _put
new_root = self.ds.update_node_rpc(staging_root, rpc1, json_data)
File "/usr/local/lib/python3.5/dist-packages/restconf-0.3.4.dev2+g1be0916.d20180206-py3.5.egg/jetconf/data.py", line 567, in update_node_rpc
new_n = n.update(input_member_value, raw=True)
File "/home/monalisa/.local/lib/python3.5/site-packages/yangson/instance.py", line 269, in update
newval = self.schema_node.from_raw(value, self.json_pointer()) if raw else value
File "/home/monalisa/.local/lib/python3.5/site-packages/yangson/schemanode.py", line 756, in from_raw
raise RawTypeError(jptr, self.type.name + " value")
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Kindly provide support to resolve the issue.https://gitlab.nic.cz/labs/jetconf/-/issues/35Connect to jetconf server with SSL certificate2018-02-07T11:40:20+01:00jayganatraConnect to jetconf server with SSL certificateHi I am new to jetconf. I am successfully able to connect curl base client to the jetconf server without certificate validation steps. But when i enabling the 'DBG_DISABLE_CERTS' flag, I facing problem("OpenSSL SSL_connect: SSL_ERROR_SY...Hi I am new to jetconf. I am successfully able to connect curl base client to the jetconf server without certificate validation steps. But when i enabling the 'DBG_DISABLE_CERTS' flag, I facing problem("OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to 127.0.0.1:8443") to connect the client to the server.
So, Can you provide me a little guidance for that issue.
REQUEST
curl -v --http2 -k --cert-type PEM -E /home/karan/jay/RESTCONF/jetconf-master/data/example-client.pem -X GET https://10.102.3.205:8443/restconf/data/
CLIENT RESPONSE
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying 10.102.3.205...
* TCP_NODELAY set
* Connected to 10.102.3.205 (10.102.3.205) port 8443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Request CERT (13):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Certificate (11):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS handshake, CERT verify (15):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to 10.102.3.205:8443
* stopped the pause stream!
* Closing connection 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to 10.102.3.205:8443
SERVER RESPONSE
2018-01-30 12:03:18,963 INFO Jetconf version 0.3.4
2018-01-30 12:03:18,965 INFO Using config:
GLOBAL:
BACKEND_PACKAGE: jetconf_jukebox
DATA_JSON_FILE: /home/karan/jay/RESTCONF/jukebox-jetconf-master/example-data.json
LOGFILE: '-'
LOG_DBG_MODULES:
- usr_conf_data_handlers
- knot_api
- nacm
- data
LOG_LEVEL: debug
PERSISTENT_CHANGES: false
PIDFILE: /tmp/jetconf.pid
TIMEZONE: Europe/Prague
VALIDATE_TRANSACTIONS: true
YANG_LIB_DIR: /home/karan//jay/RESTCONF/jukebox-jetconf-master/yang-modules/
HTTP_SERVER:
API_ROOT: /restconf
API_ROOT_RUNNING: /restconf_running
CA_CERT: /home/karan/jay/RESTCONF/jetconf-master/data/ca.pem
DBG_DISABLE_CERTS: false
DOC_DEFAULT_NAME: index.html
DOC_ROOT: /home/karan/jay/RESTCONF/jetconf-master/data/doc-root/
LISTEN_LOCALHOST_ONLY: false
PORT: 8443
SERVER_NAME: jetconf-h2
SERVER_SSL_CERT: /home/karan/jay/RESTCONF/jetconf-master/data/server.crt
SERVER_SSL_PRIVKEY: /home/karan/jay/RESTCONF/jetconf-master/data/server.key
UPLOAD_SIZE_LIMIT: 1
NACM:
ALLOWED_USERS:
- lojza@mail.cz
ENABLED: true
2018-01-30 12:03:19,093 INFO Backend: init
2018-01-30 12:03:19,094 INFO Server started on ('10.102.3.205', 8443)
Thanks in Advance.https://gitlab.nic.cz/labs/jetconf/-/issues/34Not retriving orphan instance.2018-02-07T06:30:11+01:00MonalisaNot retriving orphan instance.GET https://10.102.3.37:8443/restconf/data/modulename:maincontainer/subcontainer/leafnode
While retrieving above mentioned leafnode for state data, where config is set to false(in yang file),it is throwing below exception while creating...GET https://10.102.3.37:8443/restconf/data/modulename:maincontainer/subcontainer/leafnode
While retrieving above mentioned leafnode for state data, where config is set to false(in yang file),it is throwing below exception while creating orphan instance in data.py
handle: <Handle _SelectorSocketTransport._read_ready()>
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/events.py", line 125, in _run
self._callback(*self._args)
File "/usr/lib/python3.5/asyncio/selector_events.py", line 669, in _read_ready
self._protocol.data_received(data)
File "/usr/lib/python3.5/asyncio/sslproto.py", line 506, in data_received
self._app_protocol.data_received(chunk)
File "/usr/local/lib/python3.5/dist-packages/jetconf-0.3.4.dev2+g1be0916.d20180116-py3.5.egg/jetconf/rest_server.py", line 115, in data_received
self.run_request_handler(headers, event.stream_id, None)
File "/usr/local/lib/python3.5/dist-packages/jetconf-0.3.4.dev2+g1be0916.d20180116-py3.5.egg/jetconf/rest_server.py", line 190, in run_request_handler
resp = h(headers, data, self.client_cert)
File "/usr/local/lib/python3.5/dist-packages/jetconf-0.3.4.dev2+g1be0916.d20180116-py3.5.egg/jetconf/http_handlers.py", line 366, in get_api_staging
http_resp = self._get(headers, api_pth, username, staging=True)
File "/usr/local/lib/python3.5/dist-packages/jetconf-0.3.4.dev2+g1be0916.d20180116-py3.5.egg/jetconf/http_handlers.py", line 260, in _get
n = self.ds.get_node_rpc(rpc1, staging)
File "/usr/local/lib/python3.5/dist-packages/jetconf-0.3.4.dev2+g1be0916.d20180116-py3.5.egg/jetconf/data.py", line 260, in get_node_rpc
state_root_n = sdh.schema_node.orphan_instance(state_handler_val)
File "/usr/local/lib/python3.5/dist-packages/yangson-1.3.22-py3.5.egg/yangson/schemanode.py", line 657, in orphan_instance
return ObjectMember(self.iname(), {}, val, None, self, val.timestamp)
AttributeError: 'str' object has no attribute 'timestamp'
Same behavior is observed in jukebox-example for song-count or album count leaf node.https://gitlab.nic.cz/labs/jetconf/-/issues/33Broken link2018-01-22T10:00:16+01:00Ghost UserBroken linkAt public page https://gitlab.labs.nic.cz/labs/jetconf/wikis/home
Found broken link to jc-browser. Perhaps this is a private project but is not mentioned anywhere.At public page https://gitlab.labs.nic.cz/labs/jetconf/wikis/home
Found broken link to jc-browser. Perhaps this is a private project but is not mentioned anywhere.https://gitlab.nic.cz/labs/jetconf/-/issues/32ValueError: not enough values to unpack2017-05-16T16:00:17+02:00Ladislav LhotkaValueError: not enough values to unpack```
2017-03-24 09:50:50,155 INFO [lojza@mail.cz] api_get: /restconf/data?depth=2
2017-03-24 09:50:50,155 ERROR Exception in callback _SelectorSocketTransport._read_ready()
handle: <Handle _SelectorSocketTransport._read_ready()>
Tr...```
2017-03-24 09:50:50,155 INFO [lojza@mail.cz] api_get: /restconf/data?depth=2
2017-03-24 09:50:50,155 ERROR Exception in callback _SelectorSocketTransport._read_ready()
handle: <Handle _SelectorSocketTransport._read_ready()>
Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/events.py", line 126, in _run
self._callback(*self._args)
File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/selector_events.py", line 731, in _read_ready
self._protocol.data_received(data)
File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/sslproto.py", line 516, in data_received
self._app_protocol.data_received(chunk)
File "/Users/lhotka/Projects/jetconf/jetconf/rest_server.py", line 115, in data_received
self.run_request_handler(headers, event.stream_id, None)
File "/Users/lhotka/Projects/jetconf/jetconf/rest_server.py", line 170, in run_request_handler
resp = h(headers, data, self.client_cert)
File "/Users/lhotka/Projects/jetconf/jetconf/http_handlers.py", line 276, in get_api_closure
ns = DataHelpers.path_first_ns(api_pth)
File "/Users/lhotka/Projects/jetconf/jetconf/helpers.py", line 54, in path_first_ns
ns1, sel1 = first_seg.split(":", maxsplit=1)
ValueError: not enough values to unpack (expected 2, got 1)
```https://gitlab.nic.cz/labs/jetconf/-/issues/31Make documentation publicly accessible2017-12-07T13:00:53+01:00Ladislav LhotkaMake documentation publicly accessible[Read the Docs](https://readthedocs.org) might be a good place.[Read the Docs](https://readthedocs.org) might be a good place.Beta version of RESTCONF serverhttps://gitlab.nic.cz/labs/jetconf/-/issues/30Upload JetConf package to PyPI2017-12-07T13:00:53+01:00Ladislav LhotkaUpload JetConf package to PyPIBeta version of RESTCONF serverhttps://gitlab.nic.cz/labs/jetconf/-/issues/29Test installation of JetConf + Knot2017-12-07T13:00:53+01:00Ladislav LhotkaTest installation of JetConf + Knot* Dominik's machine or another server (in Prague)?
* Should be open to interested external testers
* How shall we provide users with certificates?* Dominik's machine or another server (in Prague)?
* Should be open to interested external testers
* How shall we provide users with certificates?Beta version of RESTCONF serverhttps://gitlab.nic.cz/labs/jetconf/-/issues/28Make GitLab repo public and set up GitHub mirror.2017-12-07T13:00:53+01:00Ladislav LhotkaMake GitLab repo public and set up GitHub mirror.Petr Černohouz will help with this one.Petr Černohouz will help with this one.Beta version of RESTCONF serverhttps://gitlab.nic.cz/labs/jetconf/-/issues/27Document REST API2017-12-07T13:00:53+01:00Ladislav LhotkaDocument REST APIThis can mainly refer to [RESTCONF](https://tools.ietf.org/html/draft-ietf-netconf-restconf-18), but we need to document our extensions (commit).
Documentation should also provide pointers to data models (NACM, dns server configuration, ...This can mainly refer to [RESTCONF](https://tools.ietf.org/html/draft-ietf-netconf-restconf-18), but we need to document our extensions (commit).
Documentation should also provide pointers to data models (NACM, dns server configuration, zone data).Beta version of RESTCONF serverhttps://gitlab.nic.cz/labs/jetconf/-/issues/26Prepare packaging with setuptools2017-12-07T13:00:53+01:00Ladislav LhotkaPrepare packaging with setuptoolsBeta version of RESTCONF serverhttps://gitlab.nic.cz/labs/jetconf/-/issues/25Merge everything to master.2017-12-07T13:00:53+01:00Ladislav LhotkaMerge everything to master.Beta version of RESTCONF serverhttps://gitlab.nic.cz/labs/jetconf/-/issues/24Create Python bindings for libdan2017-05-02T20:28:14+02:00Ladislav LhotkaCreate Python bindings for libdan@dtaborsky @dtaborsky Interaction of JetConf with Knot's RA libraryDominik TaborskyDominik Taborskyhttps://gitlab.nic.cz/labs/jetconf/-/issues/23Extend the model with policies for zone signing2017-05-02T20:28:14+02:00Ladislav LhotkaExtend the model with policies for zone signingThe data model will be based on the current JSON configuration of KASP database.The data model will be based on the current JSON configuration of KASP database.Consolidated data model for DNS serverLadislav LhotkaLadislav Lhotka