From 1b4dc7cd35b99f61ff6c301ea6950256d3e3d39b Mon Sep 17 00:00:00 2001 From: Phillip Jensen Date: Tue, 26 Nov 2024 14:53:58 +0100 Subject: [PATCH] Fixes --- README.md | 61 +++++++++++++++++++ .../certificate_manager.py | 2 +- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..632e507 --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ +# Golem Certificate Companion + +A user-friendly command-line tool that simplifies outbound networking setup on the Golem Network. Instead of manually managing certificates, keys, and descriptors, this tool guides you through a simple interactive process to generate all required files. + +## Overview + +Setting up outbound networking on Golem traditionally requires multiple manual steps including key generation, certificate creation, and descriptor signing. The Golem Certificate Companion automates this entire process, handling all the cryptographic operations behind the scenes. + +With a single command and a few simple prompts, you can: +- Generate all required cryptographic keys +- Create and sign your certificates +- Configure outbound access (unrestricted or URL whitelist) +- Generate a properly signed node descriptor + +## Installation + +```bash +pip install golem-cert-companion +``` + +## Quick Start + +1. Run the tool: +```bash +golem-cert-companion +``` + +2. Answer a few simple questions: + - Your name and email + - Whether you want unrestricted access or specific URLs + - Your Golem node ID (run `yagna id show` to get this) + +That's it! The tool handles all the complex certificate generation and signing automatically. + +## Provider Setup + +After generating your certificate: + +1. Share your signed certificate (`root-cert-template.signed.json`) with providers +2. Providers can enable your outbound access by running: +```bash +ya-provider rule set outbound partner import-cert root-cert-template.signed.json --mode all +``` +## Using in Your Tasks + +We've covered in our documentation how to use the files in your tasks: + +### Yapapi +https://... + +### golem-js +https://... + +### Dapp-runner (golem-compose) +https://... + + +## Contributing + +Contributions are welcome! Please feel free to submit a Pull Request. + diff --git a/src/golem_cert_companion/certificate_manager.py b/src/golem_cert_companion/certificate_manager.py index 6ef8fa2..2d1b40e 100644 --- a/src/golem_cert_companion/certificate_manager.py +++ b/src/golem_cert_companion/certificate_manager.py @@ -373,7 +373,7 @@ def update_outbound_unrestricted(data): print(' 1. Download the certificate from: [YOUR_DOWNLOAD_LINK]') print(' 2. Run this command:') print( - f' {Fore.GREEN}ya-provider --rule set outbound partner import-cert root-certificate.signed.json --mode all{Style.RESET_ALL}"\n') + f' {Fore.GREEN}ya-provider rule set outbound partner import-cert root-cert-template.signed.json --mode all{Style.RESET_ALL}"\n') print(f"{Fore.CYAN}Using the Node Descriptor in Tasks:{Style.RESET_ALL}") print(