Allow ucloud to run without client certificate - for local etcd #28

Closed
opened 2021-11-20 11:15:32 +00:00 by ungleich-gitea · 16 comments

Allowing local connections / allowing users to shoot them in the foot if they like

Allowing local connections / allowing users to shoot them in the foot if they like
Author

closed

closed
Author

We already allow them. There was an attribute missing in configparser constructor which assumes keys with missing attribute as None. I added it.

We already allow them. There was an attribute missing in configparser constructor which assumes keys with missing attribute as None. I added it.
Author

changed title from Allow ucloud to run without client certificate to Allow ucloud to run without client certificate{+ - for local etcd+}

changed title from **Allow ucloud to run without client certificate** to **Allow ucloud to run without client certificate{+ - for local etcd+}**
Author
Using /home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/pycparser-2.19-py3.8.egg
Finished processing dependencies for ucloud===0.0.3-43-ge79f1b4
ERROR:root:[Errno 2] No such file or directory: 'changeme'
Traceback (most recent call last):
  File "./bin/../scripts/ucloud", line 26, in <module>
    mod = importlib.import_module("ucloud.{}.main".format(name))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/nico/vcs/ucloud/ucloud/api/main.py", line 13, in <module>
    from ucloud.config import (etcd_client, request_pool, vm_pool, host_pool, config, image_storage_handler)
  File "/home/nico/vcs/ucloud/ucloud/config.py", line 41, in <module>
    etcd_client = Etcd3Wrapper(*etcd_wrapper_args, **etcd_wrapper_kwargs)
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3_wrapper-0.5.4-py3.8.egg/etcd3_wrapper/etcd3_wrapper.py", line 26, in __init__
    self.client = etcd3.client(*args, **kwargs)
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 1180, in client
    return Etcd3Client(host=host,
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 113, in __init__
    credentials = self._get_secure_creds(
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 188, in _get_secure_creds
    with open(ca_cert, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'changeme'
[Errno 2] No such file or directory: 'changeme'
Exception ignored in: <function Etcd3Client.__del__ at 0x7f7aefdc0ca0>
Traceback (most recent call last):
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 182, in __del__
    self.close()
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 173, in close
    self.channel.close()
AttributeError: 'Etcd3Client' object has no attribute 'channel'
(venv) [14:51] diamond:ucloud% 
``` Using /home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/pycparser-2.19-py3.8.egg Finished processing dependencies for ucloud===0.0.3-43-ge79f1b4 ERROR:root:[Errno 2] No such file or directory: 'changeme' Traceback (most recent call last): File "./bin/../scripts/ucloud", line 26, in <module> mod = importlib.import_module("ucloud.{}.main".format(name)) File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/nico/vcs/ucloud/ucloud/api/main.py", line 13, in <module> from ucloud.config import (etcd_client, request_pool, vm_pool, host_pool, config, image_storage_handler) File "/home/nico/vcs/ucloud/ucloud/config.py", line 41, in <module> etcd_client = Etcd3Wrapper(*etcd_wrapper_args, **etcd_wrapper_kwargs) File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3_wrapper-0.5.4-py3.8.egg/etcd3_wrapper/etcd3_wrapper.py", line 26, in __init__ self.client = etcd3.client(*args, **kwargs) File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 1180, in client return Etcd3Client(host=host, File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 113, in __init__ credentials = self._get_secure_creds( File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 188, in _get_secure_creds with open(ca_cert, 'rb') as f: FileNotFoundError: [Errno 2] No such file or directory: 'changeme' [Errno 2] No such file or directory: 'changeme' Exception ignored in: <function Etcd3Client.__del__ at 0x7f7aefdc0ca0> Traceback (most recent call last): File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 182, in __del__ self.close() File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 173, in close self.channel.close() AttributeError: 'Etcd3Client' object has no attribute 'channel' (venv) [14:51] diamond:ucloud% ```
Author

closed

closed
Author

We already allow them. There was an attribute missing in configparser constructor which assumes keys with missing attribute as None. I added it.

We already allow them. There was an attribute missing in configparser constructor which assumes keys with missing attribute as None. I added it.
Author

changed title from Allow ucloud to run without client certificate to Allow ucloud to run without client certificate{+ - for local etcd+}

changed title from **Allow ucloud to run without client certificate** to **Allow ucloud to run without client certificate{+ - for local etcd+}**
Author
Using /home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/pycparser-2.19-py3.8.egg
Finished processing dependencies for ucloud===0.0.3-43-ge79f1b4
ERROR:root:[Errno 2] No such file or directory: 'changeme'
Traceback (most recent call last):
  File "./bin/../scripts/ucloud", line 26, in <module>
    mod = importlib.import_module("ucloud.{}.main".format(name))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/nico/vcs/ucloud/ucloud/api/main.py", line 13, in <module>
    from ucloud.config import (etcd_client, request_pool, vm_pool, host_pool, config, image_storage_handler)
  File "/home/nico/vcs/ucloud/ucloud/config.py", line 41, in <module>
    etcd_client = Etcd3Wrapper(*etcd_wrapper_args, **etcd_wrapper_kwargs)
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3_wrapper-0.5.4-py3.8.egg/etcd3_wrapper/etcd3_wrapper.py", line 26, in __init__
    self.client = etcd3.client(*args, **kwargs)
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 1180, in client
    return Etcd3Client(host=host,
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 113, in __init__
    credentials = self._get_secure_creds(
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 188, in _get_secure_creds
    with open(ca_cert, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'changeme'
[Errno 2] No such file or directory: 'changeme'
Exception ignored in: <function Etcd3Client.__del__ at 0x7f7aefdc0ca0>
Traceback (most recent call last):
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 182, in __del__
    self.close()
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 173, in close
    self.channel.close()
AttributeError: 'Etcd3Client' object has no attribute 'channel'
(venv) [14:51] diamond:ucloud% 
``` Using /home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/pycparser-2.19-py3.8.egg Finished processing dependencies for ucloud===0.0.3-43-ge79f1b4 ERROR:root:[Errno 2] No such file or directory: 'changeme' Traceback (most recent call last): File "./bin/../scripts/ucloud", line 26, in <module> mod = importlib.import_module("ucloud.{}.main".format(name)) File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/nico/vcs/ucloud/ucloud/api/main.py", line 13, in <module> from ucloud.config import (etcd_client, request_pool, vm_pool, host_pool, config, image_storage_handler) File "/home/nico/vcs/ucloud/ucloud/config.py", line 41, in <module> etcd_client = Etcd3Wrapper(*etcd_wrapper_args, **etcd_wrapper_kwargs) File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3_wrapper-0.5.4-py3.8.egg/etcd3_wrapper/etcd3_wrapper.py", line 26, in __init__ self.client = etcd3.client(*args, **kwargs) File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 1180, in client return Etcd3Client(host=host, File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 113, in __init__ credentials = self._get_secure_creds( File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 188, in _get_secure_creds with open(ca_cert, 'rb') as f: FileNotFoundError: [Errno 2] No such file or directory: 'changeme' [Errno 2] No such file or directory: 'changeme' Exception ignored in: <function Etcd3Client.__del__ at 0x7f7aefdc0ca0> Traceback (most recent call last): File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 182, in __del__ self.close() File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 173, in close self.channel.close() AttributeError: 'Etcd3Client' object has no attribute 'channel' (venv) [14:51] diamond:ucloud% ```
Author

closed

closed
Author

We already allow them. There was an attribute missing in configparser constructor which assumes keys with missing attribute as None. I added it.

We already allow them. There was an attribute missing in configparser constructor which assumes keys with missing attribute as None. I added it.
Author

changed title from Allow ucloud to run without client certificate to Allow ucloud to run without client certificate{+ - for local etcd+}

changed title from **Allow ucloud to run without client certificate** to **Allow ucloud to run without client certificate{+ - for local etcd+}**
Author
Using /home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/pycparser-2.19-py3.8.egg
Finished processing dependencies for ucloud===0.0.3-43-ge79f1b4
ERROR:root:[Errno 2] No such file or directory: 'changeme'
Traceback (most recent call last):
  File "./bin/../scripts/ucloud", line 26, in <module>
    mod = importlib.import_module("ucloud.{}.main".format(name))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/nico/vcs/ucloud/ucloud/api/main.py", line 13, in <module>
    from ucloud.config import (etcd_client, request_pool, vm_pool, host_pool, config, image_storage_handler)
  File "/home/nico/vcs/ucloud/ucloud/config.py", line 41, in <module>
    etcd_client = Etcd3Wrapper(*etcd_wrapper_args, **etcd_wrapper_kwargs)
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3_wrapper-0.5.4-py3.8.egg/etcd3_wrapper/etcd3_wrapper.py", line 26, in __init__
    self.client = etcd3.client(*args, **kwargs)
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 1180, in client
    return Etcd3Client(host=host,
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 113, in __init__
    credentials = self._get_secure_creds(
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 188, in _get_secure_creds
    with open(ca_cert, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'changeme'
[Errno 2] No such file or directory: 'changeme'
Exception ignored in: <function Etcd3Client.__del__ at 0x7f7aefdc0ca0>
Traceback (most recent call last):
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 182, in __del__
    self.close()
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 173, in close
    self.channel.close()
AttributeError: 'Etcd3Client' object has no attribute 'channel'
(venv) [14:51] diamond:ucloud% 
``` Using /home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/pycparser-2.19-py3.8.egg Finished processing dependencies for ucloud===0.0.3-43-ge79f1b4 ERROR:root:[Errno 2] No such file or directory: 'changeme' Traceback (most recent call last): File "./bin/../scripts/ucloud", line 26, in <module> mod = importlib.import_module("ucloud.{}.main".format(name)) File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/nico/vcs/ucloud/ucloud/api/main.py", line 13, in <module> from ucloud.config import (etcd_client, request_pool, vm_pool, host_pool, config, image_storage_handler) File "/home/nico/vcs/ucloud/ucloud/config.py", line 41, in <module> etcd_client = Etcd3Wrapper(*etcd_wrapper_args, **etcd_wrapper_kwargs) File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3_wrapper-0.5.4-py3.8.egg/etcd3_wrapper/etcd3_wrapper.py", line 26, in __init__ self.client = etcd3.client(*args, **kwargs) File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 1180, in client return Etcd3Client(host=host, File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 113, in __init__ credentials = self._get_secure_creds( File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 188, in _get_secure_creds with open(ca_cert, 'rb') as f: FileNotFoundError: [Errno 2] No such file or directory: 'changeme' [Errno 2] No such file or directory: 'changeme' Exception ignored in: <function Etcd3Client.__del__ at 0x7f7aefdc0ca0> Traceback (most recent call last): File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 182, in __del__ self.close() File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 173, in close self.channel.close() AttributeError: 'Etcd3Client' object has no attribute 'channel' (venv) [14:51] diamond:ucloud% ```
Author

closed

closed
Author

We already allow them. There was an attribute missing in configparser constructor which assumes keys with missing attribute as None. I added it.

We already allow them. There was an attribute missing in configparser constructor which assumes keys with missing attribute as None. I added it.
Author

changed title from Allow ucloud to run without client certificate to Allow ucloud to run without client certificate{+ - for local etcd+}

changed title from **Allow ucloud to run without client certificate** to **Allow ucloud to run without client certificate{+ - for local etcd+}**
Author
Using /home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/pycparser-2.19-py3.8.egg
Finished processing dependencies for ucloud===0.0.3-43-ge79f1b4
ERROR:root:[Errno 2] No such file or directory: 'changeme'
Traceback (most recent call last):
  File "./bin/../scripts/ucloud", line 26, in <module>
    mod = importlib.import_module("ucloud.{}.main".format(name))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/nico/vcs/ucloud/ucloud/api/main.py", line 13, in <module>
    from ucloud.config import (etcd_client, request_pool, vm_pool, host_pool, config, image_storage_handler)
  File "/home/nico/vcs/ucloud/ucloud/config.py", line 41, in <module>
    etcd_client = Etcd3Wrapper(*etcd_wrapper_args, **etcd_wrapper_kwargs)
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3_wrapper-0.5.4-py3.8.egg/etcd3_wrapper/etcd3_wrapper.py", line 26, in __init__
    self.client = etcd3.client(*args, **kwargs)
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 1180, in client
    return Etcd3Client(host=host,
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 113, in __init__
    credentials = self._get_secure_creds(
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 188, in _get_secure_creds
    with open(ca_cert, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'changeme'
[Errno 2] No such file or directory: 'changeme'
Exception ignored in: <function Etcd3Client.__del__ at 0x7f7aefdc0ca0>
Traceback (most recent call last):
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 182, in __del__
    self.close()
  File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 173, in close
    self.channel.close()
AttributeError: 'Etcd3Client' object has no attribute 'channel'
(venv) [14:51] diamond:ucloud% 
``` Using /home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/pycparser-2.19-py3.8.egg Finished processing dependencies for ucloud===0.0.3-43-ge79f1b4 ERROR:root:[Errno 2] No such file or directory: 'changeme' Traceback (most recent call last): File "./bin/../scripts/ucloud", line 26, in <module> mod = importlib.import_module("ucloud.{}.main".format(name)) File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/nico/vcs/ucloud/ucloud/api/main.py", line 13, in <module> from ucloud.config import (etcd_client, request_pool, vm_pool, host_pool, config, image_storage_handler) File "/home/nico/vcs/ucloud/ucloud/config.py", line 41, in <module> etcd_client = Etcd3Wrapper(*etcd_wrapper_args, **etcd_wrapper_kwargs) File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3_wrapper-0.5.4-py3.8.egg/etcd3_wrapper/etcd3_wrapper.py", line 26, in __init__ self.client = etcd3.client(*args, **kwargs) File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 1180, in client return Etcd3Client(host=host, File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 113, in __init__ credentials = self._get_secure_creds( File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 188, in _get_secure_creds with open(ca_cert, 'rb') as f: FileNotFoundError: [Errno 2] No such file or directory: 'changeme' [Errno 2] No such file or directory: 'changeme' Exception ignored in: <function Etcd3Client.__del__ at 0x7f7aefdc0ca0> Traceback (most recent call last): File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 182, in __del__ self.close() File "/home/nico/vcs/ucloud/venv/lib/python3.8/site-packages/etcd3/client.py", line 173, in close self.channel.close() AttributeError: 'Etcd3Client' object has no attribute 'channel' (venv) [14:51] diamond:ucloud% ```
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: uncloud/uncloud#28
No description provided.