-
Notifications
You must be signed in to change notification settings - Fork 60
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
User should be able to set what algos to use for digest calculation in config file #73
Comments
Just need to hook the config file into this function https://github.com/testifysec/witness/blob/ebb7c3d23f2529a0f40d372b7b3ec5546e6a7847/pkg/attestation/context.go#L27 Any hash calculations done in attestors should ask the context which hashes it needs to use. |
Is anyone working on this? I can take a look sometime next couple weeks, if no one else is |
Appreciate the help @DataDavD. Let us know if you have any questions or need any help along the way. |
hey no problem @jkjell. Actually, I just realized this probably needs to be in the I'm guessing the pkg code was split into go-witness? (side question: any history about why that was done and not just kept with the |
Hi @DataDavD! Thanks for taking a look into this. You should be able to use the As for why Witness and go-witness got split: We wanted to use go-witness in other applications, but some of Witness's go-modules were causing issues. Along that same thread, we tried to keep the go-witness dependencies lighter than what Witness as a whole would use -- for instance, we didn't want the library to be opinionated about what logging library was used. Hopefully, this answers your question, and again thanks so much for looking into this. |
Hey, just a small update. Started really digging in. Should have something more concrete, or more concrete questions later this weekend. Thanks again! |
Hey @mikhailswift. Maybe I'm confused, but is the expectation to have the availability of adding algos cobra.Command run parts like what is done/handled here: https://github.com/testifysec/witness/blob/4a41144b6402e7d175a657a359a66b41022dccd4/cmd/run.go#L111-L118 Or, should it be handled solely in the witness lib itself? For context/help: this is kind of what I was thinking....but maybe I'm on the wrong path? Thanks, |
Hey @mikhailswift just bumping this just in case you missed my previous comment. Thanks |
Sorry, I did miss that. I think you're on the right path. My only suggestion would be to have |
Oh no problem at all. Got it, makes more sense. I'll make those changes. Thank you |
Introduce cobra/config flag that allows for slice of string's indicating hash algorithms to be used for digest calculation. Uses go-witness.attestation.WithHashes to add the slice to attestation run options. Will error if can't parse hash from its string value. Add to run tests to test for acceptable/unacceptable hash algorithms. accepted Refs: in-toto#73
Introduce cobra/config flag that allows for slice of string's indicating hash algorithms to be used for digest calculation. Uses go-witness.attestation.WithHashes to add the slice to attestation run options. Will error if can't parse hash from its string value. Add to run tests to test for acceptable/unacceptable hash algorithms. accepted Refs: in-toto#73
Introduce cobra/config flag that allows for slice of string's indicating hash algorithms to be used for digest calculation. Uses go-witness.attestation.WithHashes to add the slice to attestation run options. Will error if can't parse hash from its string value. Add test for testing acceptable/unacceptable hash algorithms accepted. Refs: in-toto#73
Introduce cobra/config flag that allows for slice of string's indicating hash algorithms to be used for digest calculation. Uses go-witness.attestation.WithHashes to add the slice to attestation run options. Will error if can't parse hash from its string value. Add test for testing acceptable/unacceptable hash algorithms accepted. Refs: in-toto#73
Introduce cobra/config flag that allows for slice of string's indicating hash algorithms to be used for digest calculation. Uses go-witness.attestation.WithHashes to add the slice to attestation run options. Will error if can't parse hash from its string value. Add test for testing acceptable/unacceptable hash algorithms accepted. Refs: in-toto#73
Introduce cobra/config flag that allows for slice of string's indicating hash algorithms to be used for digest calculation. Uses go-witness.attestation.WithHashes to add the slice to attestation run options. Will error if can't parse hash from its string value. Add test for testing acceptable/unacceptable hash algorithms accepted. Refs: in-toto#73
Introduce cobra/config flag that allows for slice of string's indicating hash algorithms to be used for digest calculation. Uses go-witness.attestation.WithHashes to add the slice to attestation run options. Will error if can't parse hash from its string value. Add test for testing acceptable/unacceptable hash algorithms accepted. Refs: in-toto#73
Introduce cobra/config flag that allows for slice of string's indicating hash algorithms to be used for digest calculation. Uses go-witness.attestation.WithHashes to add the slice to attestation run options. Will error if can't parse hash from its string value. Add test for testing acceptable/unacceptable hash algorithms accepted. Refs: #73
Closed by #292 |
No description provided.
The text was updated successfully, but these errors were encountered: