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

Document auth policies in OpenAPI #2049

Merged
merged 9 commits into from
Jan 7, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 39 additions & 2 deletions doc/schemas/app_openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,23 @@
},
"type": "array"
}
},
"securitySchemes": {
"bearer_jwt": {
"bearerFormat": "JWT",
"scheme": "bearer",
"type": "http"
},
"member_signature": {
"description": "Request must be signed according to the HTTP Signature scheme. The signer must be a member identity registered with this service.",
"scheme": "signature",
"type": "http"
},
"user_signature": {
"description": "Request must be signed according to the HTTP Signature scheme. The signer must be a user identity registered with this service.",
"scheme": "signature",
"type": "http"
}
}
},
"info": {
Expand Down Expand Up @@ -782,7 +799,19 @@
},
"description": "Default response description"
}
}
},
"security": [
{
"user_signature": []
},
{
"member_signature": []
},
{
"bearer_jwt": []
},
{}
]
}
},
"/network_info": {
Expand Down Expand Up @@ -966,7 +995,15 @@
},
"description": "Default response description"
}
}
},
"security": [
{
"user_signature": []
},
{
"member_signature": []
}
]
}
}
},
Expand Down
99 changes: 87 additions & 12 deletions doc/schemas/gov_openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,18 @@
},
"type": "array"
}
},
"securitySchemes": {
"member_signature": {
"description": "Request must be signed according to the HTTP Signature scheme. The signer must be a member identity registered with this service.",
"scheme": "signature",
"type": "http"
},
"user_signature": {
"description": "Request must be signed according to the HTTP Signature scheme. The signer must be a user identity registered with this service.",
"scheme": "signature",
"type": "http"
}
}
},
"info": {
Expand Down Expand Up @@ -502,7 +514,12 @@
},
"description": "Default response description"
}
}
},
"security": [
{
"member_signature": []
}
]
}
},
"/ack/update_state_digest": {
Expand All @@ -518,7 +535,12 @@
},
"description": "Default response description"
}
}
},
"security": [
{
"member_signature": []
}
]
}
},
"/api": {
Expand Down Expand Up @@ -728,7 +750,12 @@
},
"description": "Default response description"
}
}
},
"security": [
{
"member_signature": []
}
]
}
},
"/proposals/{proposal_id}": {
Expand All @@ -744,7 +771,12 @@
},
"description": "Default response description"
}
}
},
"security": [
{
"member_signature": []
}
]
},
"parameters": [
{
Expand Down Expand Up @@ -790,7 +822,12 @@
},
"description": "Default response description"
}
}
},
"security": [
{
"member_signature": []
}
]
}
},
"/proposals/{proposal_id}/votes/{member_id}": {
Expand All @@ -806,7 +843,12 @@
},
"description": "Default response description"
}
}
},
"security": [
{
"member_signature": []
}
]
},
"parameters": [
{
Expand Down Expand Up @@ -850,7 +892,12 @@
},
"description": "Default response description"
}
}
},
"security": [
{
"member_signature": []
}
]
}
},
"/query": {
Expand All @@ -876,7 +923,12 @@
},
"description": "Default response description"
}
}
},
"security": [
{
"member_signature": []
}
]
}
},
"/read": {
Expand All @@ -902,7 +954,12 @@
},
"description": "Default response description"
}
}
},
"security": [
{
"member_signature": []
}
]
}
},
"/receipt": {
Expand Down Expand Up @@ -972,7 +1029,12 @@
},
"description": "Default response description"
}
}
},
"security": [
{
"member_signature": []
}
]
},
"post": {
"requestBody": {
Expand All @@ -996,7 +1058,12 @@
},
"description": "Default response description"
}
}
},
"security": [
{
"member_signature": []
}
]
}
},
"/tx": {
Expand Down Expand Up @@ -1060,7 +1127,15 @@
},
"description": "Default response description"
}
}
},
"security": [
{
"user_signature": []
},
{
"member_signature": []
}
]
}
}
},
Expand Down
22 changes: 21 additions & 1 deletion doc/schemas/node_openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,18 @@
},
"type": "array"
}
},
"securitySchemes": {
"member_signature": {
"description": "Request must be signed according to the HTTP Signature scheme. The signer must be a member identity registered with this service.",
"scheme": "signature",
"type": "http"
},
"user_signature": {
"description": "Request must be signed according to the HTTP Signature scheme. The signer must be a user identity registered with this service.",
"scheme": "signature",
"type": "http"
}
}
},
"info": {
Expand Down Expand Up @@ -828,7 +840,15 @@
},
"description": "Default response description"
}
}
},
"security": [
{
"user_signature": []
},
{
"member_signature": []
}
]
}
}
},
Expand Down
Loading