Skip to content

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

cowbon
Copy link
Collaborator

@cowbon cowbon commented Mar 19, 2025

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 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
  }
}

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 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]>
Copy link
Contributor

@thomas-fossati thomas-fossati left a 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.

@@ -4,3 +4,4 @@ ratsd:
listen-addr: 0.0.0.0:8895
protocol: http
plugin-dir: attesters/bin
list-options: all
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

Copy link
Contributor

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.

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.

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

Successfully merging this pull request may close these issues.

2 participants