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

ISD-2761 Add oauth lib and requirer #621

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

Conversation

Thanhphan1147
Copy link
Collaborator

@Thanhphan1147 Thanhphan1147 commented Dec 6, 2024

Add the oidc interface to configure upstream_providers in MAS.

Checklist

@Thanhphan1147 Thanhphan1147 marked this pull request as ready for review January 15, 2025 15:34
Thanhphan1147 and others added 3 commits January 16, 2025 08:19
…ery slight chance that the generated secret contains all digits and is interpreted as an unsigned int
@javierdelapuente
Copy link
Collaborator

could you update the pull request description? Thanks!

Copy link
Contributor

Test coverage for 3d2c1b6

Name                                    Stmts   Miss Branch BrPart  Cover   Missing
-----------------------------------------------------------------------------------
src/auth/__init__.py                        0      0      0      0   100%
src/auth/mas.py                            84      7      2      1    91%   82-84, 128->130, 163-164, 325-329
src/backup.py                             175      5     20      2    96%   353-354, 423-424, 481->483, 484
src/backup_observer.py                    134     16     12      0    89%   132-135, 140-143, 179-182, 211-214
src/charm.py                              288     24     66     11    90%   150->152, 155, 229, 287, 291-292, 298-299, 320-321, 345, 352, 427-431, 434-435, 463-465, 485, 582-588
src/charm_types.py                         30      0      0      0   100%
src/database_client.py                     57      1      8      4    92%   35, 47->exit, 69->exit, 88->98
src/database_observer.py                   49      4      2      0    92%   61-64
src/exceptions.py                           3      0      0      0   100%
src/matrix_auth_observer.py                69      7     10      2    89%   66, 146, 160-164
src/media_observer.py                      45      4      2      1    89%   60-62, 81
src/observability.py                       13      0      0      0   100%
src/pebble.py                             194     23     44     11    86%   157->exit, 168-172, 216-217, 237-238, 256-259, 320->325, 330-331, 343-344, 346-347, 378, 380, 382, 384, 386, 418
src/redis_observer.py                      39      3      4      0    93%   63-66
src/s3_parameters.py                       22      0      4      0   100%
src/smtp_observer.py                       61      1     14      2    96%   89, 108->113
src/state/__init__.py                       0      0      0      0   100%
src/state/charm_state.py                  127      9     32      7    90%   164, 168, 189, 214, 220, 226, 230-231, 314
src/state/mas.py                           79      8      6      3    87%   154, 160-161, 187-189, 204, 224
src/state/validation.py                    36      3      2      0    92%   108-110
src/synapse/__init__.py                     3      0      0      0   100%
src/synapse/api.py                        129      6     18      4    93%   111-112, 161, 172, 174, 314
src/synapse/workload.py                   118      4     24      0    94%   365-368
src/synapse/workload_configuration.py     149     26     34     12    79%   90->exit, 94-95, 143-144, 173, 193-194, 226-227, 260, 269-270, 285, 290-291, 312-313, 332->337, 338, 356->358, 368-369, 397, 405->407, 407->409, 414-415, 435->442, 445, 465-466
src/user.py                                23      0      2      0   100%
-----------------------------------------------------------------------------------
TOTAL                                    1927    151    306     60    90%
Coverage failure: total of 90 is less than fail-under=91

Static code analysis report

Working... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Run started:2025-01-23 04:25:13.480090

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 9779
  Total lines skipped (#nosec): 4
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@Thanhphan1147
Copy link
Collaborator Author

Hi @gregory-schiano / @amandahla, can you take a look and review the PR when you have the time? thanks!

"-c",
MAS_CONFIGURATION_PATH,
"manage",
"provision-all-users",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this job have any impact on MAS?
Also, should this be run after every restart too?

oauth_client_config = generate_oauth_client_config(
mas_configuration, charm_state.synapse_config
)
self._oauth.update_client_config(oauth_client_config)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldnt this trigger another relation-changed?

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

Successfully merging this pull request may close these issues.

4 participants