-
Notifications
You must be signed in to change notification settings - Fork 21
feat: add JSON API for FDO Owner Server with OpenAPI specification #130
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
Draft
djach7
wants to merge
11
commits into
fido-device-onboard:main
Choose a base branch
from
djach7:owner-api-refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
54a89f1
feat: add JSON API for FDO Owner Server with oapi-codegen implementation
djach7 ca11436
fix(api): pass database instance to Server struct for owner redirect …
djach7 aedaa0d
fix(api): addressing some of Miguel's comments, reworking with go gen…
djach7 3d67f60
feat(api): implemented shared structure to enable sharing of endpoint…
djach7 8d7652a
fix(api): addresses feedback, implements shared-types.go to prevent d…
djach7 4d2aa43
fix(api): addressed Ken's feedback, fixed rvinfo, created owner package
djach7 263ab7c
fix(api): remove ownerinfo endpoint and add JSON unmarshaling
djach7 b8a742c
fix(api): define application/x-pem-file content type response
djach7 0b2e3b1
fix(api): first pass at reworking implementation to bring in line wit…
djach7 533819a
fix(api): fix health endpoints
djach7 039cd93
fix(api): fix CI (hopefully)
djach7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| openapi: 3.0.3 | ||
| info: | ||
| title: FDO Server - Shared Components | ||
| version: 1.0.0 | ||
| description: Shared components for FDO Server APIs | ||
|
|
||
| paths: {} | ||
|
|
||
| components: | ||
| schemas: | ||
| Error: | ||
| type: object | ||
| required: | ||
| - error | ||
| - message | ||
| properties: | ||
| error: | ||
| type: string | ||
| description: Error type identifier | ||
| message: | ||
| type: string | ||
| description: Human-readable error message | ||
| details: | ||
| type: string | ||
| description: Additional error details | ||
|
|
||
| VoucherInsertResponse: | ||
| type: object | ||
| required: | ||
| - processed | ||
| - inserted | ||
| properties: | ||
| processed: | ||
| type: integer | ||
| description: Number of vouchers processed | ||
| inserted: | ||
| type: integer | ||
| description: Number of vouchers successfully inserted | ||
|
|
||
| VoucherResponse: | ||
| type: object | ||
| required: | ||
| - voucher | ||
| - encoding | ||
| properties: | ||
| voucher: | ||
| type: string | ||
| description: Base64 encoded voucher data | ||
| encoding: | ||
| type: string | ||
| enum: ["pem"] | ||
| description: Voucher encoding format | ||
|
|
||
| RVTO2Addr: | ||
| type: object | ||
| required: | ||
| - rvto2addr | ||
| properties: | ||
| rvto2addr: | ||
| type: array | ||
| items: | ||
| type: array | ||
| items: | ||
| oneOf: | ||
| - type: integer | ||
| - type: string | ||
| description: Rendezvous TO2 address information | ||
|
Comment on lines
+27
to
+67
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are specific types, the should go in the respective APIs, please see #156 |
||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This definition is wrong and seems to correspond to the rvinfo not to the rvto2addr, please see https://github.com/fido-device-onboard/go-fdo-server/pull/154/changes#diff-2e7681f1cfb4420391185bff11a9619926890b4b81b8558b59ac964c251e5628R92-R113