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

[PM-8895] Moving the groups controller business logic to a service #4209

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ttalty
Copy link
Contributor

@ttalty ttalty commented Jun 20, 2024

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-8995

📔 Objective

The GroupsController contained a lot of logic that is responsible for creating the objects for the endpoints. Moving to a service allows reusability of the code in the new reports being developed. The controller has repositories injected in. Exposing repos in a controller could open up issues with bypassing logic in services designed to filter. Also a potential issue if the repo gets exposed.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@ttalty ttalty requested a review from a team as a code owner June 20, 2024 17:18
Copy link
Contributor

github-actions bot commented Jun 20, 2024

Logo
Checkmarx One – Scan Summary & Details8f6107d4-1ced-41cd-9c15-ea37a46250eb

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM CSRF /src/Identity/Controllers/AccountsController.cs: [72](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Identity/Controllers/AccountsController.cs# L72) Attack Vector

Fixed Issues

Severity Issue Source File / Package
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: [365](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/AccountsController.cs# L365)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [628](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L628)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [628](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L628)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [628](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L628)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [628](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L628)
MEDIUM CSRF /src/Api/SecretsManager/Controllers/AccessPoliciesController.cs: [266](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/SecretsManager/Controllers/AccessPoliciesController.cs# L266)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/ProvidersController.cs: [82](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/ProvidersController.cs# L82)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [607](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L607)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [607](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L607)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [607](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L607)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [607](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L607)
MEDIUM CSRF /src/Api/Public/Controllers/CollectionsController.cs: [87](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Public/Controllers/CollectionsController.cs# L87)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/GroupsController.cs: [122](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/GroupsController.cs# L122)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/ProvidersController.cs: [143](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/ProvidersController.cs# L143)
MEDIUM CSRF /src/Api/SecretsManager/Controllers/AccessPoliciesController.cs: [232](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/SecretsManager/Controllers/AccessPoliciesController.cs# L232)
MEDIUM CSRF /src/Admin/AdminConsole/Controllers/ProvidersController.cs: [329](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Admin/AdminConsole/Controllers/ProvidersController.cs# L329)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/GroupsController.cs: [151](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/GroupsController.cs# L151)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/GroupsController.cs: [151](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/GroupsController.cs# L151)
MEDIUM CSRF /src/Api/Billing/Controllers/ProviderClientsController.cs: [28](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Billing/Controllers/ProviderClientsController.cs# L28)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: [214](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationUsersController.cs# L214)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: [355](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationUsersController.cs# L355)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: [355](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationUsersController.cs# L355)
MEDIUM CSRF /src/Api/Controllers/CollectionsController.cs: [171](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Controllers/CollectionsController.cs# L171)
MEDIUM CSRF /src/Api/Controllers/CollectionsController.cs: [143](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Controllers/CollectionsController.cs# L143)
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: [603](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/AccountsController.cs# L603)
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: [645](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/AccountsController.cs# L645)
MEDIUM CSRF /src/Api/Vault/Controllers/FoldersController.cs: [45](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/FoldersController.cs# L45)
MEDIUM CSRF /src/Api/Controllers/SelfHosted/SelfHostedOrganizationLicensesController.cs: [51](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Controllers/SelfHosted/SelfHostedOrganizationLicensesController.cs# L51)
MEDIUM CSRF /src/Api/Controllers/UsersController.cs: [22](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Controllers/UsersController.cs# L22)
MEDIUM CSRF /src/Api/Controllers/DevicesController.cs: [70](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Controllers/DevicesController.cs# L70)
MEDIUM CSRF /src/Api/Controllers/DevicesController.cs: [57](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Controllers/DevicesController.cs# L57)
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/PoliciesController.cs: [69](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Public/Controllers/PoliciesController.cs# L69)
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/PoliciesController.cs: [49](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Public/Controllers/PoliciesController.cs# L49)
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/OrganizationController.cs: [42](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Public/Controllers/OrganizationController.cs# L42)
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/GroupsController.cs: [92](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Public/Controllers/GroupsController.cs# L92)
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/GroupsController.cs: [49](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Public/Controllers/GroupsController.cs# L49)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/ProviderUsersController.cs: [142](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/ProviderUsersController.cs# L142)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/PoliciesController.cs: [148](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/PoliciesController.cs# L148)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/PoliciesController.cs: [78](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/PoliciesController.cs# L78)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/PoliciesController.cs: [61](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/PoliciesController.cs# L61)
MEDIUM CSRF /bitwarden_license/src/Sso/Controllers/AccountController.cs: [163](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//bitwarden_license/src/Sso/Controllers/AccountController.cs# L163)
MEDIUM CSRF /bitwarden_license/src/Sso/Controllers/AccountController.cs: [96](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//bitwarden_license/src/Sso/Controllers/AccountController.cs# L96)
MEDIUM CSRF /bitwarden_license/src/Scim/Controllers/v2/UsersController.cs: [50](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//bitwarden_license/src/Scim/Controllers/v2/UsersController.cs# L50)
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/GroupsController.cs: [161](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Public/Controllers/GroupsController.cs# L161)
MEDIUM CSRF /src/Api/Auth/Controllers/EmergencyAccessController.cs: [159](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/EmergencyAccessController.cs# L159)
MEDIUM CSRF /bitwarden_license/src/Scim/Controllers/v2/GroupsController.cs: [98](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//bitwarden_license/src/Scim/Controllers/v2/GroupsController.cs# L98)
MEDIUM CSRF /bitwarden_license/src/Scim/Controllers/v2/GroupsController.cs: [88](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//bitwarden_license/src/Scim/Controllers/v2/GroupsController.cs# L88)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: [323](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationUsersController.cs# L323)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/GroupsController.cs: [265](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/GroupsController.cs# L265)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/ProviderUsersController.cs: [175](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/ProviderUsersController.cs# L175)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [961](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L961)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [778](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L778)
MEDIUM CSRF /src/Admin/AdminConsole/Controllers/OrganizationsController.cs: [351](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Admin/AdminConsole/Controllers/OrganizationsController.cs# L351)
MEDIUM CSRF /src/Admin/AdminConsole/Controllers/ProvidersController.cs: [253](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Admin/AdminConsole/Controllers/ProvidersController.cs# L253)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/GroupsController.cs: [81](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/GroupsController.cs# L81)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationsController.cs: [119](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationsController.cs# L119)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationsController.cs: [316](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationsController.cs# L316)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: [87](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationUsersController.cs# L87)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: [240](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationUsersController.cs# L240)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: [322](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationUsersController.cs# L322)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: [340](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationUsersController.cs# L340)
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/MembersController.cs: [148](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Public/Controllers/MembersController.cs# L148)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [1130](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L1130)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [1047](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L1047)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [1047](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L1047)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [583](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L583)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [583](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L583)
MEDIUM CSRF /src/Api/Controllers/CollectionsController.cs: [209](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Controllers/CollectionsController.cs# L209)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [144](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L144)
MEDIUM CSRF /src/Api/Controllers/CollectionsController.cs: [261](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Controllers/CollectionsController.cs# L261)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [1096](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L1096)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [1096](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L1096)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [657](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L657)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [657](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L657)
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/MembersController.cs: [148](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Public/Controllers/MembersController.cs# L148)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/GroupsController.cs: [108](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/GroupsController.cs# L108)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [816](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L816)
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: [154](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/AccountsController.cs# L154)
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/GroupsController.cs: [133](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Public/Controllers/GroupsController.cs# L133)
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: [220](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/AccountsController.cs# L220)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [1150](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L1150)
MEDIUM CSRF /src/Api/Controllers/CollectionsController.cs: [196](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Controllers/CollectionsController.cs# L196)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: [268](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationUsersController.cs# L268)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationsController.cs: [316](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationsController.cs# L316)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationsController.cs: [316](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationsController.cs# L316)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationsController.cs: [316](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationsController.cs# L316)
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: [294](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/AccountsController.cs# L294)
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: [365](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/AccountsController.cs# L365)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [222](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L222)
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: [340](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/AccountsController.cs# L340)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [570](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L570)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: [308](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationUsersController.cs# L308)
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/OrganizationController.cs: [42](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Public/Controllers/OrganizationController.cs# L42)
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/OrganizationController.cs: [42](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Public/Controllers/OrganizationController.cs# L42)
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/OrganizationController.cs: [42](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Public/Controllers/OrganizationController.cs# L42)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [752](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L752)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [193](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L193)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/ProviderUsersController.cs: [188](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/ProviderUsersController.cs# L188)
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: [506](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/AccountsController.cs# L506)
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: [464](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/AccountsController.cs# L464)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [1073](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L1073)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [1073](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L1073)
MEDIUM CSRF /src/Api/Auth/Controllers/TwoFactorController.cs: [411](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/TwoFactorController.cs# L411)
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: [708](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/AccountsController.cs# L708)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/GroupsController.cs: [248](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/GroupsController.cs# L248)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [928](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L928)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: [471](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationUsersController.cs# L471)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [159](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L159)
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: [245](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/AccountsController.cs# L245)
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: [479](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/AccountsController.cs# L479)
MEDIUM CSRF /src/Api/Controllers/SettingsController.cs: [36](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Controllers/SettingsController.cs# L36)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [222](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L222)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [570](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L570)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [841](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L841)
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: [799](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/AccountsController.cs# L799)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [855](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L855)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: [308](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationUsersController.cs# L308)
MEDIUM CSRF /src/Api/Controllers/CollectionsController.cs: [247](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Controllers/CollectionsController.cs# L247)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: [268](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationUsersController.cs# L268)
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/MembersController.cs: [184](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Public/Controllers/MembersController.cs# L184)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [193](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L193)
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: [858](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/AccountsController.cs# L858)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [174](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L174)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationsController.cs: [316](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationsController.cs# L316)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/ProviderOrganizationsController.cs: [48](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/ProviderOrganizationsController.cs# L48)
MEDIUM CSRF /src/Api/Public/Controllers/CollectionsController.cs: [64](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Public/Controllers/CollectionsController.cs# L64)
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: [453](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/AccountsController.cs# L453)
MEDIUM CSRF /src/Api/Controllers/CollectionsController.cs: [99](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Controllers/CollectionsController.cs# L99)
MEDIUM CSRF /src/Api/Controllers/CollectionsController.cs: [119](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Controllers/CollectionsController.cs# L119)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [992](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L992)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [111](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L111)
MEDIUM CSRF /src/Api/Controllers/CollectionsController.cs: [128](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Controllers/CollectionsController.cs# L128)
MEDIUM CSRF /src/Api/Tools/Controllers/ImportCiphersController.cs: [64](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Tools/Controllers/ImportCiphersController.cs# L64)
MEDIUM CSRF /src/Api/Tools/Controllers/ImportCiphersController.cs: [48](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Tools/Controllers/ImportCiphersController.cs# L48)
MEDIUM CSRF /src/Identity/Controllers/AccountsController.cs: [68](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Identity/Controllers/AccountsController.cs# L68)
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/MembersController.cs: [59](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Public/Controllers/MembersController.cs# L59)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [125](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L125)
MEDIUM CSRF /src/Admin/AdminConsole/Controllers/ProviderOrganizationsController.cs: [35](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Admin/AdminConsole/Controllers/ProviderOrganizationsController.cs# L35)
MEDIUM CSRF /src/Api/Auth/Controllers/WebAuthnController.cs: [130](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/WebAuthnController.cs# L130)
MEDIUM CSRF /src/Api/Auth/Controllers/WebAuthnController.cs: [101](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Auth/Controllers/WebAuthnController.cs# L101)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [1150](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L1150)
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: [709](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Vault/Controllers/CiphersController.cs# L709)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: [116](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationUsersController.cs# L116)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/GroupsController.cs: [93](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/GroupsController.cs# L93)
MEDIUM CSRF /src/Api/Controllers/CollectionsController.cs: [247](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/Controllers/CollectionsController.cs# L247)
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationDomainController.cs: [75](https://github.com/bitwarden/server/blob/tools/pm-8895/groups-controller-decouple//src/Api/AdminConsole/Controllers/OrganizationDomainController.cs# L75)
MEDIUM CSRF

More results are available on AST platform

/// view all groups in the organization</param>
/// <param name="orgId">Organization id</param>
/// <returns>List of GroupDetailsResponseModel</returns>
public async Task<IEnumerable<GroupDetailsResponseModel>> GetOrganizationGroupsDetails(ClaimsPrincipal user, Guid orgId)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returning IEnumerable<GroupDetailsResponseModel>' instead of ListResponseModelthe Controller will return theListResponseModel`

This can be changed back if it's determined to be better.

private readonly IOrganizationUserRepository _organizationUserRepository;
private readonly ICollectionRepository _collectionRepository;

public GroupsControllerService(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name can be anything really. This was just what first came to mind. Up to suggestions if anyone has any.

Copy link
Member

@vincentsalucci vincentsalucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ttalty - I brought these changes back to the team to discuss and we want to take a step back to fully understand the why/problem you're solving. In its current state, we don't see what is gained with the changes in this PR. The mixing of API layer and Core layer concerns doesn't seem to align with our CQRS approach, overall. Can you help us dig a little deeper and expand on the end goal?

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

Successfully merging this pull request may close these issues.

2 participants