project-origin / registry

OpenSource project to create a Federated Registry to handle Granular Certificates
https://project-origin.github.io/docs/registry/
Apache License 2.0
9 stars 2 forks source link

🐞 [BUG] - Issuer key is a invalid format. #123

Closed Guy-Heylens-Elia closed 1 year ago

Guy-Heylens-Elia commented 1 year ago

Describe the Bug

Hello,

I am trying to setup Project Origin on an Azure K8S environment for development. For this I use the HELM charts and this guide (https://artifacthub.io/packages/helm/project-origin/project-origin-registry).

According the guide we need to create an issuer key and put the PublicKey in the values file. I have tried to create an issuer key on several machines, but with no success.

To Reproduce

1. Create an issuer key, like described here (https://artifacthub.io/packages/helm/project-origin/project-origin-registry)
2. Create a values YML file and fill all necessary fields.
3. Goto portal.azure.com and log in.
4. Connect to your K8S in a new Cloud Shell.
5. Upload the values.yml file.
6. Execute the helm chart command.

Expected Behavior

Verifier boots up and starts running.

Screenshots

image

image

Desktop

K8S on Azure

Additional Context

No response

michaelpiron commented 1 year ago

Hi @duizer @wisbech @MartinSchmidt , we are a bit stuck in the deployment of the PO registry in our K8S environment. My colleague Guy entered into the issue above. Would you be able to help us out? Thanks. Best, Michaël

wisbech commented 1 year ago

@michaelpiron of course we will help you - it is vacation time so please be patient. Thank you @Guy-Heylens-Elia for putting this in the discussion section where it belongs.

Happy holidays.

MartinSchmidt commented 1 year ago

hi @Guy-Heylens-Elia and @michaelpiron I would need some additional information to try and help you out, since the public-key is not something that must be private, could you share a snippet of your values file containing the public-key?

Guy-Heylens-Elia commented 1 year ago

Hello Martin, sure, no problem: image

In plain text: LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUNvd0JRWURLMlZ3QXlFQWRkZjg5aUdybDFTN0pBMDBNZDRKVEJHOEV1VkNCeXFlSVNLTXFYdXBuY2s9Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo=

wisbech commented 1 year ago

Hi @Guy-Heylens-Elia - maybe this is just a shot in the dark, but apparently yaml is quite iffy about quotes dependent on the content this thread on stackoverflow. So try with a double quote

issuers:
  - area: BE1
    publicKey: "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUNvd0JRWURLMlZ3QXlFQWRkZjg5aUdybDFTN0pBMDBNZDRKVEJHOEV1VkNCeXFlSVNLTXFYdXBuY2s9Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo="

image

Guy-Heylens-Elia commented 1 year ago

Hi @Guy-Heylens-Elia - maybe this is just a shot in the dark, but apparently yaml is quite iffy about quotes dependent on the content this thread on stackoverflow. So try with a double quote

issuers:
  - area: BE1
    publicKey: "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUNvd0JRWURLMlZ3QXlFQWRkZjg5aUdybDFTN0pBMDBNZDRKVEJHOEV1VkNCeXFlSVNLTXFYdXBuY2s9Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo="

image

Correct, even with double quotes around the public key, it does not work. Still the same error.

MartinSchmidt commented 1 year ago

@Guy-Heylens-Elia

The issue itself does not seam to be with the public-key, i made the following values.yaml file

service:
  type: ClusterIP

verifiers:
  - name: electricity-v1
    type: project_origin.electricity.v1
    image:
      repository: ghcr.io/project-origin/electricity-server
      tag: 0.2.0-rc.17
    issuers:
        # the name of the grid area, here Narnia is used
      - area: BE1
        # the base64 encoded public key of the issuer
        publicKey: LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUNvd0JRWURLMlZ3QXlFQWRkZjg5aUdybDFTN0pBMDBNZDRKVEJHOEV1VkNCeXFlSVNLTXFYdXBuY2s9Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo=

    # if you want to use multiple registries, then ALL verifiers must know all registries External url
    # this is because the verifiers will use the external url to communicate with the registries
    registries:
      - name: my-example-registry
        address: http://my-example-registry:80

and tried to install it from helm into a kind cluster

kind create cluster
helm install test project-origin-registry --repo https://project-origin.github.io/helm-registry --version 0.2.0-rc.4 -f values.yaml 

and the result of the containers running:

image

So i think the issue might be with either the chart version or the electricity-server version within the yaml file.

Guy-Heylens-Elia commented 1 year ago

Thanks for the help. Looks like the version was the issue indeed. Everything is up and running now. image

MartinSchmidt commented 1 year ago

Good to hear :)