-
Notifications
You must be signed in to change notification settings - Fork 3
Enable attester selections from the request #44
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
Conversation
thomas-fossati
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
I’ve left a couple of comments inline.
As discussed, there should be accompanying documentation about the options format and the new configuration variable.
| listen-addr: 0.0.0.0:8895 | ||
| protocol: http | ||
| plugin-dir: attesters/bin | ||
| list-options: all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am probably missing something, but I don’t fully grasp why this should be configuration-defined behaviour, rather than being completely driven by the API user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to implement attester discovery with such config option. In your proposal, you mentioned the user have to specify at least "attester-id": null to include the evidence from attester-id. The option was added to make ratsd behave the same way as the current implementation without this PR. But I'd agree the user may want to perform the discovery first before the query and without restarting ratsd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to implement attester discovery with such config option. In your proposal, you mentioned the user have to specify at least
"attester-id": nullto include the evidence fromattester-id.
Oh, thanks. I forgot I had written that thing 😓
The option was added to make ratsd behave the same way as the current implementation without this PR. But I'd agree the user may want to perform the discovery first before the query and without restarting ratsd.
Perhaps we could leave it in as a temp backstop and remove it when we have implemented proper discovery.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thomas-fossati I've updated the README to include attester selection. The decision to remove such option and refine the default behavior should be determined in the Attester Discovery PR IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thomas-fossati API discovery is added in #51
|
Hi @thomas-fossati , I just created another PR to update the README. I'll include the instruction for the attester selection in README once that PR is merged. Please feel free to leave any comment, thanks! |
A new option is now added to config.yaml, list-options. If it's set to
"all", ratsd populates the EAT with CMW from all available attesters. If
it's set to "selected", the user must specify the name of each attester
along with the associated options in `attester-selection`. If the user
does not wish to specify the attester-specific option, "$attester_name":
"null" should be specified. The following is an example of the request
body.
```
{
"nonce": "base64urlencoded",
"attester-selection": {
"attester-id-1": {
"param11name": "param11value",
"param12name": "param12value"
},
"attester-id-2": {
"param21name": "param21value"
},
"attester-id-3": null
}
}
```
Signed-off-by: Ian Chin Wang <[email protected]>
4996fc4 to
5c0775a
Compare
|
Hi, @cowbon: before merging, please fix the DCO check. Thanks! |
Signed-off-by: Ian Chin Wang <[email protected]> Co-authored-by: Thomas Fossati <[email protected]>
Looks like Github does not add the SOB of the original author automatically when committing the recommend changes. Will have to do this manually, thanks for pointing out |
A new option is now added tp config.yaml, list-options. If it's set to
all, ratsd populates the EAT with CMW from all available attesters. If it's set toselected, the user must specify the name of each attester along with the associated options inattester-selection. If the user does not wish to specify the attester-specific option, "$attester_name": "null" should be specified. The following is an example of the request body.{ "nonce": "base64urlencoded", "attester-selection": { "attester-id-1": { "param11name": "param11value", "param12name": "param12value" }, "attester-id-2": { "param21name": "param21value" }, "attester-id-3": null } }