Skip to content
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

フロント画面へのIPアクセス制限の実装 #5858

Merged
merged 12 commits into from Dec 7, 2022
Merged

フロント画面へのIPアクセス制限の実装 #5858

merged 12 commits into from Dec 7, 2022

Conversation

shinya
Copy link
Contributor

@shinya shinya commented Nov 9, 2022

概要(Overview・Refs Issue)

下記のIssueで取り上げられていた、フロント画面へのIPアクセス制御を実装。
#5779

方針(Policy)

従来から実装されていた、管理画面へのアクセス制限を踏襲し実装。

実装に関する補足(Appendix)

管理画面へのアクセス制限を踏襲したものの、
複数の範囲の制限が需要として考えられることから
サブネットマスクでの管理を可能としている点が少し実装ロジックが異なります。
(管理画面ではビットマスクによる指定ができる)

例: 192.168.56.1/32

テスト(Test)

Unitテスト、E2Eテスト共に更新済みです

相談(Discussion)

EC-CUBEの仕様に乗っ取れているか。
実装箇所が間違っていないか。

マイナーバージョン互換性保持のための制限事項チェックリスト

※以下、確認中です

  • 既存機能の仕様変更はありません
  • フックポイントの呼び出しタイミングの変更はありません
  • フックポイントのパラメータの削除・データ型の変更はありません
  • twigファイルに渡しているパラメータの削除・データ型の変更はありません
  • Serviceクラスの公開関数の、引数の削除・データ型の変更はありません
  • 入出力ファイル(CSVなど)のフォーマット変更はありません

レビュワー確認項目

  • 動作確認
  • コードレビュー
  • E2E/Unit テスト確認(テストの追加・変更が必要かどうか)
  • 互換性が保持されているか
  • セキュリティ上の問題がないか
    • 権限を超えた操作が可能にならないか
    • 不要なファイルアップロードがないか
    • 外部へ公開されるファイルや機能の追加ではないか
    • テンプレートでのエスケープ漏れがないか

src/Eccube/EventListener/IpAddrListener.php Outdated Show resolved Hide resolved
src/Eccube/Form/Type/Admin/SecurityType.php Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2022

Codecov Report

Merging #5858 (8eb2bcd) into 4.2 (98ddf37) will increase coverage by 0.02%.
The diff coverage is 84.00%.

@@             Coverage Diff              @@
##                4.2    #5858      +/-   ##
============================================
+ Coverage     78.78%   78.80%   +0.02%     
- Complexity     6298     6307       +9     
============================================
  Files           470      470              
  Lines         21132    21174      +42     
============================================
+ Hits          16649    16687      +38     
- Misses         4483     4487       +4     
Flag Coverage Δ
E2E 64.77% <32.00%> (-0.06%) ⬇️
Unit 77.73% <84.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...roller/Admin/Setting/System/SecurityController.php 23.52% <0.00%> (-4.38%) ⬇️
src/Eccube/EventListener/IpAddrListener.php 100.00% <100.00%> (+12.50%) ⬆️
src/Eccube/Form/Type/Admin/SecurityType.php 98.55% <100.00%> (+0.77%) ⬆️
...be/Service/PurchaseFlow/Processor/TaxProcessor.php 84.21% <0.00%> (+1.75%) ⬆️
.../Eccube/Doctrine/Common/CsvDataFixtures/Loader.php 80.00% <0.00%> (+2.50%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@chihiro-adachi
Copy link
Contributor

@shinya
E2Eテストも修正お願いします。
https://github.com/EC-CUBE/ec-cube/actions/runs/3545779605/jobs/5954207044

@chihiro-adachi chihiro-adachi added this to the 4.2.1 milestone Nov 29, 2022
@chihiro-adachi chihiro-adachi added the security security label Nov 29, 2022
@chihiro-adachi
Copy link
Contributor

@shinya
ありがとうございます。マージしました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants