feat(s3): S3アドオンにSigV4署名を追加#746
Draft
tishin-endou wants to merge 15 commits into
Draft
Conversation
Co-Authored-By: An Qiuyu <qiuyu.an@hotmail.com>
This was referenced Jun 5, 2026
- import InstitutionFactory - test_s3_settings_input_empty_secret_key: assert_equals/assert_in -> pytest assert + rv.text - test_s3_settings_rdm_addons_denied: post_json -> post(url, json=...) + pytest assert + rv.text
…7/G8 tests
- Replace all self.app.post(url, json={...}) with post_json(url, {...})
and self.app.put(url, json={...}) with put_json(url, {...}) so tests
work with the webtest_plus version in CI (older version lacks json= kwarg)
- Add expect_errors=True for all calls that expect 4xx responses
- Add expect_errors=True to delete/get calls that expect 401/403
- Add G1 (missing key field → 400), G2 (get_user_info=None → 400),
G4 (bad bucket name → 400), G5 (provider_id format + dedup),
G7 (bucket_exists empty), G8 (can_list None) coverage
mock.patch(...).return_value sets attribute on the patcher object, not the started Mock. Use mock.patch(..., return_value=mock.Mock(id=..., ...)) so user_info.id / user_info.display_name are accessible in the view. Fixes test_provider_id_format and test_provider_id_dedup.
Wrappers were accidentally dropped when the feature branch was created.
Restored ${ _("...") } for all 20 translatable strings across:
- s3_credentials_modal.mako (5 strings)
- s3_node_settings.mako (10 strings)
- s3_user_settings.mako (5 strings)
Feature-branch additions preserved: aria-label/alt on img tags,
OAuth comment fix, text-muted class removal from th.
…lity boto (v2) was removed as part of SigV4 migration. boto3/botocore are in the root requirements.txt. The Jenkins Dockerfile still has COPY ./addons/s3/requirements.txt, so an empty file is needed to prevent Docker build failure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
既存のS3アドオンをレガシーSignature V2からSignature V4認証に移行し、SigV4が必要なAWSリージョン(例:
ap-northeast-1)との互換性を実現します。変更内容
モデル (
addons/s3/models.py)s3_auth_typeフィールドを追加ビュー (
addons/s3/views.py)ユーティリティ (
addons/s3/utils.py)get_bucket_names()をSigV4署名リクエストに対応フロントエンド (
addons/s3/static/)s3NodeConfig.js、s3UserConfig.jsをSigV4認証フローに対応テスト (
addons/s3/tests/)test_model.py、test_view.py、test_serializer.pyを新認証フローに適合その他
README.mdを追加requirements.txtに必要な依存関係を追加addons/s3/requirements.txtを削除関連PR
Based on anqiuy/RDM-osf.io@feature/s3-sigv4