Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error generating canonicalized entry when uploading pre-formatted entry via --entry flag #227

Closed
tiziano88 opened this issue Mar 19, 2021 · 1 comment

Comments

@tiziano88
Copy link
Contributor

To reproduce:

in r.json (I dumped this from an existing entry, so it should definitely pass validation):

{
    "apiVersion": "0.0.1",
    "spec": {
        "data": {
            "hash": {
                "algorithm": "sha256",
                "value": "07f40565aeaed9a36a8a63e12d2aacb5d9a42319d74ae4c1afac8a178d55822b"
            }
        },
        "signature": {
            "content": "4m1UFWVSQw+kCR8cxRw7XCUY+ecLc1v3+XWc1Aru5BnS2iS1dTL4DLTaLREU0QzGN1suEtfyEzX3OnW8uneWBg==",
            "format": "x509",
            "publicKey": {
                "content": "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUNvd0JRWURLMlZ3QXlFQTN4WGRUQzdDVk1abnpzMElWWmVHYkhnMkNwdEdUNm0zOEpiR3Q0d2YrYUk9Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo="
            }
        }
    },
    "kind": "rekord"
}

then

rekor upload --entry=r.json
2021/03/19 13:38:18 [POST /api/v1/log/entries][500] createLogEntry default  &{Code:500 Message:Error generating canonicalized entry}
@tiziano88
Copy link
Contributor Author

It worked with the following entry, specifying the inlined data (thanks @bobcallaway for the help):

{
    "apiVersion": "0.0.1",
    "spec": {
        "data": {
            "content": "j8zIk8Quak2BBi4volNIIZ+uJUQSRY2Myaq9WP9ws84="
        },
        "signature": {
            "content": "4m1UFWVSQw+kCR8cxRw7XCUY+ecLc1v3+XWc1Aru5BnS2iS1dTL4DLTaLREU0QzGN1suEtfyEzX3OnW8uneWBg==",
            "format": "x509",
            "publicKey": {
                "content": "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUNvd0JRWURLMlZ3QXlFQTN4WGRUQzdDVk1abnpzMElWWmVHYkhnMkNwdEdUNm0zOEpiR3Q0d2YrYUk9Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo="
            }
        }
    },
    "kind": "rekord"
}

lance pushed a commit to lance/rekor that referenced this issue Feb 26, 2024
Replacing the tags with the shas for the rekor-build-test-image and
rekor-e2e-test tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants