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

feat: publish to two solar tenants #398

Conversation

mccar
Copy link
Contributor

@mccar mccar commented Feb 27, 2024

Ticket - https://oat-sa.atlassian.net/browse/REL-1466

Related to - oat-sa/tao-core#3968

Goal

NCCER publish to two solar tenants

Changelog

  • feat: added support for several platform LTI providers

How to test

  1. Configure 2 tenants to one authoring
  2. Add delivery configuration for 2 tenants
{
  "DELIVERTENANT_COUNT": "2",
  "DELIVERTENANT_1_ID": "10",
  "DELIVERTENANT_1_LABEL": "OAT TAO Solar Test Runner Stage", 
  "DELIVERTENANT_1_CUSTOMER_ID": "10",
  "DELIVERTENANT_1_LTI_1P3_AUDIENCE_URL": "https://<stack_url>",
  "DELIVERTENANT_1_LTI_1P3_CREDENTIALS_0_CLIENT_ID": "tao-deliver-id_<tenant_id>",
  "DELIVERTENANT_1_OAUTH_CREDENTIALS_0_KEY": "<Oauth_key>",
  "DELIVERTENANT_1_OAUTH_CREDENTIALS_0_SECRET": "<Oauth_secret>",
  ... //other same like DELIVERTENANT_0
}
  1. Add platform LTI key chain for 2 tenants
return new PlatformKeyChainRepository([
    [
        PlatformKeyChainRepository::OPTION_DEFAULT_KEY_ID => '<tenant_1>-0',
                ...
    ],
    [
        PlatformKeyChainRepository::OPTION_DEFAULT_KEY_ID => '<tenant_2>-0',
        ...
    ]
]);

or use the tools command to generate a key and add configuration

sudo -u www-data php index.php 'oat\taoLti\scripts\tools\GenerateKeys' -id 10_0 -kn Tenant_10 -pkp /platform/default/public_10.key -kp /platform/default/private_10.key
  1. Add tests and deliver to 2 different tenants
  2. In Deliveries set 'Guest Access' for this test
  3. Try to run tests

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 93.18182% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 31.14%. Comparing base (52fe7b7) to head (680f381).

Files Patch % Lines
...taAccess/Repository/PlatformKeyChainRepository.php 92.68% 3 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #398      +/-   ##
=============================================
+ Coverage      30.35%   31.14%   +0.79%     
- Complexity       827      832       +5     
=============================================
  Files            106      106              
  Lines           2906     2922      +16     
=============================================
+ Hits             882      910      +28     
+ Misses          2024     2012      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mccar mccar changed the base branch from develop to master March 1, 2024 15:30
@mccar mccar changed the base branch from master to develop March 1, 2024 15:30
@mccar mccar requested review from augustas and vbyndych March 4, 2024 10:04
Copy link

github-actions bot commented Mar 4, 2024

Version

Target Version 15.16.0
Last version 15.15.0

There are 0 BREAKING CHANGE, 12 features, 0 fix

@mccar mccar changed the base branch from develop to feat/REL-1466/publish-to-two-solar-tenants March 4, 2024 14:21
@mccar mccar changed the title feat: NCCER publish to two solar tenants feat: publish to two solar tenants Mar 4, 2024
@mccar mccar merged commit 638b220 into feat/REL-1466/publish-to-two-solar-tenants Mar 4, 2024
1 of 5 checks passed
@mccar mccar deleted the feat/REL-1466/nccer-publish-to-two-solar-tenants branch March 4, 2024 14:24
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.

4 participants