-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add the matching property to azure sso settings Signed-off-by: Kevin Ullyott <kevin.ullyott@canyongbs.com> * Add Azure matching property feature and update SSO settings page Signed-off-by: Kevin Ullyott <kevin.ullyott@canyongbs.com> * Refactor AzureMatchingProperty to return the name directly in getLabel method Signed-off-by: Kevin Ullyott <kevin.ullyott@canyongbs.com> * Implement Azure matching property handling in SocialiteProvider and add custom exception for invalid properties Signed-off-by: Kevin Ullyott <kevin.ullyott@canyongbs.com> * chore: fix enforcement of copyright on all files --------- Signed-off-by: Kevin Ullyott <kevin.ullyott@canyongbs.com>
- Loading branch information
Showing
9 changed files
with
279 additions
and
1 deletion.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
...ion/database/migrations/2024_12_30_142708_add_matching_property_to_azure_sso_settings.php
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
/* | ||
<COPYRIGHT> | ||
Copyright © 2016-2024, Canyon GBS LLC. All rights reserved. | ||
Advising App™ is licensed under the Elastic License 2.0. For more details, | ||
see https://github.com/canyongbs/advisingapp/blob/main/LICENSE. | ||
Notice: | ||
- You may not provide the software to third parties as a hosted or managed | ||
service, where the service provides users with access to any substantial set of | ||
the features or functionality of the software. | ||
- You may not move, change, disable, or circumvent the license key functionality | ||
in the software, and you may not remove or obscure any functionality in the | ||
software that is protected by the license key. | ||
- You may not alter, remove, or obscure any licensing, copyright, or other notices | ||
of the licensor in the software. Any use of the licensor’s trademarks is subject | ||
to applicable law. | ||
- Canyon GBS LLC respects the intellectual property rights of others and expects the | ||
same in return. Canyon GBS™ and Advising App™ are registered trademarks of | ||
Canyon GBS LLC, and we are committed to enforcing and protecting our trademarks | ||
vigorously. | ||
- The software solution, including services, infrastructure, and code, is offered as a | ||
Software as a Service (SaaS) by Canyon GBS LLC. | ||
- Use of this software implies agreement to the license terms and conditions as stated | ||
in the Elastic License 2.0. | ||
For more information or inquiries please visit our website at | ||
https://www.canyongbs.com or contact us via email at legal@canyongbs.com. | ||
</COPYRIGHT> | ||
*/ | ||
|
||
use Spatie\LaravelSettings\Migrations\SettingsBlueprint; | ||
use Spatie\LaravelSettings\Migrations\SettingsMigration; | ||
|
||
return new class () extends SettingsMigration { | ||
public function up(): void | ||
{ | ||
$this->migrator->inGroup('azure_sso', function (SettingsBlueprint $blueprint): void { | ||
$blueprint->add('matching_property', 'user_principal_name'); | ||
}); | ||
} | ||
}; |
50 changes: 50 additions & 0 deletions
50
...n/database/migrations/2024_12_30_144224_data_activate_azure_matching_property_feature.php
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
/* | ||
<COPYRIGHT> | ||
Copyright © 2016-2024, Canyon GBS LLC. All rights reserved. | ||
Advising App™ is licensed under the Elastic License 2.0. For more details, | ||
see https://github.com/canyongbs/advisingapp/blob/main/LICENSE. | ||
Notice: | ||
- You may not provide the software to third parties as a hosted or managed | ||
service, where the service provides users with access to any substantial set of | ||
the features or functionality of the software. | ||
- You may not move, change, disable, or circumvent the license key functionality | ||
in the software, and you may not remove or obscure any functionality in the | ||
software that is protected by the license key. | ||
- You may not alter, remove, or obscure any licensing, copyright, or other notices | ||
of the licensor in the software. Any use of the licensor’s trademarks is subject | ||
to applicable law. | ||
- Canyon GBS LLC respects the intellectual property rights of others and expects the | ||
same in return. Canyon GBS™ and Advising App™ are registered trademarks of | ||
Canyon GBS LLC, and we are committed to enforcing and protecting our trademarks | ||
vigorously. | ||
- The software solution, including services, infrastructure, and code, is offered as a | ||
Software as a Service (SaaS) by Canyon GBS LLC. | ||
- Use of this software implies agreement to the license terms and conditions as stated | ||
in the Elastic License 2.0. | ||
For more information or inquiries please visit our website at | ||
https://www.canyongbs.com or contact us via email at legal@canyongbs.com. | ||
</COPYRIGHT> | ||
*/ | ||
|
||
use App\Features\AzureMatchingPropertyFeature; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class () extends Migration { | ||
public function up(): void | ||
{ | ||
AzureMatchingPropertyFeature::activate(); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
AzureMatchingPropertyFeature::deactivate(); | ||
} | ||
}; |
51 changes: 51 additions & 0 deletions
51
app-modules/authorization/src/Enums/AzureMatchingProperty.php
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
/* | ||
<COPYRIGHT> | ||
Copyright © 2016-2024, Canyon GBS LLC. All rights reserved. | ||
Advising App™ is licensed under the Elastic License 2.0. For more details, | ||
see https://github.com/canyongbs/advisingapp/blob/main/LICENSE. | ||
Notice: | ||
- You may not provide the software to third parties as a hosted or managed | ||
service, where the service provides users with access to any substantial set of | ||
the features or functionality of the software. | ||
- You may not move, change, disable, or circumvent the license key functionality | ||
in the software, and you may not remove or obscure any functionality in the | ||
software that is protected by the license key. | ||
- You may not alter, remove, or obscure any licensing, copyright, or other notices | ||
of the licensor in the software. Any use of the licensor’s trademarks is subject | ||
to applicable law. | ||
- Canyon GBS LLC respects the intellectual property rights of others and expects the | ||
same in return. Canyon GBS™ and Advising App™ are registered trademarks of | ||
Canyon GBS LLC, and we are committed to enforcing and protecting our trademarks | ||
vigorously. | ||
- The software solution, including services, infrastructure, and code, is offered as a | ||
Software as a Service (SaaS) by Canyon GBS LLC. | ||
- Use of this software implies agreement to the license terms and conditions as stated | ||
in the Elastic License 2.0. | ||
For more information or inquiries please visit our website at | ||
https://www.canyongbs.com or contact us via email at legal@canyongbs.com. | ||
</COPYRIGHT> | ||
*/ | ||
|
||
namespace AdvisingApp\Authorization\Enums; | ||
|
||
use Filament\Support\Contracts\HasLabel; | ||
|
||
enum AzureMatchingProperty: string implements HasLabel | ||
{ | ||
case UserPrincipalName = 'user_principal_name'; | ||
|
||
case Mail = 'mail'; | ||
|
||
public function getLabel(): ?string | ||
{ | ||
return $this->name; | ||
} | ||
} |
This file contains 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
47 changes: 47 additions & 0 deletions
47
app-modules/authorization/src/Exceptions/InvalidAzureMatchingProperty.php
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
/* | ||
<COPYRIGHT> | ||
Copyright © 2016-2024, Canyon GBS LLC. All rights reserved. | ||
Advising App™ is licensed under the Elastic License 2.0. For more details, | ||
see https://github.com/canyongbs/advisingapp/blob/main/LICENSE. | ||
Notice: | ||
- You may not provide the software to third parties as a hosted or managed | ||
service, where the service provides users with access to any substantial set of | ||
the features or functionality of the software. | ||
- You may not move, change, disable, or circumvent the license key functionality | ||
in the software, and you may not remove or obscure any functionality in the | ||
software that is protected by the license key. | ||
- You may not alter, remove, or obscure any licensing, copyright, or other notices | ||
of the licensor in the software. Any use of the licensor’s trademarks is subject | ||
to applicable law. | ||
- Canyon GBS LLC respects the intellectual property rights of others and expects the | ||
same in return. Canyon GBS™ and Advising App™ are registered trademarks of | ||
Canyon GBS LLC, and we are committed to enforcing and protecting our trademarks | ||
vigorously. | ||
- The software solution, including services, infrastructure, and code, is offered as a | ||
Software as a Service (SaaS) by Canyon GBS LLC. | ||
- Use of this software implies agreement to the license terms and conditions as stated | ||
in the Elastic License 2.0. | ||
For more information or inquiries please visit our website at | ||
https://www.canyongbs.com or contact us via email at legal@canyongbs.com. | ||
</COPYRIGHT> | ||
*/ | ||
|
||
namespace AdvisingApp\Authorization\Exceptions; | ||
|
||
use Exception; | ||
|
||
class InvalidAzureMatchingProperty extends Exception | ||
{ | ||
public function __construct(mixed $valueUsed) | ||
{ | ||
parent::__construct('Invalid Azure matching property. Value used: ' . strval($valueUsed)); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
/* | ||
<COPYRIGHT> | ||
Copyright © 2016-2024, Canyon GBS LLC. All rights reserved. | ||
Advising App™ is licensed under the Elastic License 2.0. For more details, | ||
see https://github.com/canyongbs/advisingapp/blob/main/LICENSE. | ||
Notice: | ||
- You may not provide the software to third parties as a hosted or managed | ||
service, where the service provides users with access to any substantial set of | ||
the features or functionality of the software. | ||
- You may not move, change, disable, or circumvent the license key functionality | ||
in the software, and you may not remove or obscure any functionality in the | ||
software that is protected by the license key. | ||
- You may not alter, remove, or obscure any licensing, copyright, or other notices | ||
of the licensor in the software. Any use of the licensor’s trademarks is subject | ||
to applicable law. | ||
- Canyon GBS LLC respects the intellectual property rights of others and expects the | ||
same in return. Canyon GBS™ and Advising App™ are registered trademarks of | ||
Canyon GBS LLC, and we are committed to enforcing and protecting our trademarks | ||
vigorously. | ||
- The software solution, including services, infrastructure, and code, is offered as a | ||
Software as a Service (SaaS) by Canyon GBS LLC. | ||
- Use of this software implies agreement to the license terms and conditions as stated | ||
in the Elastic License 2.0. | ||
For more information or inquiries please visit our website at | ||
https://www.canyongbs.com or contact us via email at legal@canyongbs.com. | ||
</COPYRIGHT> | ||
*/ | ||
|
||
namespace App\Features; | ||
|
||
use App\Support\AbstractFeatureFlag; | ||
|
||
class AzureMatchingPropertyFeature extends AbstractFeatureFlag | ||
{ | ||
public function resolve(mixed $scope): mixed | ||
{ | ||
return false; | ||
} | ||
} |