@fedify/fedify 1.1.0-dev.444 → 1.1.0-dev.447

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGES.md CHANGED
@@ -16,6 +16,25 @@ To be released.
16
16
 
17
17
  - Added `EmojiReact` class to Activity Vocabulary API. [[FEP-c0e0]]
18
18
 
19
+ - Added `successor` property to the `Actor` types in the Activity
20
+ Vocabulary API.
21
+
22
+ - Added `Application.successor` property.
23
+ - `new Application()` constructor now accepts `successor` option.
24
+ - `Application.clone()` method now accepts `successor` option.
25
+ - Added `Group.successor` property.
26
+ - `new Group()` constructor now accepts `successor` option.
27
+ - `Group.clone()` method now accepts `successor` option.
28
+ - Added `Organization.successor` property.
29
+ - `new Organization()` constructor now accepts `successor` option.
30
+ - `Organization.clone()` method now accepts `successor` option.
31
+ - Added `Person.successor` property.
32
+ - `new Person()` constructor now accepts `successor` option.
33
+ - `Person.clone()` method now accepts `successor` option.
34
+ - Added `Service.successor` property.
35
+ - `new Service()` constructor now accepts `successor` option.
36
+ - `Service.clone()` method now accepts `successor` option.
37
+
19
38
  - Added `DidService` class to Activity Vocabulary API.
20
39
  [[FEP-9091], [#146]]
21
40
 
@@ -56,15 +75,47 @@ To be released.
56
75
  - `Service.clone()` method now accepts `service` option.
57
76
  - `Service.clone()` method now accepts `services` option.
58
77
 
78
+ - The default time window for verifying HTTP Signatures of incoming requests
79
+ is now an hour (was a minute). This new default window is according to
80
+ the [ActivityPub and HTTP Signatures] document.
81
+
82
+ - The default value of `VerifyRequestOptions.timeWindow` option became
83
+ `{ hours: 1 }` (was `{ minutes: 1 }`).
84
+
85
+ - The default value of `CreateFederationOptions.signatureTimeWindow`
86
+ option became `{ hours: 1 }` (was `{ minutes: 1 }`).
87
+
88
+ - The type of `VerifyRequestOptions.timeWindow` property became
89
+ `Temporal.Duration | Temporal.DurationLike | false`
90
+ (was `Temporal.DurationLike | false`).
91
+
92
+ - The type of `CreateFederationOptions.signatureTimeWindow` property
93
+ became `Temporal.Duration | Temporal.DurationLike | false`
94
+ (was `Temporal.DurationLike | false`).
95
+
59
96
  - In the `fedify inbox` command's web interface, the *Raw Activity* tab is
60
97
  added to show the raw JSON object of the received activity.
61
98
 
62
99
  [FEP-c0e0]: https://w3id.org/fep/c0e0
63
100
  [FEP-9091]: https://w3id.org/fep/9091
101
+ [ActivityPub and HTTP Signatures]: https://swicg.github.io/activitypub-http-signature/
64
102
  [#146]: https://github.com/dahlia/fedify/issues/146
65
103
  [#150]: https://github.com/dahlia/fedify/issues/150
66
104
 
67
105
 
106
+ Version 1.0.4
107
+ -------------
108
+
109
+ Released on October 17, 2024.
110
+
111
+ - Fixed a bug where `Actor.aliasId` and `Actor.aliasIds` properties had been
112
+ represented as `as:alsoKnownAs` property instead of `alsoKnownAs` property
113
+ in compacted JSON-LD objects.
114
+
115
+ - Improved compatibility with Bridgy Fed for Bluesky where it puts
116
+ an invalid URI with the format `at://...` in the `alsoKnownAs` property.
117
+
118
+
68
119
  Version 1.0.3
69
120
  -------------
70
121
 
@@ -101,7 +101,7 @@ export class FederationImpl {
101
101
  ? (identity) => getAuthenticatedDocumentLoader(identity, true)
102
102
  : getAuthenticatedDocumentLoader);
103
103
  this.onOutboxError = options.onOutboxError;
104
- this.signatureTimeWindow = options.signatureTimeWindow ?? { minutes: 1 };
104
+ this.signatureTimeWindow = options.signatureTimeWindow ?? { hours: 1 };
105
105
  this.skipSignatureVerification = options.skipSignatureVerification ?? false;
106
106
  this.outboxRetryPolicy = options.outboxRetryPolicy ??
107
107
  createExponentialBackoffPolicy();
package/esm/sig/http.js CHANGED
@@ -131,7 +131,8 @@ export async function verifyRequest(request, { documentLoader, contextLoader, ti
131
131
  const date = dntShim.Temporal.Instant.from(new Date(dateHeader).toISOString());
132
132
  const now = currentTime ?? dntShim.Temporal.Now.instant();
133
133
  if (timeWindow !== false) {
134
- const tw = timeWindow ?? { minutes: 1 };
134
+ const tw = timeWindow ??
135
+ { hours: 1 };
135
136
  if (dntShim.Temporal.Instant.compare(date, now.add(tw)) > 0) {
136
137
  logger.debug("Failed to verify; Date is too far in the future.", { date: date.toString(), now: now.toString() });
137
138
  return null;
@@ -11,7 +11,13 @@ defaultContext:
11
11
  - "https://w3id.org/security/data-integrity/v1"
12
12
  - "https://www.w3.org/ns/did/v1"
13
13
  - "https://w3id.org/security/multikey/v1"
14
- - manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
14
+ - alsoKnownAs:
15
+ "@id": "as:alsoKnownAs"
16
+ "@type": "@id"
17
+ manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
18
+ movedTo:
19
+ "@id": "as:movedTo"
20
+ "@type": "@id"
15
21
  toot: "http://joinmastodon.org/ns#"
16
22
  featured:
17
23
  "@id": "toot:featured"
@@ -245,6 +251,23 @@ properties:
245
251
  range:
246
252
  - "http://www.w3.org/2001/XMLSchema#boolean"
247
253
 
254
+ - singularName: successor
255
+ functional: true
256
+ compactName: movedTo
257
+ uri: "https://www.w3.org/ns/activitystreams#movedTo"
258
+ description: >-
259
+ Signifies that an actor has been moved to a different ID.
260
+ Used in Mastodon-style data portability with the {@link Move} activity;
261
+ see [ActivityPub Data Portability/Move
262
+ Action](https://swicg.github.io/activitypub-data-portability/#move-action)
263
+ for more details.
264
+ range:
265
+ - "https://www.w3.org/ns/activitystreams#Application"
266
+ - "https://www.w3.org/ns/activitystreams#Group"
267
+ - "https://www.w3.org/ns/activitystreams#Organization"
268
+ - "https://www.w3.org/ns/activitystreams#Person"
269
+ - "https://www.w3.org/ns/activitystreams#Service"
270
+
248
271
  - pluralName: aliases
249
272
  singularName: alias
250
273
  singularAccessor: true
@@ -11,7 +11,13 @@ defaultContext:
11
11
  - "https://w3id.org/security/data-integrity/v1"
12
12
  - "https://www.w3.org/ns/did/v1"
13
13
  - "https://w3id.org/security/multikey/v1"
14
- - manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
14
+ - alsoKnownAs:
15
+ "@id": "as:alsoKnownAs"
16
+ "@type": "@id"
17
+ manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
18
+ movedTo:
19
+ "@id": "as:movedTo"
20
+ "@type": "@id"
15
21
  toot: "http://joinmastodon.org/ns#"
16
22
  featured:
17
23
  "@id": "toot:featured"
@@ -245,6 +251,23 @@ properties:
245
251
  range:
246
252
  - "http://www.w3.org/2001/XMLSchema#boolean"
247
253
 
254
+ - singularName: successor
255
+ functional: true
256
+ compactName: movedTo
257
+ uri: "https://www.w3.org/ns/activitystreams#movedTo"
258
+ description: >-
259
+ Signifies that an actor has been moved to a different ID.
260
+ Used in Mastodon-style data portability with the {@link Move} activity;
261
+ see [ActivityPub Data Portability/Move
262
+ Action](https://swicg.github.io/activitypub-data-portability/#move-action)
263
+ for more details.
264
+ range:
265
+ - "https://www.w3.org/ns/activitystreams#Application"
266
+ - "https://www.w3.org/ns/activitystreams#Group"
267
+ - "https://www.w3.org/ns/activitystreams#Organization"
268
+ - "https://www.w3.org/ns/activitystreams#Person"
269
+ - "https://www.w3.org/ns/activitystreams#Service"
270
+
248
271
  - pluralName: aliases
249
272
  singularName: alias
250
273
  singularAccessor: true
@@ -11,7 +11,13 @@ defaultContext:
11
11
  - "https://w3id.org/security/data-integrity/v1"
12
12
  - "https://www.w3.org/ns/did/v1"
13
13
  - "https://w3id.org/security/multikey/v1"
14
- - manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
14
+ - alsoKnownAs:
15
+ "@id": "as:alsoKnownAs"
16
+ "@type": "@id"
17
+ manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
18
+ movedTo:
19
+ "@id": "as:movedTo"
20
+ "@type": "@id"
15
21
  toot: "http://joinmastodon.org/ns#"
16
22
  featured:
17
23
  "@id": "toot:featured"
@@ -245,6 +251,23 @@ properties:
245
251
  range:
246
252
  - "http://www.w3.org/2001/XMLSchema#boolean"
247
253
 
254
+ - singularName: successor
255
+ functional: true
256
+ compactName: movedTo
257
+ uri: "https://www.w3.org/ns/activitystreams#movedTo"
258
+ description: >-
259
+ Signifies that an actor has been moved to a different ID.
260
+ Used in Mastodon-style data portability with the {@link Move} activity;
261
+ see [ActivityPub Data Portability/Move
262
+ Action](https://swicg.github.io/activitypub-data-portability/#move-action)
263
+ for more details.
264
+ range:
265
+ - "https://www.w3.org/ns/activitystreams#Application"
266
+ - "https://www.w3.org/ns/activitystreams#Group"
267
+ - "https://www.w3.org/ns/activitystreams#Organization"
268
+ - "https://www.w3.org/ns/activitystreams#Person"
269
+ - "https://www.w3.org/ns/activitystreams#Service"
270
+
248
271
  - pluralName: aliases
249
272
  singularName: alias
250
273
  singularAccessor: true
@@ -11,7 +11,13 @@ defaultContext:
11
11
  - "https://w3id.org/security/data-integrity/v1"
12
12
  - "https://www.w3.org/ns/did/v1"
13
13
  - "https://w3id.org/security/multikey/v1"
14
- - manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
14
+ - alsoKnownAs:
15
+ "@id": "as:alsoKnownAs"
16
+ "@type": "@id"
17
+ manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
18
+ movedTo:
19
+ "@id": "as:movedTo"
20
+ "@type": "@id"
15
21
  toot: "http://joinmastodon.org/ns#"
16
22
  featured:
17
23
  "@id": "toot:featured"
@@ -245,6 +251,23 @@ properties:
245
251
  range:
246
252
  - "http://www.w3.org/2001/XMLSchema#boolean"
247
253
 
254
+ - singularName: successor
255
+ functional: true
256
+ compactName: movedTo
257
+ uri: "https://www.w3.org/ns/activitystreams#movedTo"
258
+ description: >-
259
+ Signifies that an actor has been moved to a different ID.
260
+ Used in Mastodon-style data portability with the {@link Move} activity;
261
+ see [ActivityPub Data Portability/Move
262
+ Action](https://swicg.github.io/activitypub-data-portability/#move-action)
263
+ for more details.
264
+ range:
265
+ - "https://www.w3.org/ns/activitystreams#Application"
266
+ - "https://www.w3.org/ns/activitystreams#Group"
267
+ - "https://www.w3.org/ns/activitystreams#Organization"
268
+ - "https://www.w3.org/ns/activitystreams#Person"
269
+ - "https://www.w3.org/ns/activitystreams#Service"
270
+
248
271
  - pluralName: aliases
249
272
  singularName: alias
250
273
  singularAccessor: true
@@ -11,7 +11,13 @@ defaultContext:
11
11
  - "https://w3id.org/security/data-integrity/v1"
12
12
  - "https://www.w3.org/ns/did/v1"
13
13
  - "https://w3id.org/security/multikey/v1"
14
- - manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
14
+ - alsoKnownAs:
15
+ "@id": "as:alsoKnownAs"
16
+ "@type": "@id"
17
+ manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
18
+ movedTo:
19
+ "@id": "as:movedTo"
20
+ "@type": "@id"
15
21
  toot: "http://joinmastodon.org/ns#"
16
22
  featured:
17
23
  "@id": "toot:featured"
@@ -245,6 +251,23 @@ properties:
245
251
  range:
246
252
  - "http://www.w3.org/2001/XMLSchema#boolean"
247
253
 
254
+ - singularName: successor
255
+ functional: true
256
+ compactName: movedTo
257
+ uri: "https://www.w3.org/ns/activitystreams#movedTo"
258
+ description: >-
259
+ Signifies that an actor has been moved to a different ID.
260
+ Used in Mastodon-style data portability with the {@link Move} activity;
261
+ see [ActivityPub Data Portability/Move
262
+ Action](https://swicg.github.io/activitypub-data-portability/#move-action)
263
+ for more details.
264
+ range:
265
+ - "https://www.w3.org/ns/activitystreams#Application"
266
+ - "https://www.w3.org/ns/activitystreams#Group"
267
+ - "https://www.w3.org/ns/activitystreams#Organization"
268
+ - "https://www.w3.org/ns/activitystreams#Person"
269
+ - "https://www.w3.org/ns/activitystreams#Service"
270
+
248
271
  - pluralName: aliases
249
272
  singularName: alias
250
273
  singularAccessor: true