Skip to content
This repository was archived by the owner on Feb 16, 2024. It is now read-only.
This repository was archived by the owner on Feb 16, 2024. It is now read-only.

Encountered issues when creating your user from the chainlink onboard email #1

@charifmews

Description

@charifmews

First the AUTH_SCHEME = "ED25519" in the sample.env default is set wrong for the API, because it doesn't recognise the scheme. Only when you set it to lowercase letters ('ed25519') the API accepts it.

Second the API_URL from the chainlink mail is missing a trailing slash and the versioning part of the API URL. Would suggest the scripts checks for a trailing slash and versioning, if missing just format it like <SxT-API-URL-HERE>/v1/ or maybe send a follow-up email.

Thirdly I could not generate the keys properly with generate-keys.py so that the API would accept it (I'm using a new macbook pro with python 3.11). This script + dependency works for me:

pip install cryptography
import os
import base64
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey

# Generate a random 32-byte seed
seed = os.urandom(32)

# Create a private key from the seed
private_key = Ed25519PrivateKey.from_private_bytes(seed)

# Get the corresponding public key
public_key = private_key.public_key()

# Encode the private and public keys as bytes
private_key_bytes = private_key.private_bytes(
    encoding=serialization.Encoding.Raw,
    format=serialization.PrivateFormat.Raw,
    encryption_algorithm=serialization.NoEncryption()
)
public_key_bytes = public_key.public_bytes(
    encoding=serialization.Encoding.Raw,
    format=serialization.PublicFormat.Raw
)

# Encode the private key, and public key in Base64 format
private_key_base64 = base64.b64encode(private_key_bytes)
public_key_base64 = base64.b64encode(public_key_bytes)

# Print the private key, and public key in Base64 format
print("Private Key (Base64):", private_key_base64.decode())
print("Public Key (Base64):", public_key_base64.decode())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions