WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
39 changes: 28 additions & 11 deletions IETF-RFC.md
Original file line number Diff line number Diff line change
Expand Up @@ -1677,23 +1677,40 @@ OCM Providers.
| - inviteAcceptDialog |
| - provider |
| - publicKey |
| - tokenEndpoint |
| - publicKeys[] |
| - tokenEndPoint |
+-----------------------+
|
| exposes
|
+---------+---------+----------------------+
| | |
v v v
+------------------+ +------------------+ +------------------+
| ResourceTypes[] | | Capabilities[] | | Criteria[] |
+------------------+ +------------------+ +------------------+
| - name | | - enforce-mfa | | - allowlist |
| - shareTypes[] | | - exchange-token | | - denylist |
| - protocols{} | | - invite-wayf | | - http-signatures|
+------------------+ | - invites | | - invite |
| | - webdav-uri | | - token-exchange |
| +------------------+ +------------------+
v v |
+------------------+ +------------------+ |
| ResourceTypes[] | | Capabilities[] | |
+------------------+ +------------------+ |
| - name | | - enforce-mfa | |
| - shareTypes[] | | - exchange-token | |
| - protocols{} | | - http-sig | |
+------------------+ | - invites | |
| | - notifications | |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to see this diagram updated :) the concern is whether to put some ... and refer to the single source of truth in the same document, to avoid this part to drift?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'll do it!

| | - protocol-object| |
| | - webdav-uri | |
| +------------------+ |
| |
| +----------------+
| |
| v
| +--------------------------+
| | Criteria[] |
| +--------------------------+
| | - allowlist |
| | - denylist |
| | - http-request-signatures|
| | - invite |
| | - token-exchange |
| +--------------------------+
|
| supports
v
+------------------+
Expand Down
101 changes: 0 additions & 101 deletions schemas/ocm-discovery.json

This file was deleted.

88 changes: 88 additions & 0 deletions schemas/ocm-discovery.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
// Discovery schema for OCM API Discovery (JSON Schema, JSONC for comments).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to add comments here? This is possibly to be brought to the WG chairs, also to understand how to evolve the spec and keep things aligned between the I-D, the OpenAPI file and the JSON schemas here.

Maybe I'd take this change out of the PR as the rest is pretty much good to go, and then we discuss this on its own.

//
// Content source of truth: IETF-RFC.md (this repo).
//
// Mixed URL forms (per draft wording):
// - inviteAcceptDialog is a URL path (starts with "/"), resolved at the server origin.
// - tokenEndPoint is a URL (typically https://...) of the token exchange endpoint.
//
"title": "OCM API Discovery",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"enabled": { "type": "boolean" },
"apiVersion": { "type": "string" },
"endPoint": { "type": "string", "format": "uri" },
"provider": { "type": "string" },
"resourceTypes": {
"type": "array",
"items": { "$ref": "#/$defs/resourceType" }
},
"capabilities": {
"type": "array",
"description": "Optional capability tokens (for example: enforce-mfa, exchange-token, http-sig, invites, invite-wayf, notifications, protocol-object, webdav-uri).",
"items": { "type": "string" }
},
"criteria": {
"type": "array",
"description": "Optional criteria tokens (for example: http-request-signatures, token-exchange, denylist, allowlist, invite).",
"items": { "type": "string" }
},
"publicKey": { "$ref": "#/$defs/publicKeyLegacy" },
"publicKeys": {
"type": "array",
"description": "Optional public keys for RFC 9421 HTTP Message Signatures (see IETF-RFC.md).",
"items": { "$ref": "#/$defs/publicKeyRfc9421" }
},
"inviteAcceptDialog": {
"type": "string",
"pattern": "^/",
"description": "URL path of a web page where a user can accept an invite (see IETF-RFC.md)."
},
"tokenEndPoint": {
"type": "string",
"format": "uri",
"pattern": "^https?://",
"description": "URL of the token exchange endpoint (see IETF-RFC.md)."
}
},
"required": ["enabled", "apiVersion", "endPoint", "resourceTypes"],
"$defs": {
"resourceType": {
"properties": {
"name": { "type": "string" },
"shareTypes": { "type": "array" },
"protocols": { "$ref": "#/$defs/protocols" }
},
"required": ["name", "shareTypes", "protocols"]
},
"protocols": {
"type": "object",
"minProperties": 1,
"description": "Additional protocols besides 'webdav', 'webapp' and 'ssh' may be defined.",
"properties": {
"webdav": { "type": "string", "pattern": "^/" },
"webapp": { "type": "string", "pattern": "^/" },
"ssh": { "type": "string" }
}
},
"publicKeyLegacy": {
"type": "object",
"properties": {
"keyId": { "type": "string" },
"publicKeyPem": { "type": "string" }
},
"required": ["keyId", "publicKeyPem"]
},
"publicKeyRfc9421": {
"type": "object",
"properties": {
"keyId": { "type": "string" },
"publicKeyPem": { "type": "string" },
"algorithm": { "type": "string" }
},
"required": ["keyId", "publicKeyPem", "algorithm"]
}
}
}
8 changes: 4 additions & 4 deletions spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ components:
type: array
description: >
Array of public keys for RFC 9421 HTTP Message Signatures.
Servers advertising the "rfc-http-sig" capability MUST provide this field.
Servers advertising the "http-sig" capability MUST provide this field.
Clients SHOULD prefer RFC 9421 signatures when this capability is present.
items:
type: object
Expand Down Expand Up @@ -482,7 +482,7 @@ components:
type: string
format: uri
description: >
Optional URL path of the Token Exchange endpoint to obtain bearer tokens in exchange for codes.
Optional URL of the Token Exchange endpoint to obtain bearer tokens in exchange for codes.
If the `exchange-token` capability is exposed, the tokenEndPoint MUST be advertised in the discovery response.

**Token Exchange API:**
Expand All @@ -499,7 +499,7 @@ components:
- 400: Token denied (application/json with Error schema)

See TokenRequest and TokenResponse schemas for the complete data structure.
example: /index.php/apps/sciencemesh/token
example: https://cloud.example.org/ocm/token
inviteAcceptDialog:
type: string
description: >
Expand Down Expand Up @@ -789,7 +789,7 @@ components:
sharedSecret: hfiuhworzwnur98d3wjiwhr
viewMode: read
ssh:
accessType: ['datatx']
accessTypes: ['datatx']
uri: [email protected]:/7c084226-d9a1-11e6-bf26-cec0c932ce01
NewNotification:
type: object
Expand Down
Loading