-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
[BACK-2637] palmtree api #90
base: master
Are you sure you want to change the base?
Changes from all commits
d347464
3618b58
ca5940f
3523ade
1484802
4f6c59a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ build | |
.idea/ | ||
/node_modules/ | ||
/tools/ | ||
.DS_Store |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
title: Challenge | ||
description: Challenge generated by server. | ||
type: object | ||
properties: | ||
challenge: | ||
type: string | ||
minLength: 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
title: Assertion Secret | ||
description: Data sent back upon successful app assertion. | ||
type: object | ||
properties: | ||
data: | ||
oneOf: | ||
- $ref: './coastalresponse.v1.yaml' | ||
- $ref: './palmtreeresponse.v1.yaml' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
title: Assertion Verify | ||
description: Request body for verifying an assertion. | ||
type: object | ||
properties: | ||
assertion: | ||
type: string | ||
pattern: '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$' | ||
description: Base64 encoded data received from Apple App Attest API. User must base64 encode the binary data received from Apple. | ||
clientData: | ||
type: object | ||
properties: | ||
challenge: | ||
description: The previously returned assertion challenge. | ||
type: string | ||
minLength: 1 | ||
partner: | ||
description: Code name of partner to retrieve certificate from. | ||
type: string | ||
minLength: 1 | ||
enum: | ||
- Coastal | ||
- PalmTree | ||
partnerData: | ||
oneOf: | ||
- $ref: './coastalrequest.v1.yaml' | ||
- $ref: './palmtreerequest.v1.yaml' | ||
description: Actual data requested by client. Must include the previously requested challenge. | ||
keyId: | ||
$ref: './keyid.v1.yaml' | ||
description: Base64 encoded key Id received from Apple App Attest API. | ||
required: | ||
- attestation | ||
- clientData | ||
- keyId |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
title: Attestation Verify | ||
description: Request body for verifying an attestation. | ||
type: object | ||
properties: | ||
attestation: | ||
type: string | ||
pattern: '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$' | ||
description: Base64 encoded data received from Apple App Attest API. User must base64 encode the binary data received from Apple. | ||
challenge: | ||
type: string | ||
minLength: 1 | ||
description: The previously returned attestation challenge. | ||
keyId: | ||
$ref: './keyid.v1.yaml' | ||
required: | ||
- attestation | ||
- challenge | ||
- keyId |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
title: Coastal Request Data | ||
description: Data to send to Coastal's API. | ||
type: object | ||
properties: | ||
rcInstanceId: | ||
type: string | ||
minLength: 1 | ||
rcHWVersion: | ||
type: string | ||
rcSWVersion: | ||
type: string | ||
phdTypeId: | ||
type: string | ||
minLength: 1 | ||
phdInstanceId: | ||
type: string | ||
minLength: 1 | ||
csr: | ||
type: string | ||
pattern: '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$' | ||
description: Base64 encoded string of the PEM formatted certificate signing request to Coastal. | ||
minLength: 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
title: Coastal Response | ||
description: Data retrieved from Coastal's API. | ||
type: object | ||
properties: | ||
certificates: | ||
description: X.509 certificates to be used for client authentication. | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
content: | ||
type: string | ||
pattern: '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$' | ||
description: base64 encoded X.509 certificate in DER format. | ||
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. Huh, kinda weird that they just don't use PEM here, but I guess base64-encoded DER saves a few bytes probably... shrug. Just a weird observation. |
||
ttlInDays: | ||
type: integer | ||
type: | ||
type: string | ||
enum: | ||
- CONSTRAINED | ||
- WILDCARD |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
title: Key Id | ||
description: Base64 encoded key identifier received from apple. The Key Id is some shortened data, usually a hash, used to identify the longer actual key. | ||
type: string | ||
pattern: '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
title: New App Challenge | ||
description: Information needed when generating an attestation or assertion challenge. | ||
type: object | ||
properties: | ||
keyId: | ||
type: string | ||
pattern: '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$' | ||
description: Base64 encoded key Id received from Apple App Attest API. | ||
required: | ||
- keyId |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
title: Palm Tree Request Data | ||
description: Data to send to Palm Tree's API. | ||
type: object | ||
properties: | ||
csr: | ||
description: Base64 encoded string of the DER formatted certificate signing request to PalmTree. | ||
type: string | ||
pattern: '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
title: Palm Tree Response | ||
description: Data retrieved from Palm Tree's API. | ||
type: object | ||
properties: | ||
type: | ||
type: string | ||
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. This is likely an enum of some sort? |
||
enrollment: | ||
type: object | ||
properties: | ||
body: | ||
type: string | ||
description: PEM encoded certificate. | ||
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. LOL, so Palm Tree uses PEM and Coastal Base64-encoded DER. Weird. |
||
id: | ||
type: string | ||
issuerName: | ||
type: string | ||
serialNumber: | ||
type: string | ||
subjectName: | ||
type: string | ||
status: | ||
type: string | ||
validityPeriod: | ||
type: string |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
title: Base64 | ||
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. Is this file referenced anywhere? It'd be good if it could be used, as it's hard to proof check that regex pattern in the many places it's used, especially compared to proofchecking the spelling of "base64.v1.yaml" :D |
||
type: string | ||
description: Base64 encoded data. | ||
pattern: '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$' |
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.
Since each of these enums aligns with a particular type of partner data, it would make sense to lift the oneOf up a level to the clientData object, so that a user can't supply "PalmTree" for the partner, which a verification from Coastal, and vice versa.