You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please link to related issues when possible, and explain WHY you changed things, not WHAT you changed.
Other information:
eg: Did you discuss this change with anybody before working on it (not required, but can be a good idea for bigger changes). Any plans for the future, etc?
Checklist:
Put a "X" in the boxes below to indicate you have followed the checklist;
I checked that there were not similar issues or PRs already open for this.
This PR fixes just ONE issue (do not include multiple issues or types of change in the same PR) For example, don't try and fix a UI issue and include new dependencies in the same PR.
PR Type
Enhancement
Description
Allow user registration with FusionAuth provider
Extend registration logic to support FusionAuth alongside generic provider
Diagram Walkthrough
flowchart LR
A["Registration Request"] --> B["Check Provider Type"]
B --> C["GENERIC or FUSIONAUTH?"]
C -->|Yes| D["Allow Registration"]
C -->|No| E["Check Organization Count"]
E --> F["Return Result"]
Loading
File Walkthrough
Relevant files
Enhancement
auth.service.ts
Add FusionAuth provider to registration eligibility
apps/backend/src/services/auth/auth.service.ts
Modified canRegister() method to include FusionAuth provider check
Added Provider.FUSIONAUTH to the registration eligibility condition
Allows FusionAuth registrations when registration is enabled or as first organization
Below is a summary of compliance checks for this PR:
Security Compliance
⚪
Registration policy bypass
Description: The new condition allows bypassing DISABLE_REGISTRATION when provider equals Provider.FUSIONAUTH, which could enable unintended open registration if provider is influenced by user input or not strictly validated/derived from a trusted auth flow. auth.service.ts [23-25]
Objective: To create a detailed and reliable record of critical system actions for security analysis and compliance.
Status: No registration audit: The new allowance for Provider.FUSIONAUTH registration eligibility is not accompanied by any audit logging to record who/when/why registration was permitted, which may be required for reconstructing security-relevant events.
Generic: Security-First Input Validation and Data Handling
Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent vulnerabilities
Status: Provider input validation: canRegister(provider: string) compares the externally-supplied provider to enum values (now including Provider.FUSIONAUTH) without explicit validation/normalization of allowed provider values, which may allow unexpected provider strings to reach fallback registration logic.
Refactor provider check for better maintainability
Refactor the provider check by creating an array of unrestricted providers and using Array.prototype.includes() to check if the given provider is in the list, improving maintainability.
Why: This is a valid refactoring suggestion that improves code readability and maintainability by centralizing the list of unrestricted providers, which is good practice.
Low
More
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
What kind of change does this PR introduce?
eg: Bug fix, feature, docs update, ...
Why was this change needed?
Please link to related issues when possible, and explain WHY you changed things, not WHAT you changed.
Other information:
eg: Did you discuss this change with anybody before working on it (not required, but can be a good idea for bigger changes). Any plans for the future, etc?
Checklist:
Put a "X" in the boxes below to indicate you have followed the checklist;
PR Type
Enhancement
Description
Allow user registration with FusionAuth provider
Extend registration logic to support FusionAuth alongside generic provider
Diagram Walkthrough
File Walkthrough
auth.service.ts
Add FusionAuth provider to registration eligibilityapps/backend/src/services/auth/auth.service.ts
canRegister()method to include FusionAuth provider checkProvider.FUSIONAUTHto the registration eligibility conditionfirst organization