Skip to content

feat: store authsources in a database (fix #267)#1817

Open
damikael wants to merge 8 commits intosimplesamlphp:masterfrom
linfaservice:master
Open

feat: store authsources in a database (fix #267)#1817
damikael wants to merge 8 commits intosimplesamlphp:masterfrom
linfaservice:master

Conversation

@damikael
Copy link
Contributor

If, into config/config.php, are present the parameters:

'authsources.storage' => 'database',
'authsources.database_table' => 'authsources',

then authsources are retrieved from database,
else them are retrieved from file same authsources.php, as before.

If the value of parameter authsources.storage is 'database', then the authsource configuration is retrieved from database.
If the table referred by the parameter authsources.database_table does not exists it will be created.
The table will contain the following fields:

  • id VARCHAR(255) PRIMARY KEY, that is the key of authsource
  • entity_data JSON, that is the configuration of authsource
  • _disabled enum('N','Y') NOT NULL DEFAULT 'N', to enable/disable the authsource

damikael added 2 commits June 22, 2023 10:19
If parameters:

- 'authsources.storage' => 'database',
- 'authsources.database_table' => 'authsources',

are present into config/config.php

authsources are retrieved from database,
else them are retrieved from file
If parameters:

- 'authsources.storage' => 'database',
- 'authsources.database_table' => 'authsources',

are present into config/config.php

authsources are retrieved from database,
else them are retrieved from file
@tvdijen
Copy link
Member

tvdijen commented Jun 22, 2023

I don't think we should put a lot of code in a configuration file...

@damikael
Copy link
Contributor Author

I don't think we should put a lot of code in a configuration file...

Moved code out from authsources config file

@codecov
Copy link

codecov bot commented Jun 23, 2023

Codecov Report

Attention: Patch coverage is 43.75000% with 18 lines in your changes missing coverage. Please review.

Project coverage is 45.20%. Comparing base (fdbe001) to head (2a0f29e).
Report is 677 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1817      +/-   ##
============================================
- Coverage     45.24%   45.20%   -0.05%     
- Complexity     3632     3634       +2     
============================================
  Files           162      162              
  Lines         12303    12323      +20     
============================================
+ Hits           5566     5570       +4     
- Misses         6737     6753      +16     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@damikael damikael requested a review from tvdijen June 23, 2023 09:46
@tvdijen tvdijen force-pushed the master branch 8 times, most recently from 3b5f5ba to 96357ee Compare July 19, 2023 12:37
@tvdijen tvdijen force-pushed the master branch 5 times, most recently from 7587851 to d523b31 Compare August 2, 2023 11:58
@tvdijen tvdijen force-pushed the master branch 2 times, most recently from a7b59f3 to 6f84bae Compare September 2, 2023 10:58
@tvdijen tvdijen force-pushed the master branch 2 times, most recently from bc1c5c8 to d0a5974 Compare October 17, 2023 21:17
@tvdijen tvdijen force-pushed the master branch 3 times, most recently from ccb9b02 to 120a100 Compare December 1, 2023 14:34
@tvdijen tvdijen force-pushed the master branch 2 times, most recently from 6004a77 to 58bf8db Compare May 4, 2024 23:45
@tvdijen tvdijen force-pushed the master branch 2 times, most recently from 5c9fb2c to 0970efc Compare May 27, 2024 12:27
@tvdijen tvdijen force-pushed the master branch 2 times, most recently from c27831c to 71e49f4 Compare June 19, 2024 17:03
@tvdijen tvdijen force-pushed the master branch 3 times, most recently from c06a17a to a52c98d Compare August 20, 2025 21:45
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