Skip to content

Commit

Permalink
fix: lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
murali-shris committed Jan 15, 2025
1 parent 615e141 commit 7989136
Showing 1 changed file with 41 additions and 23 deletions.
64 changes: 41 additions & 23 deletions specification/at_protocol_specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,7 @@ Following is the regex

**Response:**

<!-- pyml disable-num-lines 3 md013-->
```text
data: {id: e8213024-ea78-475b-a8a7-d2ccc9fa5939, fromAtSign: @alice, notificationDateTime: 2025-01-10 10:08:44.090Z, toAtSign: @bob, notification: @bob:shared_key@alice, type: NotificationType.sent, opType: OperationType.update, messageType: MessageType.key, priority: NotificationPriority.low, notificationStatus: NotificationStatus.queued, retryCount: 1, strategy: all, depth: 1, notifier: SYSTEM, expiresAt: 2025-01-10 10:23:44.092Z, atValue: null, atMetadata: {createdBy: @alice, ttl: 0, ttb: 0, isEncrypted: true}, ttl: 900000}
```
Expand All @@ -1112,6 +1113,7 @@ The "notify:all" allows to notify multiple @sign's at the same time.

Following is the regex

<!-- pyml disable-num-lines 3 md013-->
```text
notify:all:((?<operation>update|delete):)?(messageType:((?<messageType>key|text):))?(?:ttl:(?<ttl>\d+):)?(?:ttb:(?<ttb>\d+):)?(?:ttr:(?<ttr>-?\d+):)?(?:ccd:(?<ccd>true|false+):)?(?<forAtSign>(([^:\s])+)?(,([^:\s]+))*)(:(?<atKey>[^@:\s]+))(@(?<atSign>[^@:\s]+))?(:(?<value>.+))?$
```
Expand All @@ -1128,7 +1130,8 @@ notify:all:((?<operation>update|delete):)?(messageType:((?<messageType>key|text)

**Description:**

The verb allows to notify multiple @sign's at the same time. The client should be authenticated to the server prior to using the notify verb.
The verb allows to notify multiple @sign's at the same time.
The client should be authenticated to the server prior to using the notify verb.
To notify a key use messageType:key. To notify a message use messageType:text.


Expand Down Expand Up @@ -1184,14 +1187,19 @@ The `enroll` verb can be used to submit an APKAM enrollment.

Regex for enroll verb

`enroll:(?<operation>(?:(request|approve|deny|revoke|list|fetch|unrevoke|delete)))(:(?<force>force))?(?::)?((?<enrollParams>.+)|(<=list:)<enrollParams>.?)?$`
<!-- pyml disable-num-lines 3 md013-->
```text
enroll:(?<operation>(?:(request|approve|deny|revoke|list|fetch|unrevoke|delete)))(:(?<force>force))?(?::)?((?<enrollParams>.+)|(<=list:)<enrollParams>.?)?$
```

**Example:**

Submit an enrollment:

`enroll:request:{"appName":"wavi","deviceName":"iphone","namespaces":{"wavi":"rw"},"otp":"<otp>","apkamPublicKey":"<apkamPublicKey>","encryptedAPKAMSymmetricKey": "<encryptedAPKAMSymmetricKey>"}`

<!-- pyml disable-num-lines 3 md013-->
```text
enroll:request:{"appName":"wavi","deviceName":"iphone","namespaces":{"wavi":"rw"},"otp":"<otp>","apkamPublicKey":"<apkamPublicKey>","encryptedAPKAMSymmetricKey": "<encryptedAPKAMSymmetricKey>"}`
```
Response:

```text
Expand All @@ -1200,6 +1208,7 @@ data:{"enrollmentId":<enrollmentId>, "status": "pending"}

Approve an enrollment:

<!-- pyml disable-num-lines 3 md013-->
```text
enroll:approve:{"enrollmentId":<enrollmentId>,"encryptedDefaultEncryptionPrivateKey":<encryptedDefaultEncryptionPrivateKey>,"encPrivateKeyIV":"<encryptionPrivateKeyIV>","encryptedDefaultSelfEncryptionKey": "<encryptedDefaultSelfEncryptionKey>","selfEncKeyIV":"<selfEncryptionKeyIV>"}
```
Expand Down Expand Up @@ -1258,8 +1267,11 @@ enroll:list

**Description:**

Enroll verb enables a new app or client to request new enrollment to a secondary server.Secondary server will notify the new enrollment request to already enrolled apps which have access to __manage namespace.
The enrolled app which receives the notification may approve or reject the enrollment request.
Enroll verb enables a new app or client to request new enrollment to a
secondary server. Secondary server will notify the new enrollment request
to already enrolled apps which have access to __manage namespace.
The enrolled app which receives the notification may approve or
reject the enrollment request.

<!-- pyml disable-num-lines 3 md013-->
| Option | Required | Description |
Expand All @@ -1276,7 +1288,8 @@ The enrolled app which receives the notification may approve or reject the enrol

**Synopsis:**

The `otp` verb can be used get an otp from secondary server. The otp will be used while submitting an APKAM enrollment request.
The `otp` verb can be used get an otp from secondary server.
The otp will be used while submitting an APKAM enrollment request.

**Syntax:**

Expand Down Expand Up @@ -1317,14 +1330,17 @@ data:ok

**Description:**

Otp verb can be used to get an one time passcode from server to be used for APKAM enrollment. It can also be used to
save a one time semi-permanent passcode which can be used a client/command line app for enrollments.
Otp verb can be used to get an one time passcode from server to be used for
APKAM enrollment. It can also be used to save a one time
semi-permanent passcode which can be used a client/command line
app for enrollments.

#### The `keys` verb

**Synopsis:**

The `keys` verb is specifically used to update security keys to the secondary keystore.
The `keys` verb is specifically used to update security keys to
the secondary keystore.

**Syntax:**

Expand All @@ -1339,8 +1355,10 @@ keys:((?<operation>put|get|delete):?)(?:(?<visibility>public|private|self):?)?(?

Put an encryption public key

`keys:put:public:namespace:__global:keyType:rsa2048:keyName:encryption_<enrollmentId> <rsa_public_key>`

<!-- pyml disable-num-lines 3 md013-->
```text
keys:put:public:namespace:__global:keyType:rsa2048:keyName:encryption_<enrollmentId> <rsa_public_key>`
```
Response

```text
Expand All @@ -1349,8 +1367,10 @@ data:-1

Put a symmetric AES key which is encrypted with encryption public key

`keys:put:self:namespace:__global:appName:wavi:deviceName:iphone:keyType:aes256:encryptionKeyName:encryption_<enrollmentId>:keyName:myAESkey <encryptedAESKey>`

<!-- pyml disable-num-lines 3 md013-->
```text
keys:put:self:namespace:__global:appName:wavi:deviceName:iphone:keyType:aes256:encryptionKeyName:encryption_<enrollmentId>:keyName:myAESkey <encryptedAESKey>
```
Response

```text
Expand All @@ -1359,10 +1379,13 @@ data:-1

Get encryption public key for an enrollment

`keys:get:keyName:public:encryption_<enrollmentId>.__public_keys.__global@alice`
```text
keys:get:keyName:public:encryption_<enrollmentId>.__public_keys.__global@alice
```

Response

<!-- pyml disable-num-lines 3 md013-->
```text
data: {"enrollmentId":<enrollmentId>, "keyType":rsa2048, "value": <rsa_public_key>}
```
Expand All @@ -1371,7 +1394,8 @@ data: {"enrollmentId":<enrollmentId>, "keyType":rsa2048, "value": <rsa_public_k

**Synopsis:**

The `batch` verb is used to send multiple verbs to the server in a single command
The `batch` verb is used to send multiple verbs to the server in a
single command

**Syntax:**

Expand All @@ -1385,6 +1409,7 @@ batch:(?<json>.+)$

Send an update and delete:

<!-- pyml disable-num-lines 3 md013-->
```text
batch:[{"id":1, "commmand":"update:location@alice newyork"},{"id":2, "commmand":"delete:location@alice"}]
```
Expand All @@ -1394,13 +1419,6 @@ Response:
data: [{"id":1, "response":"{"data":1}"},{"id":2, "response":"{"data":2}"}]
```








### Utility / Miscellaneous Verbs

#### The `stats` verb
Expand Down

0 comments on commit 7989136

Please sign in to comment.