-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
perf(federation): (re) Ed25519署名に対応する #14278
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #14278 +/- ##
===========================================
+ Coverage 39.97% 41.66% +1.68%
===========================================
Files 1561 1564 +3
Lines 197358 203506 +6148
Branches 3611 3677 +66
===========================================
+ Hits 78889 84784 +5895
- Misses 117897 118117 +220
- Partials 572 605 +33 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
このPRによるapi.jsonの差分 差分はこちら--- base
+++ head
@@ -13130,6 +13130,67 @@
"roleId"
]
}
+ },
+ "publicKeys": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "type": "object",
+ "properties": {
+ "userId": {
+ "type": "string"
+ },
+ "keyId": {
+ "type": "string"
+ },
+ "keyPem": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "userId",
+ "keyId",
+ "keyPem"
+ ]
+ }
+ },
+ "keyPairs": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "properties": {
+ "userId": {
+ "type": "string"
+ },
+ "publicKey": {
+ "type": "string"
+ },
+ "privateKey": {
+ "type": "string"
+ },
+ "ed25519PublicKey": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "ed25519PrivateKey": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "userId",
+ "publicKey",
+ "privateKey",
+ "ed25519PublicKey",
+ "ed25519PrivateKey"
+ ]
}
},
"required": [
@@ -13156,7 +13217,9 @@
"signins",
"policies",
"roles",
- "roleAssigns"
+ "roleAssigns",
+ "publicKeys",
+ "keyPairs"
]
}
}
@@ -81086,6 +81149,9 @@
"string",
"null"
]
+ },
+ "httpMessageSignaturesImplementationLevel": {
+ "type": "string"
}
},
"required": [
@@ -81113,7 +81179,8 @@
"faviconUrl",
"themeColor",
"infoUpdatedAt",
- "latestRequestReceivedAt"
+ "latestRequestReceivedAt",
+ "httpMessageSignaturesImplementationLevel"
]
},
"GalleryPost": { |
* lastFetchedAtでの更新制限を弱めて再取得 | ||
* Reacquisition with weakened update limit at lastFetchedAt | ||
*/ | ||
if (user.lastFetchedAt == null || user.lastFetchedAt < new Date(Date.now() - 1000 * 60 * 12)) { |
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.
怪しいコード1
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.
少なくとも時計が狂ってたケースではかなり怪しそう(それをすごく考慮するとややキリがないけど)
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.
時計が狂ってるとDigest検証とかもっと前の段階で落ちるような気もするけど
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.
(特定サーバーの話題だけど)その割にアプデ前では配送が落ちてないのが謎
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.
配送は落ちないと思う
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.
じゃあここじゃないか
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.
inboxで握りつぶすというものなので
(dd8561fで署名検証が失格になってもrecoverable errorとするようにはした
dd41dd0 でremoteUserUpdatedが来た場合にpublicKeyキャッシュをパージするようにした |
This comment was marked as off-topic.
This comment was marked as off-topic.
(色々ごちゃごちゃ更新はしてるけどクリティカルなバグを見つけられてない |
deliverでinboxに投げて401が返ってきた場合、時計が狂っている場合があるためリトライするようにした |
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.
コード斜め読みしてたら見つけたので一応上げておきます
キューイング直前でいらんデータを弾くようにしたいのでこのままがいいかも… |
conflict resolved |
いやキューデータ定義はPrivateKeyWithPemなのでこれでいいのかしら |
api.jsonの差分作成中にエラーが発生しました。詳細はWorkflowのログを確認してください。 |
conflict resolved? |
conflict resolved |
Conflict resolved;
|
初回の連合時にhttpMessageSignaturesImplementationLevelを取得するようにすればよさそう |
既存の連合には効果ないとこのPRはあんまり意味ないと思っており (オフトピ: そもそも |
1%くらいの確率で情報を再取得するようにするとか |
deliverやinboxの処理が行われるたびにレコードのupdateが走るのは重いわね |
isNotRespondingとnotRespondingSinceでupdateしてるだけなのか… |
TODO: test-federationかく |
Fix #14273
Fix of #13464
What
beta.1での課題をもとに挙動を改善しました
p1.a9z.devなどで運用中
publicKeyByUserIdCache
をリフレッシュするように(ユーザーごと)Why
Ed25519は導入すべきなので
Additional info (optional)
CHANGELOG
default.ymlでジョブキューの並列度を設定している場合は、従前よりもconcurrencyの値をより下げるとパフォーマンスが改善する可能性があります。
Checklist