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

Add starategy mode for jaas mode jitsi #9

Merged
merged 17 commits into from
Nov 8, 2022
Merged

Add starategy mode for jaas mode jitsi #9

merged 17 commits into from
Nov 8, 2022

Conversation

HerbertIV
Copy link
Contributor

No description provided.

@HerbertIV HerbertIV requested a review from qunabu November 3, 2022 13:46
@codecov
Copy link

codecov bot commented Nov 4, 2022

Codecov Report

Merging #9 (04020e3) into main (c122367) will decrease coverage by 2.36%.
The diff coverage is 94.64%.

@@             Coverage Diff              @@
##               main       #9      +/-   ##
============================================
- Coverage     98.38%   96.02%   -2.37%     
- Complexity       21       54      +33     
============================================
  Files             5       10       +5     
  Lines            62      151      +89     
============================================
+ Hits             61      145      +84     
- Misses            1        6       +5     
Impacted Files Coverage Δ
src/Services/JitsiService.php 94.54% <92.50%> (-2.68%) ⬇️
...onferenceMode/JitsiVideoConferenceModeStrategy.php 92.85% <92.85%> (ø)
src/Helpers/StrategyHelper.php 93.75% <93.75%> (ø)
...ConferenceMode/JaasVideoConferenceModeStrategy.php 94.73% <94.73%> (ø)
src/EscolaLmsJitsiServiceProvider.php 100.00% <100.00%> (ø)
src/Providers/SettingsServiceProvider.php 100.00% <100.00%> (ø)
src/Services/JaasService.php 100.00% <100.00%> (ø)
...ideoConferenceMode/VideoConferenceModeStrategy.php 100.00% <100.00%> (ø)

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

@@ -72,4 +72,6 @@ class JitsiEnum extends Enum
'ā' => 'a', 'č' => 'c', 'ē' => 'e', 'ģ' => 'g', 'ī' => 'i', 'ķ' => 'k', 'ļ' => 'l', 'ņ' => 'n',
'š' => 's', 'ū' => 'u', 'ž' => 'z',
];

public const DEFAULT_MODE = 'jitsi';
Copy link
Contributor

Choose a reason for hiding this comment

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

imho settings those kind of flags is a mistake

we have 4 options /modes:

  1. module is disabled
  2. module is enabled but no config data is put -> we're using public j instance https://meet.jit.si/
  3. module is enabled and host app_id & app_secret are set -> we're using self hosted jisty
  4. module is enabled and jaas_package_status jaas_host, aud, iss, kid & private_key are set -> we're Jitsy as a Service (jaas)

Comment on lines 22 to 31
AdministrableConfig::registerConfig(self::CONFIG_KEY . '.host', ['required', 'string']);
AdministrableConfig::registerConfig(self::CONFIG_KEY . '.app_id', ['nullable', 'string'], false);
AdministrableConfig::registerConfig(self::CONFIG_KEY . '.secret', ['nullable', 'string'], false);

AdministrableConfig::registerConfig(self::CONFIG_KEY . '.jaas_package_status', ['required', 'string', 'in:' . implode(',', PackageStatusEnum::getValues())], false);
AdministrableConfig::registerConfig(self::CONFIG_KEY . '.jaas_host', ['required', 'string']);
AdministrableConfig::registerConfig(self::CONFIG_KEY . '.aud', ['required', 'string'], false);
AdministrableConfig::registerConfig(self::CONFIG_KEY . '.iss', ['required', 'string'], false);
AdministrableConfig::registerConfig(self::CONFIG_KEY . '.kid', ['required', 'string'], false);
AdministrableConfig::registerConfig(self::CONFIG_KEY . '.private_key', ['required', 'string'], false);
Copy link
Contributor

Choose a reason for hiding this comment

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

see comment above
actually none of this fields is required

@gitguardian
Copy link

gitguardian bot commented Nov 4, 2022

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id Secret Commit Filename
2597801 Generic High Entropy Secret 4a6434e config/jitsi.php View secret
2597801 Generic High Entropy Secret b7f54b3 config/jitsi.php View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@qunabu qunabu merged commit ac18943 into main Nov 8, 2022
@qunabu qunabu deleted the feature/STAR-951 branch November 8, 2022 12:51
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