fix(pcf): add missing auth middleware to smPolicyGroup and uePolicyGroup#63
Open
solar224 wants to merge 1 commit intofree5gc:mainfrom
Open
fix(pcf): add missing auth middleware to smPolicyGroup and uePolicyGroup#63solar224 wants to merge 1 commit intofree5gc:mainfrom
solar224 wants to merge 1 commit intofree5gc:mainfrom
Conversation
Npcf_SMPolicyControl and Npcf_UEPolicyControl route groups were
registered without RouterAuthorizationCheck middleware, allowing
unauthenticated requests to reach business handlers directly.
Add auth middleware to both groups following the same pattern used
by amPolicyGroup, bdtPolicyGroup, oamGroup, and policyAuthorizationGroup.
Unauthenticated requests now receive 401 before any business logic runs.
Fixes: unauthenticated access exposing subscriber SUPI via GET
/npcf-smpolicycontrol/v1/sm-policies/{smPolicyId}
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
@c9274326 @roundspring2003 PTAL
Problem
In NewServer(),
smPolicyGroupanduePolicyGroupare registered without RouterAuthorizationCheck middleware:All other PCF service groups (
amPolicyGroup,bdtPolicyGroup,oamGroup,policyAuthorizationGroup) attach auth middleware before registering routes. The missing middleware allows unauthenticated requests to bypass the 401 rejection and reach business handlers directly. When session context exists, an unauthenticatedGET /npcf-smpolicycontrol/v1/sm-policies/{id}returns200withcontext.supiin the response body.Fix
Add RouterAuthorizationCheck middleware to both groups, following the same pattern used by the other groups:
Unauthenticated requests to all
Npcf_SMPolicyControlendpoints now receive401before any business logic is executed.Fixes: free5gc/free5gc#844